-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Windows7
-
Powered by SuggestiMate
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.
- is related to
-
JENKINS-5408 Quoting Issue with JDK Installer with Windows Slave
-
- Resolved
-
-
JENKINS-15945 Auto-install of JDK fails on Windows Slave
-
- Resolved
-
-
JENKINS-34012 Fail to automatically install JDK 1.8.0_77
-
- Closed
-
[JENKINS-23366] jdk8u5 installation fails on windows agents
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 [...]
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
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
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.
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.
I saw exit code 1,619 not -80.
Started by user tomcat Building remotely on XXX in workspace d:\jenkins\slave\workspace\WebGoat-Legacy Installing d:\jenkins\slave\tools\hudson.model.JDK\c_jenkins_jdk\jdk.exe [c_jenkins_jdk] $ d:\jenkins\slave\tools\hudson.model.JDK\c_jenkins_jdk\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=d:\jenkins\slave\tools\hudson.model.JDK\c_jenkins_jdk /L d:\jenkins\slave\tools\hudson.model.JDK\install4927468808054487502log Failed to install JDK. Exit code=1,619 ERROR: null Finished: FAILURE
Checking the Event Viewer of the slave node showed a path to the installer that did not exist after the failure,
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> - <System> <Provider Name="MsiInstaller" /> <EventID Qualifiers="0">1040</EventID> <Level>4</Level> <Task>0</Task> <Keywords>0x80000000000000</Keywords> <TimeCreated SystemTime="2015-09-08T22:36:31.000000000Z" /> <EventRecordID>39478</EventRecordID> <Channel>Application</Channel> <Computer>XXX.YYY</Computer> <Security UserID="S-1-5-18" /> </System> - <EventData> <Data>C:\Windows\system32\config\systemprofile\AppData\LocalLow\Oracle\Java\jdk1.8.0_60\jdk1.8.0_60.msi</Data> <Data>17912</Data> <Data>(NULL)</Data> <Data>(NULL)</Data> <Data>(NULL)</Data> <Data>(NULL)</Data> <Data /> </EventData> </Event>
A similarly versioned msi file resided in the current user's directory not SYSTEM's. My node's slave runs in a service as SYSTEM.
$ find /cygdrive/c/Users/UUUU/AppData/ -iname "j*.msi" -ls 7599824371459631 21144 -rwxrwx--- 1 Administrators Domain Users 21649339 Aug 26 15:06 /cygdrive/c/Users/UUUU/AppData/LocalLow/Oracle/Java/jre1.8.0_60/jre1.8.0_60patch.msi 8162774324880945 23244 -rwxrwx--- 1 Administrators Domain Users 23798144 Aug 26 15:06 /cygdrive/c/Users/UUUU/AppData/LocalLow/Oracle/Java/jre1.8.0_60_x64/jre1.8.0_60patch64.msi
Changing the service to run as my domain account appears to have progressed further (repeating the command manually without the /s switch showed that it stopped with exit code -1 due to another unfinished installation). This gives a quick work-around that will require periodic password updates in the service due to our group policy.
I used another work-around avoiding auto-install altogether. For this I added a JDK installation named jdk-per-node in the Jenkins configuration page /configure, left its JAVA_HOME parameter empty and the Install automatically checkbox unchecked. Then I proceeded to the slave node configuration page /computer/FOO/configure, checked Tool Locations checkbox, selected (JDK) jdk-per-node and typed in a directory containing a manually installed JDK on FOO.
Any plan to resolve this issue?
The error is indeed due to spaces in the quoted path after the switch for the log file. If the path to the log file doesnt contain spaces, the command works fine.
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