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

New Oracle website prevents the JDKInstaller to download binaries from archives (Unable to find a form in the response)

      Oracle recently deployed a new version of its web site and it breaks the JDKInstaller.

      On MacOS :

      Installing JDK jdk-8u92-oth-JPR
      Downloading JDK from http://download.oracle.com/otn/java/jdk/8u92-b14/jdk-8u92-macosx-x64.dmg
      ERROR: Build step failed with exception
      java.lang.IllegalStateException: Unable to find a form in the response:
      
      
      
      
      
      
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
      
      
      
      
      
      
      
      
      
      
      <html  lang="en">
      
      <head>
        
      <title>Sign On</title>
      <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
      <meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=1;" />
      
      
      
      
      
      
      
      
      
      <link rel="stylesheet" type="text/css" href="/oaam_server/css/oaam_uio.css">
      
      
      
        <link rel="stylesheet" type="text/css" href="/oaam_server/client/oam/css/e_oaam_style.css">
      
      
      
      
      
      <script type="text/javascript" charset="UTF-8" language="javascript" src="/oaam_server/js/oaam_uio.js"></script>
      
      
      
      <style id="acj">body{ display:none !important;}</style> 
      <script type="text/javascript" charset="UTF-8">
      if (self === top) { 
      var acj = document.getElementById("acj"); 
      acj.parentNode.removeChild(acj); 
      } else { 
      top.location = self.location; 
      } 
      </script>
      
      
      <script type="text/javascript" charset="UTF-8">
      	loginIdRegExpr = /[^\s\\\<\>]/gi;
      	var app_messages = {
      							validateInvalidChars: "{0} has invalid characters.",
      							validateMinMaxLength: "Your answer should be {0}-{1} characters.",
      							validateDuplicateQuestion: "You can\u0027t select the same question again.",
      							validateEmptyAnswers: "Please enter the answer for question number(s)",
      							validateEmptyAnswer: "Please enter your answer.",
      							validateSelectQuestions: "Please select your questions.",
      							validatePasswordFormat: "Invalid password format.",
      							validatePasswordComplete: "Completed",
      							validatePasswordNotEntered: "Not entered.",
      							validateChallenge: "Please enter the answer."
      						};
      </script>
      
      
        <!-- 11.1.2.3.0.OAAM_11.1.2.3.0_GENERIC_RELEASE : N/A : oam -->
      </head>
      
      
      
      <body class="f17 f17v2">
        
      
      
      
      
      
      <style type="text/css">
      	.bharosaPage{
      		width:auto !important;
      	}
      </style>
      
      <script type="text/javascript" src="/oaam_server/client/oam/js/oaam_check.js?v=2.0"></script>
      <script type="text/javascript">
        if (top != self){
          if (top.location.replace){
            top.location.replace(self.location.href);
          } else {
            top.location.href = self.location.href;
          }
        }
      </script>
      <script>stripHTML();</script>
      
      <div class="f17w1">
      <div class="f17w2" style="display:none"><img src="/oaam_server/client/oam/images/sso-f17v2-bgimg.jpg"></div>
      
      <!-- U16v0 -->
      <div id="u16" class="u16 u16v0">
      	<div class="u16w1">
      		<a href="https://www.oracle.com/index.html">Oracle</a>
      	</div>
      </div>
      <!-- /U16v0 -->
      
      <!-- CB41v0 -->
      
      
            
            
              
      
      
      
      
      
      
      
      
      
      
      
      
      <div class="bharosaPageTitle">
          
      </div>
      <div class="bharosaPageMessage">
          
      </div>
      
      	  
      
          
              <div class="loginError" id="errorMessage" title="Your session has expired. &#160;&#160;Please try again.">
              <img src="/oaam_server/images/red_square.gif" height="7" width="7" align="top" valign="top" border="0" alt="Error">
            Your session has expired. &#160;&#160;Please try again.
              </div>
          
      
      <div class="loginFailLinks">
        
      </div>
      
            
            
      
        
      
      
      
      <script type="text/javascript" src="/oaam_server/client/oam/js/jquery.js?v=1.0"></script>
      <script type="text/javascript" src="/oaam_server/client/oam/js/sso.js?v=1.0"></script>
      </div>
      
      </body>
      
      </html>
      
      	at hudson.tools.JDKInstaller.locate(JDKInstaller.java:484)
      	at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:139)
      	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:72)
      	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
      	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
      	at hudson.model.JDK.forNode(JDK.java:144)
      	at hudson.model.AbstractProject.getEnvironment(AbstractProject.java:341)
      	at hudson.model.Run.getEnvironment(Run.java:2283)
      	at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:878)
      	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:102)
      	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:736)
      	at hudson.model.Build$BuildExecution.build(Build.java:206)
      	at hudson.model.Build$BuildExecution.doRun(Build.java:163)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:496)
      	at hudson.model.Run.execute(Run.java:1737)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:421)

      On Linux :

      14:15:21 Installing JDK jdk-8u121-oth-JPR
      14:15:21 Downloading JDK from http://download.oracle.com/otn/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jdk-8u121-linux-x64.tar.gz
      14:15:29 java.io.IOException: Unable to find the login form
      14:15:29 	at hudson.tools.JDKInstaller.locate(JDKInstaller.java:464)
      14:15:29 	at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:139)
      14:15:29 	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:72)
      14:15:29 	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:109)
      14:15:29 	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
      14:15:29 	at hudson.model.JDK.forNode(JDK.java:144)
      14:15:29 	at hudson.model.AbstractProject.getEnvironment(AbstractProject.java:341)
      14:15:29 	at hudson.model.Run.getEnvironment(Run.java:2283)
      14:15:29 	at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:888)
      14:15:29 	at hudson.maven.AbstractMavenBuild.getEnvironment(AbstractMavenBuild.java:56)
      14:15:29 	at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:167)
      14:15:29 	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1103)
      14:15:29 	at hudson.scm.SCM.checkout(SCM.java:495)
      14:15:29 	at hudson.model.AbstractProject.checkout(AbstractProject.java:1212)
      14:15:29 	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:576)
      14:15:29 	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      14:15:29 	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:501)
      14:15:29 	at hudson.model.Run.execute(Run.java:1737)
      14:15:29 	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:542)
      14:15:29 	at hudson.model.ResourceController.execute(ResourceController.java:97)
      14:15:29 	at hudson.model.Executor.run(Executor.java:421)

      Latest binaries (thus not archived and not protected are still ok) 

      It is a critical bug for all users of JDKInstallers cc danielbeckkohsuke, oleg_nenashev

          [JENKINS-47448] New Oracle website prevents the JDKInstaller to download binaries from archives (Unable to find a form in the response)

          Arnaud Héritier created issue -

          Oleg Nenashev added a comment -

          My proposal would be to create a new ToolInstaller in a plugin and then to deprecate the core's one. It requires some work to make it correctly since JDKInstaller is a part of Jenkins' core API. Detaching to a pluggable core component would be reasonable, but the engine is not ready yet.

          Oleg Nenashev added a comment - My proposal would be to create a new ToolInstaller in a plugin and then to deprecate the core's one. It requires some work to make it correctly since JDKInstaller is a part of Jenkins' core API. Detaching to a pluggable core component would be reasonable, but the engine is not ready yet.
          Arnaud Héritier made changes -
          Link New: This issue is related to JENKINS-22367 [ JENKINS-22367 ]

          If we had JENKINS-22367 ...

          Arnaud Héritier added a comment - If we had  JENKINS-22367 ...
          Arnaud Héritier made changes -
          Summary Original: New Oracle website prevents the JDKInstaller to download binaries (Unable to find a form in the response) New: New Oracle website prevents the JDKInstaller to download binaries from archives (Unable to find a form in the response)

          Oleg Nenashev added a comment - - edited

          I tried to decouple JDKInstaller as a part of SECURITY-555. It cannot be done in an easy way. JDK and JDKInstaller are the part of the core API. If I find some time, I could try to finalize my PoC. Likely I won't have time in October

          Oleg Nenashev added a comment - - edited I tried to decouple JDKInstaller as a part of SECURITY-555. It cannot be done in an easy way. JDK and JDKInstaller are the part of the core API. If I find some time, I could try to finalize my PoC. Likely I won't have time in October

          Jesse Glick added a comment -

          IMO all Jenkins downloadables should actually be hosted on servers controlled by Jenkins, and in the case of JDKs we should only ship OpenJDK binaries (at least pending changes to the legal restrictions for Oracle JDKs).

          Jesse Glick added a comment - IMO all Jenkins downloadables should actually be hosted on servers controlled by Jenkins, and in the case of JDKs we should only ship OpenJDK binaries (at least pending changes to the legal restrictions for Oracle JDKs).

          Daniel Beck added a comment -

          Infra changes will need rtyler's involvement, and I'm not sure that's a viable short-term measure here.

          Daniel Beck added a comment - Infra changes will need rtyler 's involvement, and I'm not sure that's a viable short-term measure here.
          Jesse Glick made changes -
          Labels New: lts-candidate

          Oleg Nenashev added a comment -

          Notes:

          • Downloads of older JDK versions are impacted (where we get redirected to login.oracle.com).
          • JDKInstaller in the core is impacted. We consider updating the code in the core and probably backporting to 2.73.3
          • Other impacted logic: SSH Slaves Plugin and Windows Slaves Plugin. For SSH Slaves the proposal is to bump default JDK version to 141, for Windows Slaves it seems to be totally broken even prior to the change (Java 6 is downloaded)

          Oleg Nenashev added a comment - Notes: Downloads of older JDK versions are impacted (where we get redirected to login.oracle.com). JDKInstaller in the core is impacted. We consider updating the code in the core and probably backporting to 2.73.3 Other impacted logic: SSH Slaves Plugin and Windows Slaves Plugin . For SSH Slaves the proposal is to bump default JDK version to 141, for Windows Slaves it seems to be totally broken even prior to the change (Java 6 is downloaded)

            Unassigned Unassigned
            aheritier Arnaud Héritier
            Votes:
            1 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: