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

BuildPublisher reporting "URL doesn't exist" after upgrade Remote Jenkins to 1.535

      Hi,

      I have had build publisher working to transfer builds from a remote Jenkins install to our main Jenkins server.

      After upgrading both Jenkins servers to 1.535 I get the following error:

      Waiting for a time out before a retry, after encountering an error while sending TEST_JOB #2 - 1.1-rc1 (9 min 59 sec before retry):
      org.apache.commons.httpclient.HttpException: http://<server_url>/jenkins/: URL doesn't exist
      	at hudson.plugins.build_publisher.PublisherThread.assertUrlExists(PublisherThread.java:279)
      	at hudson.plugins.build_publisher.PublisherThread.synchronizeProjectSettings(PublisherThread.java:218)
      	at hudson.plugins.build_publisher.PublisherThread.run(PublisherThread.java:113)

          [JENKINS-20067] BuildPublisher reporting "URL doesn't exist" after upgrade Remote Jenkins to 1.535

          Suspect it may be related to using Jetty now: https://issues.jenkins-ci.org/browse/JENKINS-18366

          Geoff Cummings added a comment - Suspect it may be related to using Jetty now: https://issues.jenkins-ci.org/browse/JENKINS-18366

          Trying to debug I have been getting the following error:

          hudson.plugins.build_publisher.ServerFailureException: http://<server_url>/jenkins/login;jsessionid=u69wiwnehy5x1d5tbt2gzax5e responded with status 404
          	at hudson.plugins.build_publisher.HTTPBuildTransmitter.followRedirects(HTTPBuildTransmitter.java:218)
          

          Does Jetty handle redirects with jsessionid in the url differently?

          Geoff Cummings added a comment - Trying to debug I have been getting the following error: hudson.plugins.build_publisher.ServerFailureException: http: //<server_url>/jenkins/login;jsessionid=u69wiwnehy5x1d5tbt2gzax5e responded with status 404 at hudson.plugins.build_publisher.HTTPBuildTransmitter.followRedirects(HTTPBuildTransmitter.java:218) Does Jetty handle redirects with jsessionid in the url differently?

          hmm, If I update to use 'login' instead of 'loginEntry' it starts working ok.

          HTTPBuildTransmitter.java

          - GetMethod loginMethod = new GetMethod(hudsonInstance.getUrl() + "loginEntry");
          + GetMethod loginMethod = new GetMethod(hudsonInstance.getUrl() + "login");
          

          Would need someone who understands this better to know if this change is a fix or a hack!!

          Geoff Cummings added a comment - hmm, If I update to use 'login' instead of 'loginEntry' it starts working ok. HTTPBuildTransmitter.java - GetMethod loginMethod = new GetMethod(hudsonInstance.getUrl() + "loginEntry" ); + GetMethod loginMethod = new GetMethod(hudsonInstance.getUrl() + "login" ); Would need someone who understands this better to know if this change is a fix or a hack!!

          Wim Leflere added a comment -

          Capturing the HTTP packets during a retry (from http://testserver/plugin/build-publisher/).
          Something goes wrong with the redirection to the login page:
          GET /loginEntry HTTP/1.1
          User-Agent: Jakarta Commons-HttpClient/3.1
          Host: public-jenkins

          HTTP/1.1 302 Found
          Set-Cookie: JSESSIONID=4ids0mkbx4fiw7dls1k2uy3o;Path=/
          Expires: Thu, 01 Jan 1970 00:00:00 GMT
          Location: http://public-jenkins/login;jsessionid=4ids0mkbx4fiw7dls1k2uy3o
          Content-Length: 0
          Server: Jetty(8.y.z-SNAPSHOT)

          GET /login;jsessionid=4ids0mkbx4fiw7dls1k2uy3o HTTP/1.1
          User-Agent: Jakarta Commons-HttpClient/3.1
          Host: public-jenkins
          Cookie: $Version=0; JSESSIONID=4ids0mkbx4fiw7dls1k2uy3o; $Path=/

          HTTP/1.1 404 Not Found
          Content-Type: text/html;charset=ISO-8859-1
          Cache-Control: must-revalidate,no-cache,no-store
          Content-Length: 1406
          Server: Jetty(8.y.z-SNAPSHOT)

          Jenkins ver. 1.547

          Wim Leflere added a comment - Capturing the HTTP packets during a retry (from http://testserver/plugin/build-publisher/ ). Something goes wrong with the redirection to the login page: GET /loginEntry HTTP/1.1 User-Agent: Jakarta Commons-HttpClient/3.1 Host: public-jenkins HTTP/1.1 302 Found Set-Cookie: JSESSIONID=4ids0mkbx4fiw7dls1k2uy3o;Path=/ Expires: Thu, 01 Jan 1970 00:00:00 GMT Location: http://public-jenkins/login;jsessionid=4ids0mkbx4fiw7dls1k2uy3o Content-Length: 0 Server: Jetty(8.y.z-SNAPSHOT) GET /login;jsessionid=4ids0mkbx4fiw7dls1k2uy3o HTTP/1.1 User-Agent: Jakarta Commons-HttpClient/3.1 Host: public-jenkins Cookie: $Version=0; JSESSIONID=4ids0mkbx4fiw7dls1k2uy3o; $Path=/ HTTP/1.1 404 Not Found Content-Type: text/html;charset=ISO-8859-1 Cache-Control: must-revalidate,no-cache,no-store Content-Length: 1406 Server: Jetty(8.y.z-SNAPSHOT) Jenkins ver. 1.547

          Wim Leflere added a comment -

          Geoff Cummings solution solves the problem

          Wim Leflere added a comment - Geoff Cummings solution solves the problem

          Code changed in jenkins
          User: Rick Sherman
          Path:
          src/main/java/hudson/plugins/build_publisher/HTTPBuildTransmitter.java
          http://jenkins-ci.org/commit/build-publisher-plugin/d7c32a302c71e1e1bc0b9df49374806ca22e678c
          Log:
          Fix for JENKINS-20067

          Updated login url per Geoff Cummings suggestion.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Rick Sherman Path: src/main/java/hudson/plugins/build_publisher/HTTPBuildTransmitter.java http://jenkins-ci.org/commit/build-publisher-plugin/d7c32a302c71e1e1bc0b9df49374806ca22e678c Log: Fix for JENKINS-20067 Updated login url per Geoff Cummings suggestion.

          vjuranek added a comment -

          Fixed by PR #5. Please note that I bump plugin version to require Jenkins 1.535, however on internal instance it's not required, 1.535 is required only on public (remote) instance.

          vjuranek added a comment - Fixed by PR #5 . Please note that I bump plugin version to require Jenkins 1.535, however on internal instance it's not required, 1.535 is required only on public (remote) instance.

            lvotypkova Lucie Votypkova
            gcummings Geoff Cummings
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: