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

Parameterized Remote Trigger Plugin fails when remote job waits for available executor

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When the remote job is still waiting for an available executor, the job that triggered the remote job, gives a build failed status.

      Triggering this remote job: *****
      Checking that the remote job ***** is not currently building.
      Remote job remote job ***** is not currenlty building.
      This job is build #[**] on the remote server.
      Triggering remote job now.
      Blocking local job until remote job completes
      ERROR: Remote build failed for the following reason:
      ERROR: http://****/job/***/**/api/json
      Finished: FAILURE

        Attachments

          Activity

          Hide
          canuck1987 Tim Brown added a comment -

          Are you using 'wait to trigger remote builds until no other builds are running'?
          If not does it fix your issue? I found I needed both working together for it to be reliable.

          If so is the problem that the build gets triggered but is waiting in the queue (as it's waiting for and executor)?

          I will see if I can have a look tomorrow. Had a lot on the last week.

          Show
          canuck1987 Tim Brown added a comment - Are you using 'wait to trigger remote builds until no other builds are running'? If not does it fix your issue? I found I needed both working together for it to be reliable. If so is the problem that the build gets triggered but is waiting in the queue (as it's waiting for and executor)? I will see if I can have a look tomorrow. Had a lot on the last week.
          Hide
          canuck1987 Tim Brown added a comment -

          It looks like the root issue is that we are not getting a response from the REST API. This is because until the build get's an executor it won't have a REST API page. whenw e try and call the page we get a null or response. There is an update coming for the JSON issue you're seeing, thanks to @scotthains, which will likely fix your issue.

          I think this should work because getBuildStatus method takes a null response (from sendHTTPCall) to mean the build has not yet started - the problem with this though is that this means if someone cancels the job before it gets an executor the Remote trigger plugsdsdin will wait indefinitely.

          The best way I can see to solve this is to try and get Jenkins Core to give jobs an API page before they get an executor. I'm not sure how easy that would be as, if I remember correctly, the job is a different class of object after it gets and executor and before.

          Did you check with the link Maurice posted?

          Show
          canuck1987 Tim Brown added a comment - It looks like the root issue is that we are not getting a response from the REST API. This is because until the build get's an executor it won't have a REST API page. whenw e try and call the page we get a null or response. There is an update coming for the JSON issue you're seeing, thanks to @scotthains, which will likely fix your issue. I think this should work because getBuildStatus method takes a null response (from sendHTTPCall) to mean the build has not yet started - the problem with this though is that this means if someone cancels the job before it gets an executor the Remote trigger plugsdsdin will wait indefinitely. The best way I can see to solve this is to try and get Jenkins Core to give jobs an API page before they get an executor. I'm not sure how easy that would be as, if I remember correctly, the job is a different class of object after it gets and executor and before. Did you check with the link Maurice posted?
          Hide
          v969540 Kevin Van Poppel added a comment -

          'wait to trigger remote builds until no other builds are running' doesn't fix the issue for me.

          Do you have any idea when this JSON update is getting released?

          Show
          v969540 Kevin Van Poppel added a comment - 'wait to trigger remote builds until no other builds are running' doesn't fix the issue for me. Do you have any idea when this JSON update is getting released?
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Maurice Williams
          Path:
          CHANGELOG.md
          src/main/java/org/jenkinsci/plugins/ParameterizedRemoteTrigger/RemoteBuildConfiguration.java
          http://jenkins-ci.org/commit/parameterized-remote-trigger-plugin/0f704da096418c11c543c36382efc997b6125a2a
          Log:
          fixing JENKINS-22427 (https://issues.jenkins-ci.org/browse/JENKINS-22427)

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Maurice Williams Path: CHANGELOG.md src/main/java/org/jenkinsci/plugins/ParameterizedRemoteTrigger/RemoteBuildConfiguration.java http://jenkins-ci.org/commit/parameterized-remote-trigger-plugin/0f704da096418c11c543c36382efc997b6125a2a Log: fixing JENKINS-22427 ( https://issues.jenkins-ci.org/browse/JENKINS-22427 )
          Hide
          morficus Maurice W. added a comment -

          this fix is part of the 2.1.2 release done on April 26th

          Show
          morficus Maurice W. added a comment - this fix is part of the 2.1.2 release done on April 26th

            People

            Assignee:
            morficus Maurice W.
            Reporter:
            v969540 Kevin Van Poppel
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: