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

EC2 Plugin: EC2 instance starts but waits forever

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • ec2-plugin
    • None
    • Ubuntu, EC2

    Description

      I want to use the "Amazon EC2 Plugin" to dynamically start slaves on EC2.

      Versions:
      Jenkins 1.544
      Amazon EC2 Plugin 1.20

      I am using the eu-west-1 region.

      So far Jenkins starts the EC2 instance fine but Jenkins can not ssh into the slave. The plugin log looks like the following.

      Connecting to 172.31.x.y on port 22.
      Waiting for SSH to come up. Sleeping 5.
      Connecting to 172.31.x.y on port 22.
      Waiting for SSH to come up. Sleeping 5.
      ...

      I already verified that:

      • I can manually ssh into the instance created by jenkins using the credentials used by Jenkins (tested from the jenkins host)
      • I can scp files into /tmp and /var/jenkins
      • auth.log on the instance contains no login attempts
      • adding the running instance as a static slave node works with same credentials

      Therefore I am pretty convinced that it is a defect in Jenkins / the plugin.

      The attached screenshot shows my plugin config in Jenkins.

      I am happy to help analyzing this issue / retesting a fix.

      Attachments

        Issue Links

          Activity

            jbrejner Jens Brejner added a comment -

            fixed together with 19943

            jbrejner Jens Brejner added a comment - fixed together with 19943
            markfink Mark Fink added a comment -

            I have setup a EC2 machine at us-east-1 region with EC2-Classic. Jenkins now can ssh into the machine without any problems. I can't wait for this patch to be released.

            markfink Mark Fink added a comment - I have setup a EC2 machine at us-east-1 region with EC2-Classic. Jenkins now can ssh into the machine without any problems. I can't wait for this patch to be released.
            markfink Mark Fink added a comment -

            Thank you so much Andrew! I struggled for a while to get more log information out of the plugin to see what is wrong. Thanks to you this mystery is resolved. Next step I will try out your suggestion and setup a slave at us-east-1 region with EC2-Classic.

            markfink Mark Fink added a comment - Thank you so much Andrew! I struggled for a while to get more log information out of the plugin to see what is wrong. Thanks to you this mystery is resolved. Next step I will try out your suggestion and setup a slave at us-east-1 region with EC2-Classic.

            Are your eu-west-1 instances using EC2-VPC and in the default VPC (if you have signed up for EC2 relatively recently, they will be)?

            If so, I think this issue duplicates https://issues.jenkins-ci.org/browse/JENKINS-19943 - notice that the IP in your log (172.31.x.y) is an EC2 private IP, so will always be unreachable from outside EC2.

            Until the fix for that issue is merged, you should be able to use the us-east-1 region with EC2-Classic as a workaround.

            acoulton Andrew Coulton added a comment - Are your eu-west-1 instances using EC2-VPC and in the default VPC (if you have signed up for EC2 relatively recently, they will be)? If so, I think this issue duplicates https://issues.jenkins-ci.org/browse/JENKINS-19943 - notice that the IP in your log (172.31.x.y) is an EC2 private IP, so will always be unreachable from outside EC2. Until the fix for that issue is merged, you should be able to use the us-east-1 region with EC2-Classic as a workaround.

            People

              francisu Francis Upton
              markfink Mark Fink
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: