-
Bug
-
Resolution: Fixed
-
Minor
-
Jenkins 2.34, Ubuntu 16.04 (updated)
There is a initial set-up issue.
I have set in the config an "Launch Timeout in seconds = 45".
When the instance is started directly the ssh probing is started. When the system is booting there a time that the SSH is not yet started and when you ssh in to the server you get an ssh: connect to host ec2-xxx.eu-west-1.compute.amazonaws.com port 22: Connection refused. error.
The plugin gives during the boot for some times a timeout but when the IP is reachable but SSH is not yet ready it trips over an unknown error and then stops. Leaving the server without a client running and jobs in the queue.
I have manually re-launch the client connection to get it starting.
INFO: Connecting to ec2-xxx.eu-west-1.compute.amazonaws.com on port 22, with timeout 10000. Dec 05, 2016 3:16:04 PM null INFO: Failed to connect via ssh: The kexTimeout (10000 ms) expired. Dec 05, 2016 3:16:04 PM null INFO: Waiting for SSH to come up. Sleeping 5. ERROR: Unexpected error in launching an agent. This is probably a bug in Jenkins java.lang.NullPointerException at hudson.plugins.ec2.ssh.EC2UnixLauncher.bootstrap(EC2UnixLauncher.java:309) at hudson.plugins.ec2.ssh.EC2UnixLauncher.launch(EC2UnixLauncher.java:131) at hudson.plugins.ec2.EC2ComputerLauncher.launch(EC2ComputerLauncher.java:122) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:261) at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
Why is the config timeout not used so that the instance can boot normally before connecting?
And why does this error stops and does not keeps trying to set-up the slave?
This happens when you use the external ssh option.
When you use the internal one it works fine.
The same issue for me in Jenkins 2.36. It is failing (randomly - sometimes it works) for both system ssh and internal ssh.