Invalid DER: length field too big Exception

174 views
Skip to first unread message

Paolo Di Tommaso

unread,
May 2, 2012, 9:41:42 AM5/2/12
to jcl...@googlegroups.com
Dear all, 

I'm experience the following exception launching some nodes on Amazon with JClouds. 


java.lang.RuntimeException: java.io.IOException: Invalid DER: length field too big (186)
    at com.google.common.base.Throwables.propagate(Throwables.java:156)
    at org.jclouds.crypto.Pems.privateKeySpec(Pems.java:173)
    at org.jclouds.crypto.SshKeys.fingerprintPrivateKey(SshKeys.java:228)
    at org.jclouds.sshj.SshjSshClient.<init>(SshjSshClient.java:155)
    at org.jclouds.sshj.config.SshjSshClientModule$Factory.create(SshjSshClientModule.java:68)
    at org.jclouds.compute.functions.CreateSshClientOncePortIsListeningOnNode.apply(CreateSshClientOncePortIsListeningOnNode.java:59)
    at org.jclouds.compute.functions.CreateSshClientOncePortIsListeningOnNode.apply(CreateSshClientOncePortIsListeningOnNode.java:40)
    at org.jclouds.compute.callables.SudoAwareInitManager.init(SudoAwareInitManager.java:64)
    at org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSsh.init(RunScriptOnNodeAsInitScriptUsingSsh.java:82)
    at org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.init(RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.java:76)
    at org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.init(RunScriptOnNodeAsInitScriptUsingSshAndBlockUntilComplete.java:43)
    at org.jclouds.compute.strategy.InitializeRunScriptOnNodeOrPlaceInBadMap.call(InitializeRunScriptOnNodeOrPlaceInBadMap.java:67)
    at org.jclouds.compute.strategy.InitializeRunScriptOnNodeOrPlaceInBadMap.call(InitializeRunScriptOnNodeOrPlaceInBadMap.java:40)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:680)
Caused by: java.io.IOException: Invalid DER: length field too big (186)
    at net.oauth.signature.pem.DerParser.getLength(DerParser.java:159)
    at net.oauth.signature.pem.DerParser.read(DerParser.java:117)
    at net.oauth.signature.pem.PKCS1EncodedKeySpec.decode(PKCS1EncodedKeySpec.java:95)
    at net.oauth.signature.pem.PKCS1EncodedKeySpec.<init>(PKCS1EncodedKeySpec.java:52)
    at org.jclouds.crypto.Pems$1.parseResult(Pems.java:149)
    at org.jclouds.crypto.Pems$1.parseResult(Pems.java:146)
    at org.jclouds.crypto.Pems$PemProcessor.getResult(Pems.java:94)
    at com.google.common.io.ByteStreams.readBytes(ByteStreams.java:715)
    at org.jclouds.crypto.Pems.fromPem(Pems.java:123)
    at org.jclouds.crypto.Pems.privateKeySpec(Pems.java:143)
    at org.jclouds.crypto.Pems.privateKeySpec(Pems.java:171)
    ... 16 more


Any ideas ? 

Best,
Paolo


Richard Downer

unread,
May 2, 2012, 10:23:39 AM5/2/12
to jcl...@googlegroups.com
Paolo,

It seems that something is having trouble parsing the private key used for ssh. How are you dealing with SSH keys? Are you passing your own SSH key to jclouds, or using a key that is already known to Amazon (that you have previously created or uploaded with the AWS web console, for example), or are you doing nothing and letting jclouds manage the SSH key creation?

Richard.




--
You received this message because you are subscribed to the Google Groups "jclouds" group.
To view this discussion on the web visit https://groups.google.com/d/msg/jclouds/-/6d8aHmkM6KAJ.
To post to this group, send email to jcl...@googlegroups.com.
To unsubscribe from this group, send email to jclouds+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jclouds?hl=en.



--
Richard Downer • Lead Engineer • Cloudsoft Corporation • http://www.cloudsoftcorp.com
Skype richardcloudsoft • Twitter @FrontierTown

Reply all
Reply to author
Forward
0 new messages