Issue Type: Bug Bug
Assignee: Unassigned
Components: core
Created: 26/Mar/15 9:00 AM
Description:

I've first created a Windows Slave Service with the slave-agent.jnlp. After this step, the master could succesfully connect to the Windows Slave. Windows Slave is also a Windows Server 2008 R2.

To install the slave as a service, I had to install Java Jre. Did the installation in C:\jenkins_opt\Java\jre1.8.0_40. The Windows Slave Service directory is C:\jenkins_slave.

Then I launched a Jenkins project on the Slave Node. Jenkins first tries to install a Java jdk in the tools directory. For some reason this doesn't seem to work. What happens is that the installation in C:\jenkins_opt\Java\jre1.8.0_40 is deleted and the Windows Slave is rebooted.

After restart, Java installation in C:\jenkins_opt\Java\jre1.8.0_40 is gone and no installation of Java Jdk is done in C:\jenkins_slave\tools\hudson.model.JDK\JDK8u40.

The install...log file in C:\jenkins_slave\tools\hudson.model.JDK is empty.

-------------------------------------------------------------------------------

Console output of Master Jenkins project:

00:00:00.006 Started by user Lieven Cardoen
00:00:00.008 [EnvInject] - Loading node environment variables.
00:00:23.581 Installing C:\jenkins_slave\tools\hudson.model.JDK\JDK8u40\jdk.exe
00:00:23.916 [JDK8u40] $ C:\jenkins_slave\tools\hudson.model.JDK\JDK8u40\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=C:\jenkins_slave\tools\hudson.model.JDK\JDK8u40 /L C:\jenkins_slave\tools\hudson.model.JDK\install3674831485415202650log
00:00:36.081 Failed to install JDK. Exit code=-1
00:00:36.110 ERROR: SEVERE ERROR occurs
00:00:36.111 org.jenkinsci.lib.envinject.EnvInjectException: hudson.AbortException
00:00:36.111 at org.jenkinsci.plugins.envinject.service.EnvInjectVariableGetter.getBuildVariables(EnvInjectVariableGetter.java:91)
00:00:36.111 at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironmentWithoutJobPropertyObject(EnvInjectListener.java:231)
00:00:36.111 at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironment(EnvInjectListener.java:46)
00:00:36.111 at hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:574)
00:00:36.111 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494)
00:00:36.111 at hudson.model.Run.execute(Run.java:1751)
00:00:36.111 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
00:00:36.111 at hudson.model.ResourceController.execute(ResourceController.java:89)
00:00:36.111 at hudson.model.Executor.run(Executor.java:240)
00:00:36.111 Caused by: hudson.AbortException
00:00:36.111 at hudson.tools.JDKInstaller.install(JDKInstaller.java:279)
00:00:36.111 at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:141)
00:00:36.112 at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68)
00:00:36.112 at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107)
00:00:36.112 at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:205)
00:00:36.112 at hudson.model.JDK.forNode(JDK.java:130)
00:00:36.112 at org.jenkinsci.plugins.envinject.service.EnvInjectVariableGetter.getBuildVariables(EnvInjectVariableGetter.java:86)
00:00:36.112 ... 8 more
00:00:36.112
00:00:36.112 Deleting project workspace...
00:00:36.116 Notifying upstream projects of job completion
00:00:36.116 Finished: FAILURE

-------------------------------------------------------------------------------

To get my Slave up and running again, I need to re-install the JRE again (because Jenkins wiped it) and restart the Windows Service. Triggering the Jenkins Job will wip the JRE again and reboot the Windows Slave.

On one of the Windows Slave, after trying a couple of times, suddenly it did work. But I have no idea why in that case it worked. Manually installing the jdk in the tools directory does work. If after installing it manually I trigger the Jenkins project again, then I tries to install the JDK again, and now it does work...

Now in the C:\jenkins_slave\tools\hudson.model.JDK\JDK8u40 there's a .installedByHudson file.

Maybe that the manual install changed a JAVA_HOME environment variable?

-------------------------------------------------------------------------------

Console output Master of the succeeded build:

00:00:00.006 Started by user Lieven Cardoen
00:00:00.009 [EnvInject] - Loading node environment variables.
00:00:13.086 Installing C:\jenkins_slave\tools\hudson.model.JDK\JDK8u40\jdk.exe
00:00:18.730 [JDK8u40] $ C:\jenkins_slave\tools\hudson.model.JDK\JDK8u40\jdk.exe /s ADDLOCAL="ToolsFeature" REBOOT=ReallySuppress INSTALLDIR=C:\jenkins_slave\tools\hudson.model.JDK\JDK8u40 /L C:\jenkins_slave\tools\hudson.model.JDK\install7252311317026251390log
00:00:52.494 Building remotely on SRV-DEV-GPRO-HYP in workspace C:\jenkins_slave\workspace\SRV-DEV-GPRO-HYP-DEPLOY
00:00:52.495
00:00:52.495 Deleting project workspace... Cloning the remote Git repository
00:00:57.031 remote: Counting objects
00:00:57.147 remote: Finding sources
00:00:57.468 remote: Getting sizes
00:00:57.648 Receiving objects
00:01:04.024 Resolving deltas
00:01:07.916 Updating references
00:01:09.244 Checking out Revision 3b887542dc56ae039098da9648f0839ebecf37d6 (refs/remotes/origin/master)
00:01:20.734 First time build. Skipping changelog.
00:01:22.188
00:01:22.188 Deleting project workspace...
00:01:22.225 done
00:01:22.225
00:01:22.227 Notifying upstream projects of job completion
00:01:22.228 Finished: SUCCESS

The log file seems to have vanished... install7252311317026251390log is nowhere to be found.

If you need more log files, information, ... please let me know. I can reproduce this every single time on multiple Windows Slaves.

Kind regards, Lieven Cardoen

Environment: Jenkins 1.606.

Jenkins Master installed on Windows Server 2008 R2.

Jenkins Slave installed on Windows Server 2008 R2.

Java version jre1.8.0_40 on Jenkins Slave.

Project: Jenkins
Labels: slave configuration windows
Priority: Blocker Blocker
Reporter: Lieven Cardoen
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to