Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-33890

Per-AMI launch timeout for SSH connection is not respected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • ec2-plugin
    • None
    • ec2-plugin 1.31
      Jenkins 1.642.2

      I have an AMI configured with "Launch Timeout in seconds" set to 180, but noticed that it took 900 seconds to timeout attempting to connect over SSH:

      <SNIP>
      INFO: Failed to connect via ssh: The kexTimeout (10000 ms) expired.
      Mar 29, 2016 10:04:39 PM null
      INFO: Waiting for SSH to come up. Sleeping 5.
      Mar 29, 2016 10:04:44 PM null
      INFO: Connecting to ec2-XX-XX-XX-XX.us-west-1.compute.amazonaws.com on port 22, with timeout 10000.
      Mar 29, 2016 10:04:54 PM null
      INFO: Failed to connect via ssh: The kexTimeout (10000 ms) expired.
      Mar 29, 2016 10:04:54 PM null
      INFO: Waiting for SSH to come up. Sleeping 5.
      ERROR: Timed out after 905 seconds of waiting for ssh to become available. (maximum timeout configured is 900)
      com.amazonaws.AmazonClientException: Timed out after 905 seconds of waiting for ssh to become available. (maximum timeout configured is 900)
      	at hudson.plugins.ec2.ssh.EC2UnixLauncher.connectToSsh(EC2UnixLauncher.java:315)
      	at hudson.plugins.ec2.ssh.EC2UnixLauncher.launch(EC2UnixLauncher.java:126)
      	at hudson.plugins.ec2.EC2ComputerLauncher.launch(EC2ComputerLauncher.java:100)
      	at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:253)
      	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)
      

      I did have a different AMI with launch timeout of 900, so the "maximum timeout configured" was indeed 900. But this behavior is undocumented and quite strange. Either each AMI should use its own launch timeout, or the launch timeout should be a global property of the Cloud. I'm fine either way, though others may have use for per-AMI timeouts.

            francisu Francis Upton
            mihelich Patrick Mihelich
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: