Thanks, Andrew, that is much better - I get an instance created now. The error (below) is now down to ssh AFAICS.
I have a keychain set up, and unlocked on the machine that this is running from. After the instance is created ( and the error below) I can log in without entering a password jaamiller@ci-master$ ssh NEW-INSTANCE-IP jaamiller@jaam-test-e6d:~$ but jclouds cannot log in because it doesn't have access to my keychain. Is it just a matter of using a password-less key? Also, I am unclear where I would set the machine type, zone etc. in this example (if the example would allow that) - any advice would be gratefully received. Thanks again Jonathan ----------------- java -jar target/compute-basics-jar-with-dependencies.jar google-compute-engine [email protected] ~jaamiller/jaam-test-project-79bdf4efdc6d.json jaam-test add >> initializing {id=google-compute-engine, name=Google Compute Engine Api, >> views=[org.jclouds.compute.ComputeServiceContext], endpointName=https >> endpoint, identityName=client_email which usually looks like >> [email protected] or >> [email protected], >> credentialName=Optional.of(PEM encoded P12 private key associated with >> client_email), documentation=https://developers.google.com/compute/docs, >> api=interface org.jclouds.googlecomputeengine.GoogleComputeEngineApi} >> adding node to group jaam-test - >> searching params({locationId=us-central1-a, osFamily=debian, osVersion=7\..*}) - << matched image(https://www.googleapis.com/compute/v1/projects/gce-nvme/global/images/nvme-backports-debian-7-wheezy-v20150423) hardware(https://www.googleapis.com/compute/v1/projects/jaam-test-project/zones/us-central1-a/machineTypes/f1-micro) location(us-central1-a) - >> running 1 node group(jaam-test) location(us-central1-a) image(https://www.googleapis.com/compute/v1/projects/gce-nvme/global/images/nvme-backports-debian-7-wheezy-v20150423) hardwareProfile(https://www.googleapis.com/compute/v1/projects/jaam-test-project/zones/us-central1-a/machineTypes/f1-micro) options({scriptPresent=true}) - >> creating default keypair... - >> adding node location(us-central1-a) name(jaam-test-e6d) image(634999531103483430) hardware(1000) - << PENDING node(https://www.googleapis.com/compute/v1/projects/jaam-test-project/zones/us-central1-a/instances/jaam-test-e6d) - >> blocking on sockets [104.197.32.104:22, 10.240.28.120:22] for 600000 MILLISECONDS - << socket 10.240.28.120:22 opened - Disabling high-strength ciphers: cipher strengths apparently limited by JCE policy - >> running [/tmp/init-bootstrap init] as [email protected] - << init(0) - >> running [sudo /tmp/init-bootstrap start] as [email protected] - << start(0) - << exitstatus(0) - << customized node(https://www.googleapis.com/compute/v1/projects/jaam-test-project/zones/us-central1-a/instances/jaam-test-e6d) << node https://www.googleapis.com/compute/v1/projects/jaam-test-project/zones/us-central1-a/instances/jaam-test-e6d: [10.240.28.120, 104.197.32.104] >> running [echo hello] on group jaam-test as jaamiller - >> blocking on sockets [104.197.32.104:22, 10.240.28.120:22] for 600000 MILLISECONDS - << socket 10.240.28.120:22 opened error executing echo hello on group jaam-test: error runScript on filtered nodes options({loginUser=jaamiller, loginPasswordPresent=true, loginPrivateKeyPresent=true, runAsRoot=false, wrapInInitScript=false}) Execution failures: 0 error[s] Node failures: 1) IllegalArgumentException on node https://www.googleapis.com/compute/v1/projects/jaam-test-project/zones/us-central1-a/instances/jaam-test-e6d: java.lang.IllegalArgumentException: you must specify a password, a key or an SSH agent needs to be available at com.google.common.base.Preconditions.checkArgument(Preconditions.java:125) at org.jclouds.sshj.SshjSshClient.<init>(SshjSshClient.java:148) at org.jclouds.sshj.config.SshjSshClientModule$Factory.create(SshjSshClientModule.java:77) at org.jclouds.compute.functions.CreateSshClientOncePortIsListeningOnNode.apply(CreateSshClientOncePortIsListeningOnNode.java:68) at org.jclouds.compute.functions.CreateSshClientOncePortIsListeningOnNode.apply(CreateSshClientOncePortIsListeningOnNode.java:40) at org.jclouds.compute.callables.RunScriptOnNodeUsingSsh.init(RunScriptOnNodeUsingSsh.java:99) at org.jclouds.compute.strategy.InitializeRunScriptOnNodeOrPlaceInBadMap.call(InitializeRunScriptOnNodeOrPlaceInBadMap.java:61) at org.jclouds.compute.strategy.InitializeRunScriptOnNodeOrPlaceInBadMap.call(InitializeRunScriptOnNodeOrPlaceInBadMap.java:34) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 1 error[s] On 21 July 2015 at 13:57, Andrew Phillips <[email protected]> wrote: >> error: group(class java.lang.NullPointerException) > > > An NPE, eh? I see that the code seems to have changed relative to the > current trunk - do you think you could build against 2.0.0-SNAPSHOT and run > the example again to see if anything's changed? > > I've pasted a version of the compute-basics POM with the required changes > (basically, changing jclouds.version, changing the google-compute-engine > group ID and adding the Apache snapshot repo) here: > > http://pastie.org/private/zlfanz26pzc0hydsc2zwq > > Thanks for sending over that additional info! > > Regards > > ap -- Jonathan Miller DevOps Engineer, Appsbroker Consulting Mob: 07580 779841 -- Follow us on: <https://plus.google.com/+Appsbroker/> <https://twitter.com/appsbroker> <http://www.linkedin.com/company/appsbroker-consulting-limited/careers?trk=top_nav_careers> Appsbroker Consulting Limited, Registered office: Appsbroker House, The Square, Swindon, SN1 3EB, Company Number: 5702796, VAT Number: GB 876 3533 92, Company registered in England and Wales. ________________________________________ PLEASE NOTE AS RECIPIENT OF THIS EMAIL: Any views or opinions presented are solely those of the author and do not represent those of Appsbroker Consulting Limited. This e-mail is confidential and intended solely for the addressee. If you are not the intended recipient, be advised that you have received this mail in error and that any use, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited. Furthermore, if you are not the intended recipient, please email it back to the sender and then immediately permanently delete it.
