[
https://issues.apache.org/jira/browse/KARAF-4502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15313436#comment-15313436
]
Luis Gomez commented on KARAF-4502:
-----------------------------------
We see same issue in OpenDaylight using Centos 7/Fedora 21 + OpenJDK 8 + Karaf
3.0.6. after disabling BouncyCastle in custom distribution:
# Set security provider to BouncyCastle
#org.apache.karaf.security.providers =
org.bouncycastle.jce.provider.BouncyCastleProvider
NOTE: with BouncyCastle we see slight different ERROR:
Logging in as karaf
219 [sshd-SshClient[694f9431]-nio2-thread-1] WARN
org.apache.sshd.client.session.ClientSessionImpl - Exception caught
java.security.NoSuchAlgorithmException: EC KeyPairGenerator not available
at java.security.KeyPairGenerator.getInstance(KeyPairGenerator.java:218)
at
org.apache.sshd.common.util.SecurityUtils.getKeyPairGenerator(SecurityUtils.java:155)
at org.apache.sshd.common.kex.ECDH.<init>(ECDH.java:51)
at org.apache.sshd.client.kex.ECDHP256.getDH(ECDHP256.java:48)
at
org.apache.sshd.client.kex.AbstractDHGClient.init(AbstractDHGClient.java:71)
at
org.apache.sshd.common.session.AbstractSession.doHandleMessage(AbstractSession.java:390)
at
org.apache.sshd.common.session.AbstractSession.handleMessage(AbstractSession.java:326)
at
org.apache.sshd.client.session.ClientSessionImpl.handleMessage(ClientSessionImpl.java:306)
at
org.apache.sshd.common.session.AbstractSession.decode(AbstractSession.java:780)
at
org.apache.sshd.common.session.AbstractSession.messageReceived(AbstractSession.java:308)
at
org.apache.sshd.common.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:54)
at
org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:184)
at
org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:170)
at
org.apache.sshd.common.io.nio2.Nio2CompletionHandler$1.run(Nio2CompletionHandler.java:32)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:30)
at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)
at sun.nio.ch.Invoker.invokeDirect(Invoker.java:157)
at
sun.nio.ch.UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:553)
at
sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:276)
at
sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:297)
at
java.nio.channels.AsynchronousSocketChannel.read(AsynchronousSocketChannel.java:420)
at
org.apache.sshd.common.io.nio2.Nio2Session.startReading(Nio2Session.java:170)
at
org.apache.sshd.common.io.nio2.Nio2Connector$1.onCompleted(Nio2Connector.java:60)
at
org.apache.sshd.common.io.nio2.Nio2Connector$1.onCompleted(Nio2Connector.java:53)
at
org.apache.sshd.common.io.nio2.Nio2CompletionHandler$1.run(Nio2CompletionHandler.java:32)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:30)
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)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
> REGRESSION: using OpenJDK on CentOS 7 causes bin/client to fail with "Unable
> to negotiate key exchange for kex algorithms"
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: KARAF-4502
> URL: https://issues.apache.org/jira/browse/KARAF-4502
> Project: Karaf
> Issue Type: Bug
> Affects Versions: 4.0.3, 4.0.4
> Environment: CentOS Linux release 7.0.1406 (Core)
> openjdk version "1.8.0_77"
> Reporter: Damjan Jovanovic
>
> On a fresh install of CentOS 7 with OpenJDK 1.8, running karaf container
> versions > 4.0.2 either with "bin/karaf" or as a service (whether sysvinit or
> systemd), trying to log in with "bin/client" always fails with an exception.
> Oracle JDK - by comparison - works.
> "git bisect" narrowed down the regression to the following commit:
> 539540cde099aee52fd523a09aca92e36522261c is the first bad commit
> commit 539540cde099aee52fd523a09aca92e36522261c
> Author: Freeman Fang <[email protected]>
> Date: Wed Oct 14 12:09:09 2015 +0800
> [KARAF-4062]Karaf client does now work after installing BouncyCastle
> :040000 040000 926f15997510a671ff77db9623f8b65ce4186706
> da83c22e043de3004a620f1cc88e25ee672bd09d M client
> The exception is:
> # bin/client
> Logging in as karaf
> 3771 [sshd-SshClient[593634ad]-nio2-thread-2] WARN
> org.apache.sshd.client.session.ClientSessionImpl - Exception caught
> java.lang.IllegalStateException: Unable to negotiate key exchange for kex
> algorithms (client:
> ecdh-sha2-nistp256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp384,ecdh-sha2-nistp521,ecdh-sha2-nistp521
> / server:
> diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1)
> at
> org.apache.sshd.common.session.AbstractSession.negotiate(AbstractSession.java:1159)
> at
> org.apache.sshd.common.session.AbstractSession.doHandleMessage(AbstractSession.java:388)
> at
> org.apache.sshd.common.session.AbstractSession.handleMessage(AbstractSession.java:326)
> at
> org.apache.sshd.client.session.ClientSessionImpl.handleMessage(ClientSessionImpl.java:306)
> at
> org.apache.sshd.common.session.AbstractSession.decode(AbstractSession.java:780)
> at
> org.apache.sshd.common.session.AbstractSession.messageReceived(AbstractSession.java:308)
> at
> org.apache.sshd.common.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:54)
> at
> org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:184)
> at
> org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:170)
> at
> org.apache.sshd.common.io.nio2.Nio2CompletionHandler$1.run(Nio2CompletionHandler.java:32)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:30)
> 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)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> Authentication failed
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)