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

Installing JDK on Windows Slave 8.1

    Details

    • Similar Issues:

      Description

      It seems that the automatic installation of a JDK doesn't work anymore (at least, on Windows 8.1 Pro).

      The error is:

      Installing C:\jenkins\tools\hudson.model.JDK\JDK17Auto\jdk.exe
      [JDK17Auto] $ C:\jenkins\tools\hudson.model.JDK\JDK17Auto\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=C:\jenkins\tools\hudson.model.JDK\JDK17Auto /L C:\jenkins\tools\hudson.model.JDK\install4997222534011847136log
      Failed to install JDK. Exit code=1,618
      ERROR: SEVERE ERROR occurs
      org.jenkinsci.lib.envinject.EnvInjectException: hudson.AbortException
      	at org.jenkinsci.plugins.envinject.service.EnvInjectVariableGetter.getBuildVariables(EnvInjectVariableGetter.java:91)
      	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:574)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494)
      	at hudson.model.Run.execute(Run.java:1738)
      	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:381)
      Caused by: hudson.AbortException
      	at hudson.tools.JDKInstaller.install(JDKInstaller.java:279)
      	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:86)
      	... 8 more
      

      If I execute the command

      C:\jenkins\tools\hudson.model.JDK\JDK17Auto\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=C:\jenkins\tools\hudson.model.JDK\JDK17Auto /L
      

      manually I see Windows Installer "man" instructions, from which I guess that "/s" has been replaced by "/quiet".

        Attachments

          Activity

          Hide
          danielbeck Daniel Beck added a comment -
          Show
          danielbeck Daniel Beck added a comment - Analysis contradicts http://docs.oracle.com/javase/7/docs/webnotes/install/windows/jdk-installation-windows.html , maybe that doc is outdated?
          Hide
          jhack Giacomo Boccardo added a comment - - edited

          I cannot reproduce the error.
          It has been probably solved by one of Jenkins' updates I installed so far.

          However, I need to run the slave agent with administrative privileges to avoid:

          org.jenkinsci.lib.envinject.EnvInjectException: java.io.IOException: Cannot run program "C:\jenkins\tools\hudson.model.JDK\JDK17AutoPerTestareInstallazioneSuWindows\jdk.exe" (in directory "C:\jenkins\tools\hudson.model.JDK\JDK17AutoPerTestareInstallazioneSuWindows"): CreateProcess error=740, The requested operation requires elevation
          	at org.jenkinsci.plugins.envinject.service.EnvInjectVariableGetter.getBuildVariables(EnvInjectVariableGetter.java:91)
          	at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironmentWithoutJobPropertyObject(EnvInjectListener.java:233)
          	at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironment(EnvInjectListener.java:46)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:575)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:495)
          	at hudson.model.Run.execute(Run.java:1741)
          	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
          	at hudson.model.ResourceController.execute(ResourceController.java:98)
          	at hudson.model.Executor.run(Executor.java:408)
          Caused by: java.io.IOException: Cannot run program "C:\jenkins\tools\hudson.model.JDK\JDK17AutoPerTestareInstallazioneSuWindows\jdk.exe" (in directory "C:\jenkins\tools\hudson.model.JDK\JDK17AutoPerTestareInstallazioneSuWindows"): CreateProcess error=740, The requested operation requires elevation
          	at java.lang.ProcessBuilder.start(Unknown Source)
          	at hudson.Proc$LocalProc.<init>(Proc.java:244)
          	at hudson.Proc$LocalProc.<init>(Proc.java:216)
          	at hudson.Launcher$LocalLauncher.launch(Launcher.java:816)
          	at hudson.Launcher$ProcStarter.start(Launcher.java:382)
          	at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1149)
          	at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1114)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:120)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          	at hudson.remoting.Request$2.run(Request.java:326)
          	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
          	at java.util.concurrent.FutureTask.run(Unknown Source)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          	at hudson.remoting.Engine$1$1.run(Engine.java:62)
          	at java.lang.Thread.run(Unknown Source)
          	at ......remote call to Jenkins-win(Native Method)
          	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
          	at hudson.remoting.UserResponse.retrieve(UserRequest.java:220)
          	at hudson.remoting.Channel.call(Channel.java:781)
          	at hudson.Launcher$RemoteLauncher.launch(Launcher.java:929)
          	at hudson.Launcher$ProcStarter.start(Launcher.java:382)
          	at hudson.Launcher$ProcStarter.join(Launcher.java:389)
          	at hudson.tools.JDKInstaller.install(JDKInstaller.java:268)
          	at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:141)
          	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68)
          	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:108)
          	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
          	at hudson.model.JDK.forNode(JDK.java:132)
          	at org.jenkinsci.plugins.envinject.service.EnvInjectVariableGetter.getBuildVariables(EnvInjectVariableGetter.java:86)
          	... 8 more
          Caused by: java.io.IOException: CreateProcess error=740, The requested operation requires elevation
          	at java.lang.ProcessImpl.create(Native Method)
          	at java.lang.ProcessImpl.<init>(Unknown Source)
          	at java.lang.ProcessImpl.start(Unknown Source)
          	at java.lang.ProcessBuilder.start(Unknown Source)
          	at hudson.Proc$LocalProc.<init>(Proc.java:244)
          	at hudson.Proc$LocalProc.<init>(Proc.java:216)
          	at hudson.Launcher$LocalLauncher.launch(Launcher.java:816)
          	at hudson.Launcher$ProcStarter.start(Launcher.java:382)
          	at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1149)
          	at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1114)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:120)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          	at hudson.remoting.Request$2.run(Request.java:326)
          	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
          	at java.util.concurrent.FutureTask.run(Unknown Source)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          	at hudson.remoting.Engine$1$1.run(Engine.java:62)
          	at java.lang.Thread.run(Unknown Source)
          

          Is it the expected behavior?

          Show
          jhack Giacomo Boccardo added a comment - - edited I cannot reproduce the error. It has been probably solved by one of Jenkins' updates I installed so far. However, I need to run the slave agent with administrative privileges to avoid: org.jenkinsci.lib.envinject.EnvInjectException: java.io.IOException: Cannot run program "C:\jenkins\tools\hudson.model.JDK\JDK17AutoPerTestareInstallazioneSuWindows\jdk.exe" (in directory "C:\jenkins\tools\hudson.model.JDK\JDK17AutoPerTestareInstallazioneSuWindows"): CreateProcess error=740, The requested operation requires elevation at org.jenkinsci.plugins.envinject.service.EnvInjectVariableGetter.getBuildVariables(EnvInjectVariableGetter.java:91) at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironmentWithoutJobPropertyObject(EnvInjectListener.java:233) at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironment(EnvInjectListener.java:46) at hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:575) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:495) at hudson.model.Run.execute(Run.java:1741) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Caused by: java.io.IOException: Cannot run program "C:\jenkins\tools\hudson.model.JDK\JDK17AutoPerTestareInstallazioneSuWindows\jdk.exe" (in directory "C:\jenkins\tools\hudson.model.JDK\JDK17AutoPerTestareInstallazioneSuWindows"): CreateProcess error=740, The requested operation requires elevation at java.lang.ProcessBuilder.start(Unknown Source) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:816) at hudson.Launcher$ProcStarter.start(Launcher.java:382) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1149) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1114) at hudson.remoting.UserRequest.perform(UserRequest.java:120) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:62) at java.lang.Thread.run(Unknown Source) at ......remote call to Jenkins-win(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416) at hudson.remoting.UserResponse.retrieve(UserRequest.java:220) at hudson.remoting.Channel.call(Channel.java:781) at hudson.Launcher$RemoteLauncher.launch(Launcher.java:929) at hudson.Launcher$ProcStarter.start(Launcher.java:382) at hudson.Launcher$ProcStarter.join(Launcher.java:389) at hudson.tools.JDKInstaller.install(JDKInstaller.java:268) at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:141) at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68) at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:108) at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206) at hudson.model.JDK.forNode(JDK.java:132) at org.jenkinsci.plugins.envinject.service.EnvInjectVariableGetter.getBuildVariables(EnvInjectVariableGetter.java:86) ... 8 more Caused by: java.io.IOException: CreateProcess error=740, The requested operation requires elevation at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) at java.lang.ProcessBuilder.start(Unknown Source) at hudson.Proc$LocalProc.<init>(Proc.java:244) at hudson.Proc$LocalProc.<init>(Proc.java:216) at hudson.Launcher$LocalLauncher.launch(Launcher.java:816) at hudson.Launcher$ProcStarter.start(Launcher.java:382) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1149) at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1114) at hudson.remoting.UserRequest.perform(UserRequest.java:120) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:326) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:62) at java.lang.Thread.run(Unknown Source) Is it the expected behavior?
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          "The requested operation requires elevation". Yes, your agent user just does not have enough permissions to do it without additional approval

          Show
          oleg_nenashev Oleg Nenashev added a comment - "The requested operation requires elevation". Yes, your agent user just does not have enough permissions to do it without additional approval
          Hide
          nadeem_shaikh Nadeem Shaikh added a comment -

          I am facing similar issue.
          Building in workspace C:\Users\Nadeem\.jenkins\workspace\Deploy simple-maven-dep
          Installing C:\Users\Nadeem\.jenkins\tools\hudson.model.JDK\JAVA_8\jdk.exe
          [JAVA_8] $ C:\Users\Nadeem\.jenkins\tools\hudson.model.JDK\JAVA_8\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=C:\Users\Nadeem\.jenkins\tools\hudson.model.JDK\JAVA_8 /L C:\Users\Nadeem\.jenkins\tools\hudson.model.JDK\install1240569982649548823log
          java.io.IOException: CreateProcess error=740, The requested operation requires elevation
          at java.lang.ProcessImpl.create(Native Method)
          at java.lang.ProcessImpl.<init>(Unknown Source)
          at java.lang.ProcessImpl.start(Unknown Source)
          Environment:

          Windows 10 Home

          Tomcat: Tried on Apache Tomcat/7.0.56 and Apache Tomcat/8.0.36

          JAVA: 1.8.0_151-b12

          Jenkins: 2.89.2

          Configuration:

          Maven Project

           Jenkins Configure Global Security >Agents ->TCP port for JNLP agents = random

           

          Show
          nadeem_shaikh Nadeem Shaikh added a comment - I am facing similar issue. Building in workspace C:\Users\Nadeem\.jenkins\workspace\Deploy simple-maven-dep Installing C:\Users\Nadeem\.jenkins\tools\hudson.model.JDK\JAVA_8\jdk.exe [JAVA_8] $ C:\Users\Nadeem\.jenkins\tools\hudson.model.JDK\JAVA_8\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=C:\Users\Nadeem\.jenkins\tools\hudson.model.JDK\JAVA_8 /L C:\Users\Nadeem\.jenkins\tools\hudson.model.JDK\install1240569982649548823log java.io.IOException: CreateProcess error=740, The requested operation requires elevation at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) Environment: Windows 10 Home Tomcat: Tried on Apache Tomcat/7.0.56 and Apache Tomcat/8.0.36 JAVA: 1.8.0_151-b12 Jenkins: 2.89.2 Configuration: Maven Project   Jenkins   >  Configure Global Security   >Agents ->TCP port for JNLP agents = random  
          Hide
          nadeem_shaikh Nadeem Shaikh added a comment -

          I was able to resolve this by running the cmd as administrator and starting the tomcat from cmd.

          Show
          nadeem_shaikh Nadeem Shaikh added a comment - I was able to resolve this by running the cmd as administrator and starting the tomcat from cmd.

            People

            • Assignee:
              Unassigned
              Reporter:
              jhack Giacomo Boccardo
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: