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

jdk8u5 installation fails on windows agents

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • core
    • None
    • Windows7

    Description

      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.

      Attachments

        Issue Links

          Activity

            ilatypov Ilguiz Latypov added a comment - - edited

            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>
            
            ilatypov Ilguiz Latypov added a comment - - edited 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>
            ilatypov Ilguiz Latypov added a comment - - edited

            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
            
            ilatypov Ilguiz Latypov added a comment - - edited 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.

            ilatypov Ilguiz Latypov added a comment - 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.

            ilatypov Ilguiz Latypov added a comment - 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 .
            jpmarple JP Marple added a comment -

            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.

            jpmarple JP Marple added a comment - 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.

            People

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

              Dates

                Created:
                Updated: