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

Restarting a Windows slave causes the master to shutdown

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • core
    • master Ubuntu 16.04.2 LTS
      slave Windows 7 64bit

      When we restart or connect a Windows slave, the master shuts down. This doesn't happen consistently, but now that we are restarting the slaves over night, the master is down pretty much every morning.

      The master log just says:

      Aug 16, 2017 4:41:48 AM winstone.Logger logInternal
      INFO: JVM is terminating. Shutting down Winstone
      

      No exception or other error.

      We had this issue for some time which happened sporadically, when connecting a Windows slave.

      Our Windows slaves are on Windows 7 64bit and uses the Jenkins agent installed as a service. When we restart the machine, the node is not brought temporary offline, that is, it goes offline because the slave is disconnected, then comes back online by itself. I wonder is that could be an issue?

      How can I get more information on why the JVM is shutting down?

          [JENKINS-46215] Restarting a Windows slave causes the master to shutdown

          Oleg Nenashev added a comment -

          Do you have master and agent on the same machine?

          Please provide service configuration files for both instances

          Oleg Nenashev added a comment - Do you have master and agent on the same machine? Please provide service configuration files for both instances

          Thanks for the reply.

          No they are different machines, the master being an Ubuntu server.

          Which configuration files are you referring to?

          Maxime Viargues added a comment - Thanks for the reply. No they are different machines, the master being an Ubuntu server. Which configuration files are you referring to?

          Oleg Nenashev added a comment -
          • Node's config.xml (on the master side)
          • If you use Windows service, jenkins-slave.xml from the work directory (and WinSW version)

          Oleg Nenashev added a comment - Node's config.xml (on the master side) If you use Windows service, jenkins-slave.xml from the work directory (and WinSW version)

          I have uploaded the the config files. We also have Mac slaves but I suspect it's the Windows ones causing the problem. Note that I had to obfuscate job names for confidentiality reasons.

          I noticed we don't have Email notifications on the Mac ones, maybe that could be related?

          Maxime Viargues added a comment - I have uploaded the the config files. We also have Mac slaves but I suspect it's the Windows ones causing the problem. Note that I had to obfuscate job names for confidentiality reasons. I noticed we don't have Email notifications on the Mac ones, maybe that could be related?

          Maxime Viargues added a comment - - edited

          It happened again this morning. This time I have a Windows 7 VM that I use for testing on my machine, and when I woke up my PC this morning (therefore the VM too), Jenkins when off-line at this exact same time.

          I have disabled all email notifications so that's not the problem.

          Maxime Viargues added a comment - - edited It happened again this morning. This time I have a Windows 7 VM that I use for testing on my machine, and when I woke up my PC this morning (therefore the VM too), Jenkins when off-line at this exact same time. I have disabled all email notifications so that's not the problem.

          Oleg Nenashev added a comment -

          No idea, I have tried to reproduce it ~1 week ago, no success.

          Oleg Nenashev added a comment - No idea, I have tried to reproduce it ~1 week ago, no success.

          Shame It happened again this morning, that's quite annoying now I am scared to just bring a node online and crash the system. Is there a way to get more information on why it shuts down? More loggin or something?

          Maxime Viargues added a comment - Shame It happened again this morning, that's quite annoying now I am scared to just bring a node online and crash the system. Is there a way to get more information on why it shuts down? More loggin or something?

          Oleg Nenashev added a comment -

          Let's start from the full System log. Maybe JVM is crashing in an elegant way. Ideally you could just install a Support Core plugin and upload the entire bundle, maybe we will discover something there

          Oleg Nenashev added a comment - Let's start from the full System log. Maybe JVM is crashing in an elegant way. Ideally you could just install a Support Core plugin and upload the entire bundle, maybe we will discover something there

          Ok I'll do that and send it when I've got it crashed again.

          Maxime Viargues added a comment - Ok I'll do that and send it when I've got it crashed again.

          Well good news I've found the problem... quite anticlimactic though. It was due to one of our plugin, that we forked from the diskcheck plugin. The version we forked from had a System.exit(0) in the code on a very edge case that was only happening when the slave didn't have disk information, which was the case when the slave was connecting for the first time. Fortunately I saw the build log when it happened.

          Such a waste of time... but anyway I am glad it's fixed.

          Thanks for your help.

          Maxime Viargues added a comment - Well good news I've found the problem... quite anticlimactic though. It was due to one of our plugin, that we forked from the diskcheck plugin. The version we forked from had a System.exit(0) in the code on a very edge case that was only happening when the slave didn't have disk information, which was the case when the slave was connecting for the first time. Fortunately I saw the build log when it happened. Such a waste of time... but anyway I am glad it's fixed. Thanks for your help.

            Unassigned Unassigned
            mviargues Maxime Viargues
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: