ec2-plugin can create instances but doesn't keep the ssh connection

Issue

  • ec2-plugin can create instances but doesn’t keep the ssh connection
  • You see a stacktrace like the one below:
Waiting for SSH to come up. Sleeping 5.
Connecting to XX.XX.XX.XX on port 22, with timeout 10000.
Waiting for SSH to come up. Sleeping 5.
Connecting to XX.XX.XX.XX on port 22, with timeout 10000.
Waiting for SSH to come up. Sleeping 5.
Connecting to XX.XX.XX.XX on port 22, with timeout 10000. 

Environment

  • CloudBees Jenkins Enterprise
  • ec2-plugin

Resolution

This usually happens because you have a HTTP Proxy Configuration under http://<JENKINS_URL>/pluginManager/advanced that maybe you don’t need or you don’t really want to use for the ec2-plugin.

Have more questions?

2 Comments

  • 0
    Avatar
    Gwen Sarault

    Not sure how a proxy for the PluginManager could have an impact on the startup of an EC2 slave...but seeing the same issue with no proxy.

  • 0
    Avatar
    Chris Campbell

    I too am having this issue; removing the proxy in PluginManager did not help.

    The plugin creates the ec2 instance fine, but never connects back to Jenkins, with the same output above.

    Interestingly, I am able to create a "manual" node in Jenkins, point it to the SAME ec2 instance created OK by the plugin, use the same Key provided to the plugin, and the Jenkins agent connects fine.

    Per another Jenkins support ticket ( https://issues.jenkins-ci.org/browse/JENKINS-30284 ), i added "-Djenkins.ec2.bootstrapAuthSleepMs=60000", but that did not get the plugin working either.

    What's missing?

     

Please sign in to leave a comment.