SINTEF-9012 / cloudml

CloudML: Transparent deployment of cloud applications
GNU Lesser General Public License v3.0
27 stars 8 forks source link

SSH error #27

Closed paxti closed 9 years ago

paxti commented 9 years ago

Hi I have strange error, basically when CloudML tries to execute SSH command I am getting error

java.lang.NoClassDefFoundError: org/bouncycastle/openssl/PEMReade

and this class is missing from CloudML lib. Can you take a look, is linking is correct or it's something in my side.

Best regards, Iurii

nicolasferry commented 9 years ago

Hi, I will have a look, which provider are you targeting (will help me finding the issue)? Best regards, Nicolas

paxti commented 9 years ago

So i am getting this error for the first time, so it's might be on my side, but i don't think so. Here is log:

Feb 27, 2015 2:10:53 PM org.cloudml.connectors.JCloudsConnector execCommand INFO: >> wget -P ~ https://dl.dropboxusercontent.com/u/32823955/java-install.sh --quiet 2992 [main] INFO net.schmizz.sshj.common.SecurityUtils - BouncyCastle not registered, using the default JCE provider 5691 [main] WARN net.schmizz.sshj.DefaultConfig - Disabling high-strength ciphers: cipher strengths apparently limited by JCE policy 5841 [main] INFO net.schmizz.sshj.transport.TransportImpl - Client identity string: SSH-2.0-SSHJ_0_8_1_SNAPSHOT 5978 [main] INFO net.schmizz.sshj.transport.TransportImpl - Server identity string: SSH-2.0-OpenSSH_6.0p1 Debian-3ubuntu1 6614 [main] INFO net.schmizz.sshj.transport.TransportImpl - Disconnected - BY_APPLICATION Exception in thread "main" java.lang.NoClassDefFoundError: org/bouncycastle/openssl/PEMReader at net.schmizz.sshj.userauth.keyprovider.PKCS8KeyFile.readKeyPair(PKCS8KeyFile.java:128) at net.schmizz.sshj.userauth.keyprovider.PKCS8KeyFile.getPublic(PKCS8KeyFile.java:72) at net.schmizz.sshj.userauth.keyprovider.OpenSSHKeyFile.getPublic(OpenSSHKeyFile.java:60) at net.schmizz.sshj.userauth.method.KeyedAuthMethod.putPubKey(KeyedAuthMethod.java:44) at net.schmizz.sshj.userauth.method.AuthPublickey.buildReq(AuthPublickey.java:62) at net.schmizz.sshj.userauth.method.AuthPublickey.buildReq(AuthPublickey.java:81) at net.schmizz.sshj.userauth.method.AbstractAuthMethod.request(AbstractAuthMethod.java:63) at net.schmizz.sshj.userauth.UserAuthImpl.authenticate(UserAuthImpl.java:92) at net.schmizz.sshj.SSHClient.auth(SSHClient.java:205) at net.schmizz.sshj.SSHClient.authPublickey(SSHClient.java:305) at net.schmizz.sshj.SSHClient.authPublickey(SSHClient.java:324) at org.jclouds.sshj.SSHClientConnection.create(SSHClientConnection.java:165) at org.jclouds.sshj.SSHClientConnection.create(SSHClientConnection.java:49) at org.jclouds.sshj.SshjSshClient.acquire(SshjSshClient.java:196) at org.jclouds.sshj.SshjSshClient.connect(SshjSshClient.java:226) at org.jclouds.compute.callables.RunScriptOnNodeUsingSsh.call(RunScriptOnNodeUsingSsh.java:78) at org.jclouds.compute.internal.BaseComputeService.runScriptOnNode(BaseComputeService.java:615) at org.cloudml.connectors.JCloudsConnector.execCommand(JCloudsConnector.java:225) at org.cloudml.deployer.CloudAppDeployer.executeCommand(CloudAppDeployer.java:326) at org.cloudml.deployer.CloudAppDeployer.executeRetrieveCommand(CloudAppDeployer.java:392) at org.cloudml.deployer.CloudAppDeployer.prepareAnInternalComponent(CloudAppDeployer.java:270) at org.cloudml.deployer.CloudAppDeployer.prepareComponents(CloudAppDeployer.java:244) at org.cloudml.deployer.CloudAppDeployer.deploy(CloudAppDeployer.java:113) at com.cloudml.main.Test2.main(Test2.java:155) Caused by: java.lang.ClassNotFoundException: org.bouncycastle.openssl.PEMReader at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source)

paxti commented 9 years ago

When I am trying to register BouncyCastle manually

Security.addProvider(new BouncyCastleProvider());

I am getting same error just instead of "BouncyCastle not registered, using the default JCE provider" message is BouncyCastle is already registered, using the default JCE provider" after log is the same,

nicolasferry commented 9 years ago

How are you using CloudML? (which jar?)

I am trying it right now and it seems to work properly, maybe you can try to force maven to update dependencies or to clean your .m2 repository,

paxti commented 9 years ago

Hi again, sorry for late response. I am still not sure what was wrong but I had to completely re-install Java to fit this issue. I am still getting warning

81164 [main] WARN net.schmizz.sshj.DefaultConfig - Disabling high-strength ciphers: cipher strengths apparently limited by JCE policy

but it works just fine. Thx again for your quick response.

Best regards, Iurii