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

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

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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)

        Attachments

          Activity

          Hide
          gcummings Geoff Cummings added a comment -

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

          Show
          gcummings Geoff Cummings added a comment - Suspect it may be related to using Jetty now: https://issues.jenkins-ci.org/browse/JENKINS-18366
          Hide
          gcummings 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?

          Show
          gcummings 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?
          Hide
          gcummings 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!!

          Show
          gcummings 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!!
          Hide
          wim_leflere 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

          Show
          wim_leflere 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
          Hide
          wim_leflere Wim Leflere added a comment -

          Geoff Cummings solution solves the problem

          Show
          wim_leflere Wim Leflere added a comment - Geoff Cummings solution solves the problem
          Hide
          scm_issue_link 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.

          Show
          scm_issue_link 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.
          Hide
          vjuranek 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.

          Show
          vjuranek 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.

            People

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

              Dates

              Created:
              Updated:
              Resolved: