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

Can not spin up JNLP agent on Amazon ECS

    Details

    • Similar Issues:

      Description

      I tried following the instructions for spinning up Jenkins on an EC2 instance, using ECS for the slaves.  I have created a cloud, and have two types of templates created: both JNLP Docker images, one the default Jenkins, and the other the CloudBees.  They both behave the same.

       

      My AWS security settings allow all TCP traffic between the EC2 instance and the ECS cluster.

       

      I have created a job, that just does 'hostname'.  When I run the job, I see the Build Executor Status box show no slave exists, then slave exists offline, then nothing.  I see in the ECS log the work of pulling the Docker image, etcetera.  There appears to be some issue receiving stats, and it looks like it then shuts down the instance.  After all of that logging, I then see a message in the Docker log about no such container.

       

      When I go into the offline agent, and try to configure it, I get a stack trace; I'm guessing this is an unrelated defect, but, am mentioning here for compleatness.

       

      I have attached a screenshot of my Cloud configuration, the ECS log, the docker log, and the stack trace.  As I am new to AWS, I do not know what else to try or to look at. I have tried deleting the ECS cluster and creating a new one, and the same thing happens.

       

      I'd really appreciate pointers on getting this working.

        Attachments

          Activity

          Hide
          treaves Timothy Reaves added a comment -

          According to Amazon, the Task is being created incorrectly:

          "I looked over the logs and noted that the containers are starting but are rapidly exiting and thus transitions from RUNNING to STOPPED within 2 seconds of transitioning. I believe the issue lies with the command provided to start the jenkins-slave. The current Task has its command set as jenkins-slave -url <jenkins_jnlp_url> <token> <name>, I tried invoking this with a similar invocation and was unable to start the slave, however removing the jenkins-slave command at the beginning (ie: -url <jenkins_jnlp_url> <token> <name>) allows the entrypoint to properly handle the flags and execute properly."

          Show
          treaves Timothy Reaves added a comment - According to Amazon, the Task is being created incorrectly: "I looked over the logs and noted that the containers are starting but are rapidly exiting and thus transitions from RUNNING to STOPPED within 2 seconds of transitioning. I believe the issue lies with the command provided to start the jenkins-slave. The current Task has its command set as jenkins-slave -url <jenkins_jnlp_url> <token> <name> , I tried invoking this with a similar invocation and was unable to start the slave, however removing the jenkins-slave command at the beginning (ie: -url <jenkins_jnlp_url> <token> <name> ) allows the entrypoint to properly handle the flags and execute properly."
          Hide
          jady Jady Liu added a comment -

          Jan Roehrich, have you resolved the issue? I meet the same issue and still would not get it work.

          Show
          jady Jady Liu added a comment - Jan Roehrich , have you resolved the issue? I meet the same issue and still would not get it work.
          Hide
          jady Jady Liu added a comment -

          Timothy Reaves, have you resolved the issue? 

          Show
          jady Jady Liu added a comment - Timothy Reaves , have you resolved the issue? 

            People

            • Assignee:
              pgarbe Philipp Garbe
              Reporter:
              treaves Timothy Reaves
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: