Thanks JB, I was able to overcome this issue by passing in the user name and password, however I found that after two runs, I get this error:
Server key for host localhost/127.0.0.1:8102 does not match the stored key !! Terminating session. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that the RSA host key has just been changed. Please contact your system administrator. Add correct host key in /Users/asoto/.sshkaraf/known_hosts to get rid of this message. Offending key in /Users/asoto/.sshkaraf/known_hosts RSA host key has changed and you have requested strict checking. Host key verification failed. I suppose I can delete this file before each test, but I was wondering if there is a more elegant way to avoid this error. Best regards, Alex soto > On Dec 7, 2015, at 1:44 PM, Jean-Baptiste Onofré <j...@nanthrax.net> wrote: > > You can enable the authentication by cert (in etc/keys.properties), like > this, the password won't be prompted. > > You can also provide the password as option to instance:connect. > > Regards > JB > > On 12/07/2015 07:34 PM, Alex Soto wrote: >> Hello, >> >> Using Karaf 4.0.3, and PAX-EXAM 4.7.0, I am not able to run commands on >> the child instance. In my test, I create and start a child instance. >> When I try to run a command in the child instance: >> >> executeCommand("instance:connect "+ name+ " bundle:list "); >> >> I get the following exception: >> >> java.lang.UnsupportedOperationException: null >> at >> org.apache.karaf.shell.impl.console.HeadlessSessionImpl.readLine(HeadlessSessionImpl.java:119) >> at org.apache.karaf.shell.ssh.SshAction.execute(SshAction.java:115) >> at >> org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83) >> at >> org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67) >> at >> org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87) >> at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480) >> at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406) >> at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108) >> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182) >> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119) >> at >> org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94) >> at >> org.apache.karaf.shell.impl.console.HeadlessSessionImpl.execute(HeadlessSessionImpl.java:90) >> at >> org.apache.karaf.instance.command.ConnectCommand.doExecute(ConnectCommand.java:81) >> at >> org.apache.karaf.instance.command.InstanceCommandSupport.execute(InstanceCommandSupport.java:90) >> at >> org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83) >> at >> org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67) >> at >> org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87) >> at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480) >> at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406) >> at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108) >> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182) >> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119) >> at >> org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94) >> at >> org.apache.karaf.shell.impl.console.HeadlessSessionImpl.execute(HeadlessSessionImpl.java:90) >> >> When I do the same interactively, Karaf is asking for the password, but >> since Pax-Exam uses a headless shell, prompts are not supported. >> I see Cellar integration tests have similar operations, so I am not sure >> why it does not work for me. >> >> Is there a way to avoid this authentication step? >> >> Best regards, >> Alex soto >> >> > > -- > Jean-Baptiste Onofré > jbono...@apache.org > http://blog.nanthrax.net > Talend - http://www.talend.com