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

Autoinstall JDK from java.sun.com no longer works

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • core
    • None

      Just noticed that the autoinstallation of JDK from java.sun.com stopped working recently. I tried various Jenkins instances running here and they all have the same problem; versions from 1.415 to 1.423 on Linux.

          [JENKINS-10511] Autoinstall JDK from java.sun.com no longer works

          Patrick Renaud created issue -

          pmv added a comment - - edited

          On top of this, if you go into 'Manage Jenkins', change anything (even something unrelated to the JDK), and save, it will change your existing JDK ids blank! For example, I had:
          <hudson.tools.JDKInstaller>
          <id>jdk-6u21-oth-JPR@CDS-CDS_Developer</id>
          <acceptLicense>true</acceptLicense>
          </hudson.tools.JDKInstaller>
          which was replaced by
          <hudson.tools.JDKInstaller>
          <id></id>
          <acceptLicense>true</acceptLicense>
          </hudson.tools.JDKInstaller>

          (empty <id> tag). So the next time a build ran on my slaves, Jenkins removed the existing JDK install and all the builds started failing. When I fixed the tag, and reloaded Jenkins, the autoinstaller tried to run, but was failing because Windows thought the JDK was already installed. What I ended up having to do was.
          1) Stop the slave
          2) Log in to the slave machine
          3) Copy the JDK files back to the /tools directory
          4) Remove the JDK through Add/Remove programs (had to do step 3 or this wouldn't work)
          5) Start the slave

          After that the autoinstaller was able to run successfully and re-install the JDK. A huge pain, but luckily we don't have too many slaves. Maybe there was an easier way to fix it, but this worked for me.

          In any case, if you change anything in 'Manage Jenkins' before this is fixed, verify your JDK installs have valid <id> tags. (I'm not sure how the save process works, but maybe in the future don't allow a blank value in this tag?) Another suggestion would be to break up the 'Manage Jenkins' page so one 'Save' doesn't have the potential of affecting so much. Finally, verify that if a JDK is removed by jenkins it runs the uninstaller if on windows.

          I've been using Jenkins for quite a while and this is the first time it really gave me a scare! Hopefully others can avoid this one.

          pmv added a comment - - edited On top of this, if you go into 'Manage Jenkins', change anything (even something unrelated to the JDK), and save, it will change your existing JDK ids blank! For example, I had: <hudson.tools.JDKInstaller> <id>jdk-6u21-oth-JPR@CDS-CDS_Developer</id> <acceptLicense>true</acceptLicense> </hudson.tools.JDKInstaller> which was replaced by <hudson.tools.JDKInstaller> <id></id> <acceptLicense>true</acceptLicense> </hudson.tools.JDKInstaller> (empty <id> tag). So the next time a build ran on my slaves, Jenkins removed the existing JDK install and all the builds started failing. When I fixed the tag, and reloaded Jenkins, the autoinstaller tried to run, but was failing because Windows thought the JDK was already installed. What I ended up having to do was. 1) Stop the slave 2) Log in to the slave machine 3) Copy the JDK files back to the /tools directory 4) Remove the JDK through Add/Remove programs (had to do step 3 or this wouldn't work) 5) Start the slave After that the autoinstaller was able to run successfully and re-install the JDK. A huge pain, but luckily we don't have too many slaves. Maybe there was an easier way to fix it, but this worked for me. In any case, if you change anything in 'Manage Jenkins' before this is fixed, verify your JDK installs have valid <id> tags. (I'm not sure how the save process works, but maybe in the future don't allow a blank value in this tag?) Another suggestion would be to break up the 'Manage Jenkins' page so one 'Save' doesn't have the potential of affecting so much. Finally, verify that if a JDK is removed by jenkins it runs the uninstaller if on windows. I've been using Jenkins for quite a while and this is the first time it really gave me a scare! Hopefully others can avoid this one.
          Andrew Bayer made changes -
          Assignee New: Kohsuke Kawaguchi [ kohsuke ]
          Priority Original: Critical [ 2 ] New: Blocker [ 1 ]

          Andrew Bayer added a comment -

          Pretty sure that the JDK download pages got reworked by Oracle last night as part of the Java 7 release. This is going to require rewriting both the crawler that populates the JDK list (which is now empty) and the actual download/installation logic, I believe.

          Andrew Bayer added a comment - Pretty sure that the JDK download pages got reworked by Oracle last night as part of the Java 7 release. This is going to require rewriting both the crawler that populates the JDK list (which is now empty) and the actual download/installation logic, I believe.
          Andrew Bayer made changes -
          Link New: This issue is duplicated by JENKINS-10194 [ JENKINS-10194 ]

          Yes, they've changed the way bits are made available for download.

          It's now listed in pages linked from http://www.oracle.com/technetwork/java/archive-139210.html

          The backend and the the core needs to be both updated.

          Kohsuke Kawaguchi added a comment - Yes, they've changed the way bits are made available for download. It's now listed in pages linked from http://www.oracle.com/technetwork/java/archive-139210.html The backend and the the core needs to be both updated.

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          list-ant/pom.xml
          list-jdk/pom.xml
          list-jdk/src/main/groovy/App.groovy
          list-jdk/src/main/java/ListJDK.java
          pom.xml
          http://jenkins-ci.org/commit/backend-crawler/729782d518d523f3348a9e8f53d6c60336b0ed48
          Log:
          JENKINS-10511 updated the backend that builds JDK listing.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: list-ant/pom.xml list-jdk/pom.xml list-jdk/src/main/groovy/App.groovy list-jdk/src/main/java/ListJDK.java pom.xml http://jenkins-ci.org/commit/backend-crawler/729782d518d523f3348a9e8f53d6c60336b0ed48 Log: JENKINS-10511 updated the backend that builds JDK listing.
          Kohsuke Kawaguchi made changes -
          Link New: This issue is duplicated by JENKINS-10176 [ JENKINS-10176 ]

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/cb2ced734edc6ace59f5efd8dadbdaed0588a90d
          Log:
          [FIXED JENKINS-10511] commits leading up to this is for making JDK installer work again

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html http://jenkins-ci.org/commit/jenkins/cb2ced734edc6ace59f5efd8dadbdaed0588a90d Log: [FIXED JENKINS-10511] commits leading up to this is for making JDK installer work again
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

            kohsuke Kohsuke Kawaguchi
            prenaud76 Patrick Renaud
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: