Hi!
I decided to re-try, so I did this:
$ cd /cygdrive/c/apache-karaf-4.2.1/bin
$ ./karaf
(when I do this I see the following message, but Karaf starts normally:
' : integer expression expected' (error message starts with the
character ':')
Then, inside Karaf I did
$ instance:create --feature:scr newinst
$ instance:start newinst
<wait till it starts as confirmed by instance:list>
$ instance:connect newinst
Now I get
Connecting to host localhost on port 8103
Error executing command: Failed (ArrayIndexOutOfBoundsException) to
execute: 1
log:tail shows:
21:55:46.109 ERROR [Karaf local console user karaf] Exception caught
while executing command
org.apache.sshd.common.SshException: Failed
(ArrayIndexOutOfBoundsException) to execute: 1
at
org.apache.sshd.common.future.AbstractSshFuture.verifyResult(AbstractSshFuture.java:125)
~[?:?]
at
org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:40)
~[?:?]
at
org.apache.sshd.client.future.DefaultAuthFuture.verify(DefaultAuthFuture.java:33)
~[?:?]
at
org.apache.sshd.common.future.VerifiableFuture.verify(VerifiableFuture.java:44)
~[?:?]
at
org.apache.karaf.shell.ssh.SshAction.execute(SshAction.java:168) ~[?:?]
at
org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84)
~[?:?]
at
org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68)
~[?:?]
at
org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86)
~[?:?]
at
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?]
at
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526)
~[?:?]
at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?]
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
~[?:?]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
~[?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at
org.apache.karaf.shell.ssh.KnownHostsManager.getKnownKeyInternal(KnownHostsManager.java:84)
~[?:?]
at
org.apache.karaf.shell.ssh.KnownHostsManager.getKnownKey(KnownHostsManager.java:64)
~[?:?]
at
org.apache.karaf.shell.ssh.ServerKeyVerifierImpl.verifyServerKey(ServerKeyVerifierImpl.java:57)
~[?:?]
at
org.apache.sshd.client.session.AbstractClientSession.checkKeys(AbstractClientSession.java:488)
~[?:?]
at
org.apache.sshd.common.session.helpers.AbstractSession.handleKexMessage(AbstractSession.java:664)
~[?:?]
at
org.apache.sshd.common.session.helpers.AbstractSession.doHandleMessage(AbstractSession.java:612)
~[?:?]
at
org.apache.sshd.common.session.helpers.AbstractSession.handleMessage(AbstractSession.java:547)
~[?:?]
at
org.apache.sshd.common.session.helpers.AbstractSession.decode(AbstractSession.java:1498)
~[?:?]
at
org.apache.sshd.common.session.helpers.AbstractSession.messageReceived(AbstractSession.java:508)
~[?:?]
at
org.apache.sshd.common.session.helpers.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:66)
~[?:?]
at
org.apache.sshd.common.io.nio2.Nio2Session.handleReadCycleCompletion(Nio2Session.java:301)
~[?:?]
at
org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:281)
~[?:?]
at
org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:278)
~[?:?]
at
org.apache.sshd.common.io.nio2.Nio2CompletionHandler.lambda$completed$0(Nio2CompletionHandler.java:38)
~[?:?]
at java.security.AccessController.doPrivileged(Native Method)
~[?:?]
at
org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:37)
~[?:?]
at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126) ~[?:?]
at sun.nio.ch.Invoker$2.run(Invoker.java:218) ~[?:?]
at
sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
~[?:?]
... 3 more
So I have messed something up, but perhaps the code which is crashing
could be improved and log a better error message. Since I was creating
new instances, I kept getting host key problems, and I may have removed
something before (didn't touch anything now), which now causes this
crash. How do I disable host key checking when I am just connecting to
my local instances?
- Eric L
On 2018-12-04 21:23, Jean-Baptiste Onofré wrote:
Hi Eric,
I just tried the following scenario:
1. With Karaf 4.2.2-SNAPSHOT freshly built, I created an instance with:
instance:create test
instance:start test
instance:connect test
2. I dropped a bundle in the test instance deploy folder.
I can see the fileinstall "trigger" in the log:
2018-12-04 21:21:43,375 | INFO | nces/test/deploy | fileinstall
| 10 - org.apache.felix.fileinstall - 3.6.4 | Started
bundle:
file:/home/jbonofre/Workspace/karaf/assemblies/apache-karaf/target/apache-karaf-4.2.2-SNAPSHOT/instances/test/deploy/commons-lang-2.6.jar
So, it looks good to me.
Regards
JB
On 02/12/2018 20:15, Eric Lilja wrote:
Hi, is it possible to consider including KARAF-5934 for 4.2.2? I saw
it was just tentatively postponed to 4.2.3.
Also, is the deploy folder enabled by default? I downloaded the
binary distribution (version 4.2.1), and created a new instance with
feature scr enabled. Everything else vanilla. I put a bundle in the
deploy folder but it doesn't get installed, no interesting output
from log:tail either, so no failures. Just like the directory was not
monitored at all (I did use the deploy directory in the instance I
created).
Furthermore, output from scr:list seems to lack line breaks. This is
under Windows, with Cygwin (Mintty) as terminal. Also tried with
TakeCommand under Windows, which used to work really well with Karaf,
but when one does bundle:list -s -t 0 for example, a lot columns
contains only ?-characters (question marks). Also scr:list looks bad
under it.
- Eric L