• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core
    • None
    • Windows7

      I have jenkins 1.566 running. I have configured it to automatically install jdk8u5 from Oracle site. It has successfully done that for my linux slaves, but failed on two windows slaves.

      The command Jenkins uses (note the quoting):
      [8u5] $ c:\jenkins\tools\hudson.model.JDK\8u5\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=c:\jenkins\tools\hudson.model.JDK\8u5 '/L \"c:\jenkins\tools\hudson.model.JDK\8u5\jdk.exe.install.log\"'
      Failed to install JDK. Exit code=-80
      ERROR: null

      If I remove some quoting and run manually the following command
      c:\jenkins\tools\hudson.model.JDK\8u5\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=c:\jenkins\tools\hudson.model.JDK\8u5 /L c:\jenkins\tools\hudson.model.JDK\8u5\jdk.exe.install.log

      Then installation is a success.

          [JENKINS-23366] jdk8u5 installation fails on windows agents

          Nikita Salnikov-Tarnovski created issue -

          Patrick Auld added a comment - - edited

          I'm also seeing this error but with Java 7u60 on Jenkins 1.567. I think it is related to a JDK installation changing from "install automatically" to not. When I auto-updated to 1.567 my Jenkin's configuration was modified; the version for the Sun installers for my JDK were incorrect, as if someone had randomized them. Separately (and I'm not sure how yet) the auto-install option was unchecked from all my JDKs. I then started having issues with JDK trying reinstall themselves and failing.

          Installing E:\JenkinsSlave\tools\hudson.model.JDK\JDK_7u60\jdk.exe
          [JDK_7u60] $ E:\JenkinsSlave\tools\hudson.model.JDK\JDK_7u60\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=E:\JenkinsSlave\tools\hudson.model.JDK\JDK_7u60 '/L \"E:\JenkinsSlave\tools\hudson.model.JDK\JDK_7u60\jdk.exe.install.log\"'
          Failed to install JDK. Exit code=-80
          ERROR: SEVERE ERROR occurs
          org.jenkinsci.lib.envinject.EnvInjectException: hudson.AbortException

          Patrick Auld added a comment - - edited I'm also seeing this error but with Java 7u60 on Jenkins 1.567. I think it is related to a JDK installation changing from "install automatically" to not. When I auto-updated to 1.567 my Jenkin's configuration was modified; the version for the Sun installers for my JDK were incorrect, as if someone had randomized them. Separately (and I'm not sure how yet) the auto-install option was unchecked from all my JDKs. I then started having issues with JDK trying reinstall themselves and failing. Installing E:\JenkinsSlave\tools\hudson.model.JDK\JDK_7u60\jdk.exe [JDK_7u60] $ E:\JenkinsSlave\tools\hudson.model.JDK\JDK_7u60\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=E:\JenkinsSlave\tools\hudson.model.JDK\JDK_7u60 '/L \"E:\JenkinsSlave\tools\hudson.model.JDK\JDK_7u60\jdk.exe.install.log\"' Failed to install JDK. Exit code=-80 ERROR: SEVERE ERROR occurs org.jenkinsci.lib.envinject.EnvInjectException: hudson.AbortException

          Same problem here with Jenkins v1.574 and master running on Ubuntu, and slave running on Windows7 (x64):

          Running our maven job with jdk8 required fails and gives the following console log:

          Started by user anonymous
          Building remotely on slave-stethu in workspace C:\Jenkins-slave\workspace\MyJob
          Installing JDK jdk-8u11-oth-JPR
          Downloading JDK from http://download.oracle.com/otn-pub/java/jdk/8u11-b12/jdk-8u11-windows-x64.exe
          Downloading 162831776bytes
          Installing C:\Jenkins-slave\tools\hudson.model.JDK\jdk8\jdk.exe
          [jdk8] $ C:\Jenkins-slave\tools\hudson.model.JDK\jdk8\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=C:\Jenkins-slave\tools\hudson.model.JDK\jdk8 '/L \"C:\Jenkins-slave\tools\hudson.model.JDK\jdk8\jdk.exe.install.log\"'
          Failed to install JDK. Exit code=-80
          ERROR: null
          Email was triggered for: Failure - Any
          Sending email for trigger: Failure - Any
          Installing C:\Jenkins-slave\tools\hudson.model.JDK\jdk8\jdk.exe
          [jdk8] $ C:\Jenkins-slave\tools\hudson.model.JDK\jdk8\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=C:\Jenkins-slave\tools\hudson.model.JDK\jdk8 '/L \"C:\Jenkins-slave\tools\hudson.model.JDK\jdk8\jdk.exe.install.log\"'
          Failed to install JDK. Exit code=-80
          Error retrieving environment vars: remote file operation failed: C:\Jenkins-slave\tools\hudson.model.JDK\jdk8 at hudson.remoting.Channel@77e302e6:slave-stethu
          Sending email to: notify-ci@company.com
          Started calculate disk usage of build
          Finished Calculation of disk usage of build in 0 seconds
          Started calculate disk usage of workspace
          Finished Calculation of disk usage of workspace in 0 seconds
          Finished: FAILURE
          

          Running the same maven job with jdk7 required succeeds on the same slave:

          Started by user anonymous
          Building remotely on slave-stethu in workspace C:\Jenkins-slave\workspace\MyJob
          Installing JDK jdk-7u67-oth-JPR
          Downloading JDK from http://download.oracle.com/otn-pub/java/jdk/7u67-b01/jdk-7u67-windows-x64.exe
          Downloading 135998368bytes
          Installing C:\Jenkins-slave\tools\hudson.model.JDK\jdk7\jdk.exe
          [jdk7] $ C:\Jenkins-slave\tools\hudson.model.JDK\jdk7\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=C:\Jenkins-slave\tools\hudson.model.JDK\jdk7 '/L \"C:\Jenkins-slave\tools\hudson.model.JDK\jdk7\jdk.exe.install.log\"'
          Cleaning local Directory trunk
          [...]
          

          Stefan Thurnherr added a comment - Same problem here with Jenkins v1.574 and master running on Ubuntu, and slave running on Windows7 (x64): Running our maven job with jdk8 required fails and gives the following console log: Started by user anonymous Building remotely on slave-stethu in workspace C:\Jenkins-slave\workspace\MyJob Installing JDK jdk-8u11-oth-JPR Downloading JDK from http://download.oracle.com/otn-pub/java/jdk/8u11-b12/jdk-8u11-windows-x64.exe Downloading 162831776bytes Installing C:\Jenkins-slave\tools\hudson.model.JDK\jdk8\jdk.exe [jdk8] $ C:\Jenkins-slave\tools\hudson.model.JDK\jdk8\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=C:\Jenkins-slave\tools\hudson.model.JDK\jdk8 '/L \"C:\Jenkins-slave\tools\hudson.model.JDK\jdk8\jdk.exe.install.log\"' Failed to install JDK. Exit code=-80 ERROR: null Email was triggered for: Failure - Any Sending email for trigger: Failure - Any Installing C:\Jenkins-slave\tools\hudson.model.JDK\jdk8\jdk.exe [jdk8] $ C:\Jenkins-slave\tools\hudson.model.JDK\jdk8\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=C:\Jenkins-slave\tools\hudson.model.JDK\jdk8 '/L \"C:\Jenkins-slave\tools\hudson.model.JDK\jdk8\jdk.exe.install.log\"' Failed to install JDK. Exit code=-80 Error retrieving environment vars: remote file operation failed: C:\Jenkins-slave\tools\hudson.model.JDK\jdk8 at hudson.remoting.Channel@77e302e6:slave-stethu Sending email to: notify-ci@company.com Started calculate disk usage of build Finished Calculation of disk usage of build in 0 seconds Started calculate disk usage of workspace Finished Calculation of disk usage of workspace in 0 seconds Finished: FAILURE Running the same maven job with jdk7 required succeeds on the same slave: Started by user anonymous Building remotely on slave-stethu in workspace C:\Jenkins-slave\workspace\MyJob Installing JDK jdk-7u67-oth-JPR Downloading JDK from http://download.oracle.com/otn-pub/java/jdk/7u67-b01/jdk-7u67-windows-x64.exe Downloading 135998368bytes Installing C:\Jenkins-slave\tools\hudson.model.JDK\jdk7\jdk.exe [jdk7] $ C:\Jenkins-slave\tools\hudson.model.JDK\jdk7\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=C:\Jenkins-slave\tools\hudson.model.JDK\jdk7 '/L \"C:\Jenkins-slave\tools\hudson.model.JDK\jdk7\jdk.exe.install.log\"' Cleaning local Directory trunk [...]
          Oleg Nenashev made changes -
          Component/s New: core [ 15593 ]
          Component/s New: remoting [ 15489 ]
          Component/s Original: slave-setup-plugin [ 15929 ]

          Similar error using Jenkins 1.580.1 and JDK 1.8u25 (JDK 1.7u72 works)

          [EnvInject] - Loading node environment variables.
          Installing C:\Users\Administrator\jenkins\tools\hudson.model.JDK\JDK18Auto\jdk.exe
          [JDK18Auto] $ C:\Users\Administrator\jenkins\tools\hudson.model.JDK\JDK18Auto\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=C:\Users\Administrator\jenkins\tools\hudson.model.JDK\JDK18Auto '/L \"C:\Users\Administrator\jenkins\tools\hudson.model.JDK\JDK18Auto\jdk.exe.install.log\"'
          Failed to install JDK. Exit code=-80
          ERROR: SEVERE ERROR occurs
          org.jenkinsci.lib.envinject.EnvInjectException: hudson.AbortException
          	at org.jenkinsci.plugins.envinject.service.EnvInjectVariableGetter.getBuildVariables(EnvInjectVariableGetter.java:84)
          	at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironmentWithoutJobPropertyObject(EnvInjectListener.java:231)
          	at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironment(EnvInjectListener.java:46)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:587)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:491)
          	at hudson.model.Run.execute(Run.java:1745)
          	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
          	at hudson.model.ResourceController.execute(ResourceController.java:89)
          	at hudson.model.Executor.run(Executor.java:240)
          Caused by: hudson.AbortException
          	at hudson.tools.JDKInstaller.install(JDKInstaller.java:277)
          	at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:141)
          	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68)
          	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107)
          	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:205)
          	at hudson.model.JDK.forNode(JDK.java:130)
          	at org.jenkinsci.plugins.envinject.service.EnvInjectVariableGetter.getBuildVariables(EnvInjectVariableGetter.java:79)
          	... 8 more
          

          Giacomo Boccardo added a comment - Similar error using Jenkins 1.580.1 and JDK 1.8u25 (JDK 1.7u72 works) [EnvInject] - Loading node environment variables. Installing C:\Users\Administrator\jenkins\tools\hudson.model.JDK\JDK18Auto\jdk.exe [JDK18Auto] $ C:\Users\Administrator\jenkins\tools\hudson.model.JDK\JDK18Auto\jdk.exe /s ADDLOCAL= "ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=C:\Users\Administrator\jenkins\tools\hudson.model.JDK\JDK18Auto '/L \ "C:\Users\Administrator\jenkins\tools\hudson.model.JDK\JDK18Auto\jdk.exe.install.log\" ' Failed to install JDK. Exit code=-80 ERROR: SEVERE ERROR occurs org.jenkinsci.lib.envinject.EnvInjectException: hudson.AbortException at org.jenkinsci.plugins.envinject.service.EnvInjectVariableGetter.getBuildVariables(EnvInjectVariableGetter.java:84) at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironmentWithoutJobPropertyObject(EnvInjectListener.java:231) at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironment(EnvInjectListener.java:46) at hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:587) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:491) at hudson.model.Run.execute(Run.java:1745) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) Caused by: hudson.AbortException at hudson.tools.JDKInstaller.install(JDKInstaller.java:277) at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:141) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:205) at hudson.model.JDK.forNode(JDK.java:130) at org.jenkinsci.plugins.envinject.service.EnvInjectVariableGetter.getBuildVariables(EnvInjectVariableGetter.java:79) ... 8 more

          Niels Dybdahl added a comment - - edited

          Similar error using Jenkins 1.567 and JDK 1.8u31:

          [EnvInject] - Loading node environment variables.
          Installing c:\programs\jenkins\slave\tools\hudson.model.JDK\JDK_8\jdk.exe
          [JDK_8] $ c:\programs\jenkins\slave\tools\hudson.model.JDK\JDK_8\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=c:\programs\jenkins\slave\tools\hudson.model.JDK\JDK_8 '/L \"c:\programs\jenkins\slave\tools\hudson.model.JDK\JDK_8\jdk.exe.install.log\"'
          Failed to install JDK. Exit code=-80
          ERROR: SEVERE ERROR occurs
          org.jenkinsci.lib.envinject.EnvInjectException: hudson.AbortException
          	at org.jenkinsci.plugins.envinject.service.EnvInjectVariableGetter.getBuildVariables(EnvInjectVariableGetter.java:84)
          	at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironmentWithoutJobPropertyObject(EnvInjectListener.java:231)
          	at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironment(EnvInjectListener.java:46)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:581)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:487)
          	at hudson.model.Run.execute(Run.java:1710)
          	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          	at hudson.model.ResourceController.execute(ResourceController.java:88)
          	at hudson.model.Executor.run(Executor.java:234)
          Caused by: hudson.AbortException
          	at hudson.tools.JDKInstaller.install(JDKInstaller.java:276)
          	at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:140)
          	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61)
          	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107)
          	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:204)
          	at hudson.model.JDK.forNode(JDK.java:123)
          	at org.jenkinsci.plugins.envinject.service.EnvInjectVariableGetter.getBuildVariables(EnvInjectVariableGetter.java:79)
          	... 8 more
          

          Niels Dybdahl added a comment - - edited Similar error using Jenkins 1.567 and JDK 1.8u31: [EnvInject] - Loading node environment variables. Installing c:\programs\jenkins\slave\tools\hudson.model.JDK\JDK_8\jdk.exe [JDK_8] $ c:\programs\jenkins\slave\tools\hudson.model.JDK\JDK_8\jdk.exe /s ADDLOCAL= "ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=c:\programs\jenkins\slave\tools\hudson.model.JDK\JDK_8 '/L \ "c:\programs\jenkins\slave\tools\hudson.model.JDK\JDK_8\jdk.exe.install.log\" ' Failed to install JDK. Exit code=-80 ERROR: SEVERE ERROR occurs org.jenkinsci.lib.envinject.EnvInjectException: hudson.AbortException at org.jenkinsci.plugins.envinject.service.EnvInjectVariableGetter.getBuildVariables(EnvInjectVariableGetter.java:84) at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironmentWithoutJobPropertyObject(EnvInjectListener.java:231) at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironment(EnvInjectListener.java:46) at hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:581) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:487) at hudson.model.Run.execute(Run.java:1710) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:234) Caused by: hudson.AbortException at hudson.tools.JDKInstaller.install(JDKInstaller.java:276) at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:140) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:204) at hudson.model.JDK.forNode(JDK.java:123) at org.jenkinsci.plugins.envinject.service.EnvInjectVariableGetter.getBuildVariables(EnvInjectVariableGetter.java:79) ... 8 more

          Niels Dybdahl added a comment -

          I tried running the jdk.exe without the quotes:

          c:\programs\jenkins\slave\tools\hudson.model.JDK\JDK_8\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=c:\programs\jenkins\slave\tools\hudson.model.JDK\JDK_8 /L c:\programs\jenkins\slave\tools\hudson.model.JDK\JDK_8\jdk.exe.install.log
          

          That did not work either. I got a log file, but nothing was installed.
          I then tried running it without the log parameter:

          c:\programs\jenkins\slave\tools\hudson.model.JDK\JDK_8\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=c:\programs\jenkins\slave\tools\hudson.model.JDK\JDK_8
          

          That worked. But when I then ran my Jenkins project, it just deleted the JDK, downloaded it and tried to run the original command.
          Maybe there is a database field somewhere that remembers if the JDK has been installed on the slave or not. If that could be set to installed, then we would have a workaround.

          Niels Dybdahl added a comment - I tried running the jdk.exe without the quotes: c:\programs\jenkins\slave\tools\hudson.model.JDK\JDK_8\jdk.exe /s ADDLOCAL= "ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=c:\programs\jenkins\slave\tools\hudson.model.JDK\JDK_8 /L c:\programs\jenkins\slave\tools\hudson.model.JDK\JDK_8\jdk.exe.install.log That did not work either. I got a log file, but nothing was installed. I then tried running it without the log parameter: c:\programs\jenkins\slave\tools\hudson.model.JDK\JDK_8\jdk.exe /s ADDLOCAL= "ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=c:\programs\jenkins\slave\tools\hudson.model.JDK\JDK_8 That worked. But when I then ran my Jenkins project, it just deleted the JDK, downloaded it and tried to run the original command. Maybe there is a database field somewhere that remembers if the JDK has been installed on the slave or not. If that could be set to installed, then we would have a workaround.
          Niels Dybdahl made changes -
          Link New: This issue is related to JENKINS-5408 [ JENKINS-5408 ]
          Niels Dybdahl made changes -
          Link New: This issue is related to JENKINS-15945 [ JENKINS-15945 ]

          Niels Dybdahl added a comment -

          Updated today to Jenkins 1.602 and then I could install JDK8 on the windows slaves.
          Strangely it rebooted the slave in the first two attempts, but in the third attempt it worked.

          Niels Dybdahl added a comment - Updated today to Jenkins 1.602 and then I could install JDK8 on the windows slaves. Strangely it rebooted the slave in the first two attempts, but in the third attempt it worked.

            kohsuke Kohsuke Kawaguchi
            nikem Nikita Salnikov-Tarnovski
            Votes:
            7 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated: