Open timja opened 9 years ago
Please attach the file JENKINS_HOME/updates/hudson.tools.JDKInstaller.
Here's the file from one of two Linux servers on which I observed the same defect.
NB Jenkins was installed using "yum install jenkins".
Do you log requests to Jenkins? It seems it used the regular update center JSON for JDK installers. Would be interesting to see how this happened.
FWIW I experienced something similar (mixup of various client downloaded DownloadService files) on Oct 28 2014 and Feb 10 2015. It's annoying as hell.
For me, the fix once this happens is:
Manage Jenkins, Script Console:
hudson.model.DownloadService.signatureCheck = false hudson.model.DownloadService.Downloadable.all().each { it.updateNow() } hudson.model.DownloadService.signatureCheck = true return
Then go to Manage Jenkins, Configure Jenkins, and make sure that all tool installers point to the correct versions. Change and save if necessary.
It may even be necessary to verify that all tools on all slaves are actually correct, e.g. there may be a Maven in the folder containing auto-installed Ant binaries.
A possible solution would be to disable browser downloads of update center metadata (Manage Jenkins, Configure Jenkins, Download Preferences, disable Use browser). This may actually result in Jenkins not receiving any updates to tool versions though (not sure about that).
Thanks for the last comment. Interesting that this happened simultaneously on two different installations, one of which has NEVER had a JDK installed previously. We only noticed the problem because we wanted to build a Java application for the first time.
I checked the access log but I am unsure what to look for. We have Apache access logs showing every call to the Jenkins URL from outside the box, but of course if it's internally calling itself on port 8080 then this will be invisible. However, I have discovered the relevant archived Jenkins log and attach this for information, together with the filtered Apache access log (showing just accesses to /jenkins.*) for the relevant date range. There are a number of calls to /jenkins/descriptorByName/hudson.tools.JDKInstaller/checkId and similar URLs in the file.
I won't try the script approach described above - we have a workaround of manually adding the JDK installer file to the cache.
Hello,
I think these are similar issues where Jenkins is unable to download the JDK.
Installing JDK jdk-8u141-oth-JPR
Downloading JDK from http://download.oracle.com/otn/java/jdk/8u141-b15/336fa29ff2bb4ef291e347e091f7f4a7/jdk-8u141-windows-i586.exe
ERROR: Step ‘E-mail Notification’ aborted due to exception:
java.io.IOException: Failed to request http://download.oracle.com/otn/java/jdk/8u141-b15/336fa29ff2bb4ef291e347e091f7f4a7/jdk-8u141-windows-i586.exe exit code=503
at hudson.tools.JDKInstaller.locate(JDKInstaller.java:477)
at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:138)
at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:72)
at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
Will there a fix soon for this issue?
Kind Regards,
Maria Sabastian
In Manage Jenkins / Configure System, it is no longer possible to view a pull-down list of JDK versions when "Install from java.sun.com" is selected. Instead, there is a text box into which the version must be typed.
It turns out that only values of "version" corresponding to the names of files under ~jenkins/cache/jdks/LINUX/amd64 are valid. I tried upgrading from 7u72 to 7u75 by altering the version string and this is what happened when I tried to run the build:
Installing JDK jdk-7u75-oth-JPR
java.io.IOException: JDK data is empty.
at hudson.tools.JDKInstaller.locate(JDKInstaller.java:361)
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)
PS by manually downloading the latest JDK gz file into the cache folder and renaming it to jdk-7u75-oth-JPR, the above build then works.
Originally reported by immohuneke, imported from: Auto-installer for JDK no longer works