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

Autoinstall JDK from download.oracle.com no longer works

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

      Just noticed that the autoinstallation of JDK from download.oracle.com stopped working recently. I tried various Jenkins instances running here and they all have the same problem; versions 1.458 on Linux & Windows

      The downloaded 'jdk.exe' or 'jdh.sh' just contains a html page with the note 'Sorry! In order to download products from Oracle Technology
      Network you must agree to the OTN license terms.'

      The error on Windows build is then:

      Installing JDK jdk-7-oth-JPR
      Downloading JDK from http://download.oracle.com/otn/java/jdk/7/jdk-7-windows-i586.exe
      Downloading 5307bytes
      [jdk_1.7.0] $ C:\tools\jenkins\tools\jdk_1.7.0\jdk.exe /s /v /qn /L \"C:\tools\jenkins\tools\jdk_1.7.0\jdk.exe.install.log\" REBOOT=ReallySuppress INSTALLDIR=\"C:\tools\jenkins\tools\jdk_1.7.0\"
      The image file %1 is valid, but is for a machine type other than the current machine
      FATAL: Befehlsausführung fehlgeschlagen
      java.io.IOException: Cannot run program "C:\tools\jenkins\tools\jdk_1.7.0\jdk.exe" (in directory "C:\tools\jenkins\tools\jdk_1.7.0"): CreateProcess error=216, This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher
      ...
      

          [JENKINS-13357] Autoinstall JDK from download.oracle.com no longer works

          chris monster added a comment -

          Any suggested workaround? This is a blocker for us as our builds run on multiple platforms and we can't easily fix a download location.

          chris monster added a comment - Any suggested workaround? This is a blocker for us as our builds run on multiple platforms and we can't easily fix a download location.

          chanti vlad added a comment -

          JENKINS-13435 "fix" in 1.464 did not help with this issue.

          chanti vlad added a comment - JENKINS-13435 "fix" in 1.464 did not help with this issue.

          chanti vlad added a comment - - edited

          JENKINS-13435 is marked as a duplicate and is supposed to be fixed in 1.464.
          I updated my Jenkins installation to 1.464 but JENKINS-13357 still occurs when trying to launch a slave as a service on windows 2008 x64.

          {{Connecting to my.host.name
          Checking if Java exists
          'java' is not recognized as an internal or external command,
          operable program or batch file.
          No Java found. Downloading JDK
          Installing JDK
          Installing C:\tmp2\jenkins_slave\service\jdk.exe
          [jdk] $ C:\tmp2\jenkins_slave\service\jdk.exe /s /v /qn /L \"C:\tmp2\jenkins_slave\service\jdk.exe.install.log\" REBOOT=ReallySuppress INSTALLDIR=\"C:\tmp2\jenkins_slave\service\jdk\"
          This version of C:\tmp2\jenkins_slave\service\jdk.exe is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.
          Failed to install JDK. Exit code=1
          ERROR: Failed to prepare Java
          jcifs.smb.SmbException: The system cannot find the file specified.
          at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:545)
          at jcifs.smb.SmbTransport.send(SmbTransport.java:646)
          at jcifs.smb.SmbSession.send(SmbSession.java:244)
          at jcifs.smb.SmbTree.send(SmbTree.java:119)
          at jcifs.smb.SmbFile.send(SmbFile.java:770)
          at jcifs.smb.SmbFile.open0(SmbFile.java:982)
          at jcifs.smb.SmbFile.open(SmbFile.java:999)
          at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:74)
          at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:66)
          at jcifs.smb.SmbFile.getInputStream(SmbFile.java:2833)
          at hudson.os.windows.WindowsRemoteFileSystem.read(WindowsRemoteFileSystem.java:41)
          at hudson.tools.JDKInstaller.install(JDKInstaller.java:242)
          at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:251)
          at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:200)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
          at java.util.concurrent.FutureTask.run(FutureTask.java:138)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:662)
          Copying jenkins-slave.xml
          Copying slave.jar
          Starting the service

          • NOT DOING ANYTHING AFTER THAT *}}

          chanti vlad added a comment - - edited JENKINS-13435 is marked as a duplicate and is supposed to be fixed in 1.464. I updated my Jenkins installation to 1.464 but JENKINS-13357 still occurs when trying to launch a slave as a service on windows 2008 x64. {{Connecting to my.host.name Checking if Java exists 'java' is not recognized as an internal or external command, operable program or batch file. No Java found. Downloading JDK Installing JDK Installing C:\tmp2\jenkins_slave\service\jdk.exe [jdk] $ C:\tmp2\jenkins_slave\service\jdk.exe /s /v /qn /L \"C:\tmp2\jenkins_slave\service\jdk.exe.install.log\" REBOOT=ReallySuppress INSTALLDIR=\"C:\tmp2\jenkins_slave\service\jdk\" This version of C:\tmp2\jenkins_slave\service\jdk.exe is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher. Failed to install JDK. Exit code=1 ERROR: Failed to prepare Java jcifs.smb.SmbException: The system cannot find the file specified. at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:545) at jcifs.smb.SmbTransport.send(SmbTransport.java:646) at jcifs.smb.SmbSession.send(SmbSession.java:244) at jcifs.smb.SmbTree.send(SmbTree.java:119) at jcifs.smb.SmbFile.send(SmbFile.java:770) at jcifs.smb.SmbFile.open0(SmbFile.java:982) at jcifs.smb.SmbFile.open(SmbFile.java:999) at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:74) at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:66) at jcifs.smb.SmbFile.getInputStream(SmbFile.java:2833) at hudson.os.windows.WindowsRemoteFileSystem.read(WindowsRemoteFileSystem.java:41) at hudson.tools.JDKInstaller.install(JDKInstaller.java:242) at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:251) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:200) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Copying jenkins-slave.xml Copying slave.jar Starting the service NOT DOING ANYTHING AFTER THAT *}}

          mturra added a comment - The url changed from http://download.oracle.com/otn/java/jdk/7u15-b03/jdk-7u15-linux-x64.tar.gz to http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz

          Same problem here:

          Installing JDK jdk-7u40-oth-JPR
          Downloading JDK from http://download.oracle.com/otn/java/jdk/7u40-b43/jdk-7u40-linux-x64.tar.gz
          Downloading 5307bytes
          Installing /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh
          [Sun_JDK_1.7] $ /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh -noregister
          /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 1: html: No such file or directory
          /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 2: head: No such file or directory
          /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 3: title: No such file or directory
          /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 4: META: No such file or directory
          /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 5: link: No such file or directory
          /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 6: link: No such file or directory
          /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 7: $'\r': command not found
          /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 8: body: No such file or directory
          /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 9: div: No such file or directory
          /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 10: table: No such file or directory
          /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 11: tr: No such file or directory
          /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 12: syntax error near unexpected token `<'
          /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 12: ` <td rowspan="2" valign="middle" nowrap><a href="http://www.oracle.com"><img src="/errors/us/assets/oralogo-small.gif" width="154" height="19" hspace="10" vspace="25" border="0" ></a></td>
          '
          ERROR: Failed to install JDK. Exit code=2

          Bruno Medeiros added a comment - Same problem here: Installing JDK jdk-7u40-oth-JPR Downloading JDK from http://download.oracle.com/otn/java/jdk/7u40-b43/jdk-7u40-linux-x64.tar.gz Downloading 5307bytes Installing /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh [Sun_JDK_1.7] $ /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh -noregister /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 1: html: No such file or directory /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 2: head: No such file or directory /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 3: title: No such file or directory /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 4: META: No such file or directory /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 5: link: No such file or directory /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 6: link: No such file or directory /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 7: $'\r': command not found /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 8: body: No such file or directory /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 9: div: No such file or directory /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 10: table: No such file or directory /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 11: tr: No such file or directory /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 12: syntax error near unexpected token `<' /var/lib/jenkins/tools/hudson.model.JDK/Sun_JDK_1.7/jdk.sh: line 12: ` <td rowspan="2" valign="middle" nowrap><a href="http://www.oracle.com"><img src="/errors/us/assets/oralogo-small.gif" width="154" height="19" hspace="10" vspace="25" border="0" ></a></td> ' ERROR: Failed to install JDK. Exit code=2

          As a workaround I download the JDK manually and place it in Jenkins /cache directory. The filenames and location must be adopted according to the existing files. Even though this is a manual step the effort to bring the JDK to several build nodes is reasonable.

          Andreas Mandel added a comment - As a workaround I download the JDK manually and place it in Jenkins /cache directory. The filenames and location must be adopted according to the existing files. Even though this is a manual step the effort to bring the JDK to several build nodes is reasonable.

          chemphill added a comment -

          We just upgraded to 1.556 and cleared out the cache. Looks like this is still happening:

          [EnvInject] - Loading node environment variables.
          Installing JDK jdk-8-oth-JPR
          Downloading JDK from http://download.oracle.com/otn-pub/java/jdk/8-b132/jdk-8-linux-x64.tar.gz
          Downloading 5307bytes
          Installing /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh
          [jdk-cbh] $ /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh -noregister
          /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 1: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: cannot open html: No such file
          /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 2: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: cannot open head: No such file
          /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 3: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: cannot open title: No such file
          /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 3: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: Request: not found
          /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 4: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: cannot open META: No such file
          /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 5: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: cannot open link: No such file
          /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 6: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: cannot open link: No such file
          /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 7: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh:
          : not found
          /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 8: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: cannot open body: No such file
          /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 9: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: cannot open div: No such file
          /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 10: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: cannot open table: No such file
          /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 11: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: cannot open tr: No such file
          /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 12: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: Syntax error: redirection unexpected
          ERROR: SEVERE ERROR occurs

          chemphill added a comment - We just upgraded to 1.556 and cleared out the cache. Looks like this is still happening: [EnvInject] - Loading node environment variables. Installing JDK jdk-8-oth-JPR Downloading JDK from http://download.oracle.com/otn-pub/java/jdk/8-b132/jdk-8-linux-x64.tar.gz Downloading 5307bytes Installing /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh [jdk-cbh] $ /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh -noregister /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 1: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: cannot open html: No such file /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 2: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: cannot open head: No such file /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 3: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: cannot open title: No such file /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 3: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: Request: not found /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 4: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: cannot open META: No such file /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 5: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: cannot open link: No such file /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 6: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: cannot open link: No such file /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 7: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: : not found /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 8: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: cannot open body: No such file /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 9: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: cannot open div: No such file /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 10: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: cannot open table: No such file /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 11: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: cannot open tr: No such file /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: 12: /var/lib/jenkins/tools/hudson.model.JDK/jdk-cbh/jdk.sh: Syntax error: redirection unexpected ERROR: SEVERE ERROR occurs

          Same error here, on an existent working version 1.542 which was working ok, and on a recently installed 1.555....any hint on why has this reappeared? is it an ORACLE issue?

          Roberto Vieira added a comment - Same error here, on an existent working version 1.542 which was working ok, and on a recently installed 1.555....any hint on why has this reappeared? is it an ORACLE issue?

          Liam McGregor added a comment -

          Do you have an example of how the manually downloaded java files names and directories must be?

          Liam McGregor added a comment - Do you have an example of how the manually downloaded java files names and directories must be?

          Jan van Esdonk added a comment - - edited

          Same issue here. In which format do I have to put the manually downloaded JDK into the (master's?) cache directory for the workaround, my Jenkins doesn't seem to recognize it.

          Edit: After installing default-jdk via apt on Debian, the Jenkins slave was able to download JDK1.7.0_25

          Jan van Esdonk added a comment - - edited Same issue here. In which format do I have to put the manually downloaded JDK into the (master's?) cache directory for the workaround, my Jenkins doesn't seem to recognize it. Edit: After installing default-jdk via apt on Debian, the Jenkins slave was able to download JDK1.7.0_25

          Daniel Beck added a comment -

          In 1.557, Jenkins adjusted to a change in Oracle's web site to be again able to download installers. Tracked as JENKINS-22347.

          If you encounter an issue similar to this one on a recent Jenkins version, please file a new issue instead of reopening this one. The cause is probably a different one. Thanks!

          Daniel Beck added a comment - In 1.557, Jenkins adjusted to a change in Oracle's web site to be again able to download installers. Tracked as JENKINS-22347 . If you encounter an issue similar to this one on a recent Jenkins version, please file a new issue instead of reopening this one. The cause is probably a different one. Thanks!

            kohsuke Kohsuke Kawaguchi
            andreasmandel Andreas Mandel
            Votes:
            16 Vote for this issue
            Watchers:
            18 Start watching this issue

              Created:
              Updated:
              Resolved: