You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by "Ignasi Barrera (JIRA)" <ji...@apache.org> on 2015/06/12 10:21:00 UTC

[jira] [Resolved] (JCLOUDS-666) Exception in createNodesInGroup when authorizePublicKey is set for template

     [ https://issues.apache.org/jira/browse/JCLOUDS-666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ignasi Barrera resolved JCLOUDS-666.
------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.9.0

> Exception in createNodesInGroup when authorizePublicKey is set for template
> ---------------------------------------------------------------------------
>
>                 Key: JCLOUDS-666
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-666
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-compute, jclouds-labs-google
>    Affects Versions: 1.7.3
>            Reporter: Sunil Shah
>            Priority: Minor
>              Labels: google-compute-engine
>             Fix For: 1.9.0
>
>
> We create our template as follows:
> {code}
> val templateBuilder = context.getComputeService.templateBuilder()
> val template = templateBuilder.imageId(request.image)
> .hardwareId(s"${request.zone}/${request.machineType}")
> .locationId(request.zone)
> .options(options.overrideLoginPrivateKey(Main.conf.privateKeyString))
> .options(options.overrideLoginUser(request.sshUserName))
> .options(options.authorizePublicKey(Main.conf.publicKeyString))
> .build())
> {code}
> And instantiate nodes like this:
> {code}
>  val node = computeService.createNodesInGroup(name, 1, template)
> {code}
> However, the presence of the authorizePublicKey option causes an exception to be thrown when we call createNodesInGroup:
> {code}
> 2014-08-13 01:35:55,810 ERROR [pool-3-thread-3] j.compute [SLF4JLogger.java:96] << problem customizing node(asia-east1-c/almost-nothing-bef):
> org.jclouds.rest.AuthorizationException: (jclouds:rsa[fingerprint(91:ed:0b:d9:18:4b:23:5f:7e:dc:7d:5b:0f:b7:c4:f5),sha1(66:3e:a9:48:67:1f:a5:0d:00:23:41:58:ce:37:d3:2d:fd:17:64:63)]@107.167.191.8:22) (jclouds:rsa[fingerprint(91:ed:0b:d9:18:4b:23:5f:7e:dc:7d:5b:0f:b7:c4:f5),sha1(66:3e:a9:48:67:1f:a5:0d:00:23:41:58:ce:37:d3:2d:fd:17:64:63)]@107.167.191.8:22) error acquiring {hostAndPort=107.167.191.8:22, loginUser=jclouds, connectTimeout=60000, sessionTimeout=60000}: Auth fail
> 	at org.jclouds.ssh.jsch.JschSshClient.propagate(JschSshClient.java:335) ~[poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na]
> 	at org.jclouds.ssh.jsch.JschSshClient.acquire(JschSshClient.java:187) ~[poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na]
> 	at org.jclouds.ssh.jsch.JschSshClient.connect(JschSshClient.java:200) ~[poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na]
> 	at org.jclouds.compute.callables.RunScriptOnNodeAsInitScriptUsingSsh.call(RunScriptOnNodeAsInitScriptUsingSsh.java:76) ~[poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na]
> 	at org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.call(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:125) [poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na]
> 	at org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.apply(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:146) [poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na]
> 	at org.jclouds.compute.strategy.CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.apply(CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.java:53) [poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na]
> 	at com.google.common.util.concurrent.Futures$1.apply(Futures.java:711) [poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na]
> 	at com.google.common.util.concurrent.Futures$ChainingListenableFuture.run(Futures.java:849) [poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_05]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_05]
> 	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_05]
> Caused by: com.jcraft.jsch.JSchException: Auth fail
> 	at com.jcraft.jsch.Session.connect(Session.java:491) ~[poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na]
> 	at org.jclouds.ssh.jsch.SessionConnection.create(SessionConnection.java:186) ~[poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na]
> 	at org.jclouds.ssh.jsch.SessionConnection.create(SessionConnection.java:39) ~[poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na]
> 	at org.jclouds.ssh.jsch.JschSshClient.acquire(JschSshClient.java:180) ~[poseidon-0.2-SNAPSHOT-jar-with-dependencies.jar:na]
> 	... 10 common frames omitted
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)