You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Justin Cozzens <ju...@nextgate.com> on 2017/10/26 02:30:39 UTC

Odd SSH output behavior [4.1.x]

We have some automation that is running shell commands in Karaf through SSH commands. With moving to v4 (from v3) we are seeing that certain commands are not returning their output properly when running as a scripted SSH command. For example:

PS C:\NextGate\apache-karaf-4.1.2\bin> client -h localhost "bundle:status 28"
Logging in as karaf
PS C:\NextGate\apache-karaf-4.1.2\bin> client -h localhost "bundle:start-level 28"
Logging in as karaf
Level 80
PS C:\NextGate\apache-karaf-4.1.2\bin>

The first command should output "Active", but outputs nothing. The second command provides its output fine. The output is written properly when running the commands in the interactive shell:

karaf@root()> bundle:status 28
Active
karaf@root()> bundle:start-level 28
Level 80
karaf@root()>

I am seeing this in both 4.1.1 and 4.1.2. My example here is from a stock 4.1.2 install, steps are below.


  1.  Unzip apache-karaf-4.1.2.zip
  2.  Run bin/karaf
  3.  Run feature:install ssh
  4.  In a separate shell run: client -h localhost "bundle:status 28"

Any thoughts on a cause or workaround for this?

Thanks!

-- history --
Justin Cozzens  |  Sr. Solutions Architect
(o) +1.802.221.0622  |  (m) +1.802.734.3268
NEXTGATE<http://www.nextgate.com/>  | KLAS Category Leader: EMPI<http://www.nextgate.com/media-coverage/nextgate-ranked-1-empi-in-2014-best-in-klas-report/>

Register for our Nov. 14 webinar on Patient Matching<http://healthsystemcio.com/patient-matching/>
Follow @NextGate<http://twitter.com/nextgate> | Connect @LinkedIn<https://www.linkedin.com/company-beta/797421/>