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

Unable to delete ec2 slave

    XMLWordPrintable

Details

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

    Description

      I have a slave that I have been unable to get rid of. The instance doesnt exist and any time I try to delete it via the UI I get the following error:

      Exception: Status Code: 400, AWS Service: AmazonEC2, AWS Request ID: 3a682e66-152a-407c-a52a-f3b2d3423ccf, AWS Error Code: InvalidInstanceID.NotFound, AWS Error Message: The instance ID 'i-c81ba6b8' does not exist

      Full Logs: https://gist.github.com/johntdyer/5271754

      I have restarted Jenkins, I have upgraded to the latest Jenkins build ( 1.508 ) which also restarted the server, but this slave just wont go away. Is there some way to remove it manually ?

      Attachments

        Activity

          wooh Adam PAPAI added a comment -

          Do you see this EC2 instance via the AWS console?

          It could be an AWS issue. Perhaps your instance has been terminated (sometimes when they're stuck, AWS kills them).

          You can remove it by manually

          stop jenkins
          edit the config.xml (the main jenkins xml)
          delete that node from the xml
          save the config.xml
          start up jenkins
          The node will be gone.

          wooh Adam PAPAI added a comment - Do you see this EC2 instance via the AWS console? It could be an AWS issue. Perhaps your instance has been terminated (sometimes when they're stuck, AWS kills them). You can remove it by manually stop jenkins edit the config.xml (the main jenkins xml) delete that node from the xml save the config.xml start up jenkins The node will be gone.
          wooh Adam PAPAI added a comment -

          And what kind of plugin are you using exactly for the EC2 auto provisioning.

          wooh Adam PAPAI added a comment - And what kind of plugin are you using exactly for the EC2 auto provisioning.
          johntdyer John Dyer added a comment -

          I am using the Jenkins EC2 plugin.... Is there another that works better which I should be using instead?

          johntdyer John Dyer added a comment - I am using the Jenkins EC2 plugin.... Is there another that works better which I should be using instead?
          yakobe jake bishop added a comment -

          I also have this problem. The instance no longer exists on ecs2 so jenkins cannot delete it.

          yakobe jake bishop added a comment - I also have this problem. The instance no longer exists on ecs2 so jenkins cannot delete it.

          I also have this problem.

          ximon18 Ximon Eighteen added a comment - I also have this problem.
          wooh Adam PAPAI added a comment -

          This works now as expected. Not sure which commit fixes it, but it's Ok now.

          INFO: job2 #3 main build action completed: SUCCESS
          Mar 25, 2014 9:09:00 AM hudson.model.AsyncPeriodicWork$1 run
          INFO: Started EC2 alive slaves monitor
          Mar 25, 2014 9:09:02 AM hudson.plugins.ec2.EC2SlaveMonitor execute
          INFO: EC2 instance is dead: i-e0fa86e9
          Mar 25, 2014 9:09:02 AM hudson.plugins.ec2.EC2OndemandSlave terminate
          INFO: EC2 instance already terminated: i-e0fa86e9
          Mar 25, 2014 9:09:02 AM hudson.plugins.ec2.EC2SlaveMonitor execute
          INFO: EC2 instance is dead: i-cbfb87c2
          Mar 25, 2014 9:09:03 AM hudson.plugins.ec2.EC2OndemandSlave terminate
          INFO: EC2 instance already terminated: i-cbfb87c2
          Mar 25, 2014 9:09:03 AM hudson.model.AsyncPeriodicWork$1 run
          INFO: Finished EC2 alive slaves monitor. 2387 ms

          wooh Adam PAPAI added a comment - This works now as expected. Not sure which commit fixes it, but it's Ok now. INFO: job2 #3 main build action completed: SUCCESS Mar 25, 2014 9:09:00 AM hudson.model.AsyncPeriodicWork$1 run INFO: Started EC2 alive slaves monitor Mar 25, 2014 9:09:02 AM hudson.plugins.ec2.EC2SlaveMonitor execute INFO: EC2 instance is dead: i-e0fa86e9 Mar 25, 2014 9:09:02 AM hudson.plugins.ec2.EC2OndemandSlave terminate INFO: EC2 instance already terminated: i-e0fa86e9 Mar 25, 2014 9:09:02 AM hudson.plugins.ec2.EC2SlaveMonitor execute INFO: EC2 instance is dead: i-cbfb87c2 Mar 25, 2014 9:09:03 AM hudson.plugins.ec2.EC2OndemandSlave terminate INFO: EC2 instance already terminated: i-cbfb87c2 Mar 25, 2014 9:09:03 AM hudson.model.AsyncPeriodicWork$1 run INFO: Finished EC2 alive slaves monitor. 2387 ms

          People

            francisu Francis Upton
            johntdyer John Dyer
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: