Cannot autoinstall jdk 8 on my Jenkins, don't know JDK ID. Please help!

1,764 views
Skip to first unread message

Viktorija Dzedzej

unread,
Sep 9, 2015, 11:35:01 AM9/9/15
to Jenkins Users
Using strategy: Default
Last Built Revision: Revision d37b1d8bfb810c37bab726ff14444f1b733b407b (origin/master)
Installing JDK  Java SE Development Kit 8u60
java.io.IOException: JDK data is empty.
	at hudson.tools.JDKInstaller.locate(JDKInstaller.java:418)
	at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:134)
	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 hudson.model.AbstractProject.getEnvironment(AbstractProject.java:351)
	at hudson.model.Run.getEnvironment(Run.java:2234)
	at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:917)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:933)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1270)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531)
	at hudson.model.Run.execute(Run.java:1741)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:374)
Finished: FAILURE

Victor Martinez

unread,
Sep 9, 2015, 1:53:08 PM9/9/15
to Jenkins Users
Have you tried to upgrade your Jenkins version? It seems there were some tickets (which they are already solved):

Have you configured your global settings and configure the JDK installation setup? Can you choose any specific JDK version? 

Cheers

Matias Burni

unread,
Jan 26, 2016, 1:24:00 PM1/26/16
to Jenkins Users
Hola Victor! (I'm your "replacement" at King, so weird finding this thread with your comment!!! You're so famous!).

>> NOT RELATED TO this post:
    In fact I have an issue with the "Install from java.sun.com dropdown list, which is now a text box. the /var/lib/jenkins/hudson.tools.JDKInstaller.xml is well configured, but when the file /var/lib/jenkins/updates/hudson.tools.JDKInstaller is systematically deleted. :(

Mark Waite

unread,
Jan 26, 2016, 2:26:42 PM1/26/16
to Jenkins Users
I thought I encountered these types of problems when I changed from one internal JDK version (like JDK 1.8.0_45) to another internal JDK version (like 1.8.0_65).  Unfortunately, I don't remember anything more about it, other than being annoyed that my docker instance with jobs that referenced Oracle download versions of JDK 8 were being broken unexpectedly.

I finally surrendered and switched to hosting a local download location for the JDK.  That has been quite reliable.

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/2dc653af-7bac-4c68-ba2f-be6184a6bca8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matias Burni

unread,
Jan 27, 2016, 4:55:06 AM1/27/16
to Jenkins Users
I found the solution.
The JDK installation is a Jenkins feature, which has 2 main config files which disappeared from the master:
  •  /var/lib/jenkins/updates/hudson.tools.JDKInstaller.json (I recovered the file from http://ftp.icm.edu.pl/packages/jenkins/updates/stable-1.625/updates/hudson.tools.JDKInstaller.json , I had to rework the json file as it was corrupted with some comments. This file contains the available JDK for the dropDown list)
    • IF this file is corrupted Jenkins delete it systematically... that was my issue
  • /var/lib/jenkins/hudson.tools.JDKInstaller.xml (This file contains the credentials of the Oracle user to pull and install the JDKs)
I restored these files, I restarted Jenkins config job and voila!

Victor Martinez

unread,
Jan 27, 2016, 10:39:02 AM1/27/16
to Jenkins Users
Thanks! Great explanation :)
Afaik those files are generated by some magic crawlers: https://github.com/jenkinsci/backend-crawler and pushed those json files into http://mirrors.jenkins-ci.org/updates/updates/ or any other mirrors. But I don't know when those crawers are launched.

Cheers
Reply all
Reply to author
Forward
0 new messages