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

Windows Slaves Plugin: agent is not starting after upgrade to Jenkins 2.50

      After upgrading the master to Jenkins v2.50, the Windows slave (working before) does not start any more, but only reports the following error:

      [2017-03-13 17:57:58] [windows-slaves] Connecting to dewxxxdev-bn02
      Checking if Java exists
      
      java -version returned 1.8.0.
      [2017-03-13 17:58:00] [windows-slaves] Installing the Jenkins slave service
      [2017-03-13 17:58:00] [windows-slaves] Copying jenkins-slave.exe
      [2017-03-13 17:58:00] [windows-slaves] Copying slave.jar
      [2017-03-13 17:58:00] [windows-slaves] Copying jenkins-slave.xml
      ERROR: Unexpected error in launching an agent. This is probably a bug in Jenkins
      java.lang.NullPointerException
      	at java.io.Reader.<init>(Reader.java:78)
      	at java.io.InputStreamReader.<init>(InputStreamReader.java:113)
      	at org.apache.commons.io.IOUtils.copy(IOUtils.java:1906)
      	at org.apache.commons.io.IOUtils.toString(IOUtils.java:778)
      	at org.apache.commons.io.IOUtils.toString(IOUtils.java:803)
      	at hudson.os.windows.ManagedWindowsServiceLauncher.generateSlaveXml(ManagedWindowsServiceLauncher.java:520)
      	at hudson.os.windows.ManagedWindowsServiceLauncher.createAndCopyJenkinsSlaveXml(ManagedWindowsServiceLauncher.java:456)
      	at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:301)
      	at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:262)
      	at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

      the config.xml for that slave is (with sensitive info X'ed out)

      <?xml version='1.0' encoding='UTF-8'?>
      <slave>
        <name>dewxxxdev-bn02</name>
        <description>Windows 64-bit (x86_64) release build machine</description>
        <remoteFS>D:\Jenkins</remoteFS>
        <numExecutors>12</numExecutors>
        <mode>EXCLUSIVE</mode>
        <retentionStrategy class="hudson.slaves.RetentionStrategy$Always"/>
        <launcher class="hudson.os.windows.ManagedWindowsServiceLauncher" plugin="windows-slaves@1.2">
          <userName>DOMAIN\username</userName>
          <password>{xxx}</password>
          <account class="hudson.os.windows.ManagedWindowsServiceAccount$Administrator"/>
        </launcher>
        <label>kernel windows x86_64 release</label>
        <nodeProperties/>
      </slave>
      

      Any advice is greatly appreciated. - Thanks.

          [JENKINS-42724] Windows Slaves Plugin: agent is not starting after upgrade to Jenkins 2.50

          Oleg Nenashev added a comment - - edited

          I also created JENKINS-42743 in order to update the Windows Slaves plugin.
          I will try to deliver a fix today just to have a temporary solution.

          Oleg Nenashev added a comment - - edited I also created JENKINS-42743 in order to update the Windows Slaves plugin. I will try to deliver a fix today just to have a temporary solution.

          Oleg Nenashev added a comment -

          Also JENKINS-42746 as a very hotfix

          Oleg Nenashev added a comment - Also JENKINS-42746 as a very hotfix

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/os/windows/ManagedWindowsServiceLauncher.java
          src/main/resources/hudson/os/windows/configsamples/jenkins-slave.xml
          src/test/java/hudson/os/windows/ManagedWindowsServiceLauncherTest.java
          http://jenkins-ci.org/commit/windows-slaves-plugin/0872fc38409a7efe05f239650e944aef4e174456
          Log:
          JENKINS-42746 - Make the plugin independent from the XML sample in the core

          In Jenkins 2.50 we have got JENKINS-42724, which has been caused by the usage of the old resource file located within the Jenkins core.
          It is likely a leftover from the migration of the windows-slaves-installer module.

          Since the Windows Slaves plugin has its internal macro resolution logic, the sample should be also inside plugin. A longer-term fix is to make the plugin depent on the Windows Agent Installer module

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/os/windows/ManagedWindowsServiceLauncher.java src/main/resources/hudson/os/windows/configsamples/jenkins-slave.xml src/test/java/hudson/os/windows/ManagedWindowsServiceLauncherTest.java http://jenkins-ci.org/commit/windows-slaves-plugin/0872fc38409a7efe05f239650e944aef4e174456 Log: JENKINS-42746 - Make the plugin independent from the XML sample in the core In Jenkins 2.50 we have got JENKINS-42724 , which has been caused by the usage of the old resource file located within the Jenkins core. It is likely a leftover from the migration of the windows-slaves-installer module. Since the Windows Slaves plugin has its internal macro resolution logic, the sample should be also inside plugin. A longer-term fix is to make the plugin depent on the Windows Agent Installer module

          Oleg Nenashev added a comment -

          I have released Windows Slaves 1.3.1 with a workaround. - JENKINS-42746

          Oleg Nenashev added a comment - I have released Windows Slaves 1.3.1 with a workaround. - JENKINS-42746

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          content/_data/changelogs/weekly.yml
          http://jenkins-ci.org/commit/jenkins.io/7d2678f8c7efa0580d106ba4e7fbbb023c61a91c
          Log:
          Reference the JENKINS-42724 regression in Jenkins 2.50

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: content/_data/changelogs/weekly.yml http://jenkins-ci.org/commit/jenkins.io/7d2678f8c7efa0580d106ba4e7fbbb023c61a91c Log: Reference the JENKINS-42724 regression in Jenkins 2.50

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          content/_data/changelogs/weekly.yml
          http://jenkins-ci.org/commit/jenkins.io/525a918e2646fcc2a106d363b0c42af4112a7f46
          Log:
          Merge pull request #754 from oleg-nenashev/changelog/JENKINS-42724

          Changelog: Reference the JENKINS-42724 regression in Jenkins 2.50

          Compare: https://github.com/jenkins-infra/jenkins.io/compare/82fa1dd813e0...525a918e2646

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: content/_data/changelogs/weekly.yml http://jenkins-ci.org/commit/jenkins.io/525a918e2646fcc2a106d363b0c42af4112a7f46 Log: Merge pull request #754 from oleg-nenashev/changelog/ JENKINS-42724 Changelog: Reference the JENKINS-42724 regression in Jenkins 2.50 Compare: https://github.com/jenkins-infra/jenkins.io/compare/82fa1dd813e0...525a918e2646

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          core/src/main/resources/windows-service/jenkins-slave.xml
          http://jenkins-ci.org/commit/jenkins/4ac7c0850bb316db82637e7652bc97fd6aad2418
          Log:
          JENKINS-42724 - Restore the windows-service/jenkins.xml resource to restore compatibility with windows-slaves 1.2 (#2803)

          Windows Slaves plugin performs a direct access to the resources bundled into the core.
          Hence the file removal was a bad idea though I have not seen the issue in automatic tests and ATH.

          This change also was a last-minute change in https://github.com/jenkinsci/jenkins/pull/2765/ in order to address suggestions from @daniel-beck, hence I didn't test it properly

          • JENKINS-42724 - Update the Windows Agents plugin dependency to 1.3.1

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: core/src/main/resources/windows-service/jenkins-slave.xml http://jenkins-ci.org/commit/jenkins/4ac7c0850bb316db82637e7652bc97fd6aad2418 Log: JENKINS-42724 - Restore the windows-service/jenkins.xml resource to restore compatibility with windows-slaves 1.2 (#2803) JENKINS-42724 - Restore the jenkins-slave.xml file Windows Slaves plugin performs a direct access to the resources bundled into the core. Hence the file removal was a bad idea though I have not seen the issue in automatic tests and ATH. This change also was a last-minute change in https://github.com/jenkinsci/jenkins/pull/2765/ in order to address suggestions from @daniel-beck, hence I didn't test it properly JENKINS-42724 - Update the Windows Agents plugin dependency to 1.3.1 JENKINS-42724 -Revert the war/pom.xml upgrade

          Code changed in jenkins
          User: Daniel Beck
          Path:
          content/_data/changelogs/weekly.yml
          http://jenkins-ci.org/commit/jenkins.io/7a6c0722e7c6c6d0d01c2563bcd9beceabaad993
          Log:
          JENKINS-42724 Add changelog entry

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: content/_data/changelogs/weekly.yml http://jenkins-ci.org/commit/jenkins.io/7a6c0722e7c6c6d0d01c2563bcd9beceabaad993 Log: JENKINS-42724 Add changelog entry

          Code changed in jenkins
          User: Daniel Beck
          Path:
          content/_data/changelogs/weekly.yml
          http://jenkins-ci.org/commit/jenkins.io/4e5e16d1915a7fd1bcea12f34e7315c96e5c6f31
          Log:
          Merge pull request #766 from daniel-beck/JENKINS-42724

          JENKINS-42724 Add changelog entry

          Compare: https://github.com/jenkins-infra/jenkins.io/compare/7079cbd12c37...4e5e16d1915a

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: content/_data/changelogs/weekly.yml http://jenkins-ci.org/commit/jenkins.io/4e5e16d1915a7fd1bcea12f34e7315c96e5c6f31 Log: Merge pull request #766 from daniel-beck/ JENKINS-42724 JENKINS-42724 Add changelog entry Compare: https://github.com/jenkins-infra/jenkins.io/compare/7079cbd12c37...4e5e16d1915a

          Oleg Nenashev added a comment -

          The fix has been released in 2.51. I and danielbeck have a follow-up to think about the detached version requirements to enforce update of Windows slaves to the latest version where possible

          Oleg Nenashev added a comment - The fix has been released in 2.51. I and danielbeck have a follow-up to think about the detached version requirements to enforce update of Windows slaves to the latest version where possible

            oleg_nenashev Oleg Nenashev
            fillenseer Frank Illenseer
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: