[CONTROLLER-1011] Ssh related error while accessing configSubsystem mountpoint Created: 11/Nov/14  Updated: 14/Nov/14  Resolved: 14/Nov/14

Status: Resolved
Project: controller
Component/s: netconf
Affects Version/s: Helium
Fix Version/s: None

Type: Bug
Reporter: Michal Rehak Assignee: Maros Marsalek
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 2345

 Description   

Steps to replicate:

  • start integration/distributions/extra/karaf distro
  • feature:install odl-restconf
  • feature:install odl-netconf-connector-all

GET from url:
http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount

result:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf">
<error>
<error-type>protocol</error-type>
<error-tag>unknown-element</error-tag>
<error-message>Mount point does not exist.</error-message>
</error>
</errors>

In karaf log there is:
2014-11-11 11:10:41,423 | WARN | o-group-thread-1 | Nio2Acceptor | 208 - org.apache.sshd.core - 0.12.0 | Caught exception while accepting incoming connection
java.lang.NoClassDefFoundError: org/bouncycastle/openssl/PEMParser
at org.apache.sshd.server.keyprovider.PEMGeneratorHostKeyProvider.doReadKeyPair(PEMGeneratorHostKeyProvider.java:58)[208:org.apache.sshd.core:0.12.0]
at org.apache.sshd.server.keyprovider.AbstractGeneratorHostKeyProvider.readKeyPair(AbstractGeneratorHostKeyProvider.java:128)[208:org.apache.sshd.core:0.12.0]
at org.apache.sshd.server.keyprovider.AbstractGeneratorHostKeyProvider.loadKeys(AbstractGeneratorHostKeyProvider.java:108)[208:org.apache.sshd.core:0.12.0]
at org.apache.sshd.common.keyprovider.AbstractKeyPairProvider.getKeyTypes(AbstractKeyPairProvider.java:53)[208:org.apache.sshd.core:0.12.0]
at org.apache.sshd.server.session.ServerSession.sendKexInit(ServerSession.java:127)[208:org.apache.sshd.core:0.12.0]
at org.apache.sshd.server.session.ServerSession.<init>(ServerSession.java:60)[208:org.apache.sshd.core:0.12.0]
at org.apache.sshd.server.session.SessionFactory.doCreateSession(SessionFactory.java:43)[208:org.apache.sshd.core:0.12.0]
at org.apache.sshd.common.session.AbstractSessionFactory.createSession(AbstractSessionFactory.java:38)[208:org.apache.sshd.core:0.12.0]
at org.apache.sshd.common.AbstractSessionIoHandler.sessionCreated(AbstractSessionIoHandler.java:36)[208:org.apache.sshd.core:0.12.0]
at org.apache.sshd.common.io.nio2.Nio2Acceptor$AcceptCompletionHandler.onCompleted(Nio2Acceptor.java:127)[208:org.apache.sshd.core:0.12.0]
at org.apache.sshd.common.io.nio2.Nio2Acceptor$AcceptCompletionHandler.onCompleted(Nio2Acceptor.java:108)[208:org.apache.sshd.core:0.12.0]
at org.apache.sshd.common.io.nio2.Nio2CompletionHandler$1.run(Nio2CompletionHandler.java:32)
at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_65]
at org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:30)[208:org.apache.sshd.core:0.12.0]
at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)[:1.7.0_65]
at sun.nio.ch.Invoker$2.run(Invoker.java:218)[:1.7.0_65]
at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)[:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_65]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_65]
Caused by: java.lang.ClassNotFoundException: org.bouncycastle.openssl.PEMParser
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)[org.eclipse.osgi-3.8.2.v20130124-134944.jar:]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)[org.eclipse.osgi-3.8.2.v20130124-134944.jar:]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)[org.eclipse.osgi-3.8.2.v20130124-134944.jar:]
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)[:1.7.0_65]
... 20 more



 Comments   
Comment by Maros Marsalek [ 13/Nov/14 ]

https://git.opendaylight.org/gerrit/#/c/12817/

The problem was in the Apache Mina sshd bundle. It has a direct dependency on bouncycastle bundles but marks this dependency as optional even though it cannot work without them.

Fixed by moving bouncycastle bundles from odl-netconf-connector-all to odl-netconf-netty-util so they are in the same feature as mina sshd.

Created issue for Apache Mina sshd project:
https://issues.apache.org/jira/browse/SSHD-370

Generated at Wed Feb 07 19:54:27 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.