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

Disconnected slaves come back online within a few minutes

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None
    • Linux Jenkins Master and build slave

      I have a Jenkins installation with 20 build slaves. A couple of minutes after I click on "Disconnect slave", the slave is back online.

      The log contains:

      Mar 19, 2012 5:22:19 PM hudson.slaves.SlaveComputer tryReconnect
      INFO: Attempting to reconnect musxdodo77

      Somehow Jenkins is ignoring the "offline" tag when set manually.

          [JENKINS-13140] Disconnected slaves come back online within a few minutes

          Norman Baumann created issue -

          Marc Günther added a comment -

          Are these swarm clients or normal dumb ssh clients? Swarm clients reconnect automatically after a disconnect, but you can "mark" them "offline".

          Marc Günther added a comment - Are these swarm clients or normal dumb ssh clients? Swarm clients reconnect automatically after a disconnect, but you can "mark" them "offline".

          Hey Marc,

          I don't know what a "Swarm client" is. Can you clarify this for me?

          I have created the slave as a "dump" slave. Setting it's status to offline has the same effect as disconnecting.

          Norman Baumann added a comment - Hey Marc, I don't know what a "Swarm client" is. Can you clarify this for me? I have created the slave as a "dump" slave. Setting it's status to offline has the same effect as disconnecting.

          I am also having this issue. The master node is connecting to slave nodes via a service. After I disconnect a slave (and give a reason) it goes back online within a few minutes. This can cause builds to fail, because the slave will execute a build that it was not ready to do.

          Denis Blanchette added a comment - I am also having this issue. The master node is connecting to slave nodes via a service. After I disconnect a slave (and give a reason) it goes back online within a few minutes. This can cause builds to fail, because the slave will execute a build that it was not ready to do.

          I think I found the issue.
          It's actually not a bug, it's was me being dull

          Jenkins has an option to disconnect a slave, which only cuts the connection to this slave. This triggers Jenkins to re-initiate the connection.
          An alternative option is the "temporarily remove" a slave. This does what I had in mind. Jenkins ignores this slave and does not bring it back online.

          Problem solved

          Norman Baumann added a comment - I think I found the issue. It's actually not a bug, it's was me being dull Jenkins has an option to disconnect a slave, which only cuts the connection to this slave. This triggers Jenkins to re-initiate the connection. An alternative option is the "temporarily remove" a slave. This does what I had in mind. Jenkins ignores this slave and does not bring it back online. Problem solved

          This was actually not a bug.

          Norman Baumann added a comment - This was actually not a bug.
          Norman Baumann made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          David Pärsson made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

          This is still an issue, at least as of Jenkins 1.522.

          I note that there are two actions you can take for a node:

          1. "mark temporarily offline" which keeps the slave.jar running, but doesn’t send any new jobs to the slave
          2. "disconnect" which means kill the slave.jar process (however, the slave process will be restarted in a few minutes)

          There is no option to actually kill the slave process, and stop it restarting.

          Also, there is confusion in the Jenkins code about what these options mean. If I "mark temporarily offline", then on the node staus page, it says "disconnected by ...", which is just mixing up two things that are supposed to be distinct.

          A rethink of what the options are is needed.

          Matthew Webber added a comment - This is still an issue, at least as of Jenkins 1.522. I note that there are two actions you can take for a node: "mark temporarily offline" which keeps the slave.jar running, but doesn’t send any new jobs to the slave "disconnect" which means kill the slave.jar process (however, the slave process will be restarted in a few minutes) There is no option to actually kill the slave process, and stop it restarting. Also, there is confusion in the Jenkins code about what these options mean. If I "mark temporarily offline", then on the node staus page, it says "disconnected by ...", which is just mixing up two things that are supposed to be distinct. A rethink of what the options are is needed.
          Matthew Webber made changes -
          Resolution Original: Not A Defect [ 7 ]
          Status Original: Closed [ 6 ] New: Reopened [ 4 ]

            kohsuke Kohsuke Kawaguchi
            norman Norman Baumann
            Votes:
            2 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: