I started Apache Karaf 3.0.0 in server mode using $KARAF_HOME/bin/start
in CentOS 6.5. Then I wanted to run several commands using $KARAF_HOME/bin/client
and also capture the output of these commands, so as to make sure the commands ran successfully. The output did get spit out on my console but I was never able to redirect it into a file. Seems like Karaf doesn't write anything to the output stream or error stream. I tried the following:
[apache-karaf-3.0.0]$ ./bin/start clean
[apache-karaf-3.0.0]$ ./bin/client "bundle:list"
Logging in as karaf
282 [pool-2-thread-3] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /0.0.0.0:8101 presented unverified key:
START LEVEL 100 , List Threshold: 50
ID | State | Lvl | Version | Name
------------------------------------------------------------------------------------
91 | Active | 80 | 1.8.0 | Commons Codec
92 | Active | 80 | 2.6 | Commons Lang
93 | Active | 80 | 15.0.0 | Guava: Google Core Libraries for Java
[apache-karaf-3.0.0]$ ./bin/client "bundle:list" >& bundleList
[apache-karaf-3.0.0]$ cat bundleList
null
Nothing got written to the file bundleList
. Piping the output doesn't seem to help either.
bin\client
is an script. here the source code of 3.0.0 version: github.com/apache/karaf/blob/karaf-3.0.0/assemblies/features/…. I don't know if it affects... – Jermaine