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

Unable to trigger remote builds without parameters

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      We recently upgraded from plugin v2.1.3 to v2.2.2.

      Jobs which use the plugin to trigger remote builds WITHOUT parameters are failing and we get:

      Server returned HTTP response code: 500 for URL: https://jenkinsurl/job/myJob123/buildWithParameters?delay=0
      Connection to remote server failed, waiting for to retry - 10 seconds until next attempt.
      Retry attempt #1 out of 5
      Server returned HTTP response code: 500 for URL: https://jenkinsurl/job/myJob123/buildWithParameters?delay=0
      Connection to remote server failed, waiting for to retry - 10 seconds until next attempt.
      Retry attempt #2 out of 5
      Server returned HTTP response code: 500 for URL: https://jenkinsurl/job/myJob123/buildWithParameters?delay=0
      Connection to remote server failed, waiting for to retry - 10 seconds until next attempt.
      Retry attempt #3 out of 5
      Server returned HTTP response code: 500 for URL: https://jenkinsurl/job/myJob123/buildWithParameters?delay=0
      Connection to remote server failed, waiting for to retry - 10 seconds until next attempt.
      Retry attempt #4 out of 5
      Server returned HTTP response code: 500 for URL: https://jenkinsurl/job/myJob123/buildWithParameters?delay=0
      Connection to remote server failed, waiting for to retry - 10 seconds until next attempt.
      Retry attempt #5 out of 5
      Server returned HTTP response code: 500 for URL: https://jenkinsurl/job/myJob123/buildWithParameters?delay=0
      ERROR: Remote build failed for the following reason:
      ERROR: Max number of connection retries have been exeeded.

      The URL seems to be incorrect as when we hit this target URL we see:

      “You must use POST method to trigger builds. (From scripts you may instead pass a per-project authentication token, or authenticate with your API token.) If you see this page, it may be because a plugin offered a GET link; file a bug report for that plugin.”

        Attachments

          Issue Links

            Activity

            Hide
            ashokm Ashok Manji added a comment -

            Note that on the older v2.1.3 version of the plugin this works as expected, but note that the output shows:

            "Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build."

            Show
            ashokm Ashok Manji added a comment - Note that on the older v2.1.3 version of the plugin this works as expected, but note that the output shows: "Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build."
            Hide
            ashokm Ashok Manji added a comment -

            Are there any updates on this?

            Show
            ashokm Ashok Manji added a comment - Are there any updates on this?
            Hide
            nsalin Alin Stelian added a comment -

            Hi guys, same problem here, I have the latest Jenkins version (1.647). Is very annoying when something like this happens, so my question for you is, do you have any workaround for this ?

            Show
            nsalin Alin Stelian added a comment - Hi guys, same problem here, I have the latest Jenkins version (1.647). Is very annoying when something like this happens, so my question for you is, do you have any workaround for this ?
            Hide
            sjgeertgens Scott Geertgens added a comment -

            Alin Stelian - The older 2.1.3 version does still work, even with the latest Jenkins. That's currently the only apparent workaround.

            Show
            sjgeertgens Scott Geertgens added a comment - Alin Stelian - The older 2.1.3 version does still work, even with the latest Jenkins. That's currently the only apparent workaround.
            Hide
            lingvomir Stoyan Stratev added a comment -

            It seems this is broken when the remote build triggers/calls other builds. In this case the check if the remote build is parameterized will always return true. This forces the plugin to use the "buildWithParameters" call, which will fail with a HTTP 500 error.

            Show
            lingvomir Stoyan Stratev added a comment - It seems this is broken when the remote build triggers/calls other builds. In this case the check if the remote build is parameterized will always return true. This forces the plugin to use the "buildWithParameters" call, which will fail with a HTTP 500 error.
            Hide
            piratejohnny Jon B added a comment - - edited

            Jenkins ver. 2.46.3 is occasionally giving me this issue as well with plugin version 2.2.2.

            Show
            piratejohnny Jon B added a comment - - edited Jenkins ver. 2.46.3 is occasionally giving me this issue as well with plugin version 2.2.2.
            Hide
            piratejohnny Jon B added a comment -

            Here's the error I see in my logs (slightly cleansed by you get the idea:

            Server returned HTTP response code: 500 for URL: https://generaljenkins.mydomain.com//job/django_test/buildWithParameters?GITHUB_REPOSITORY=git%40github.com%3Amysite%2Fdoorstep-django.git&SHA=a2b2ab39763104258b92ed22f7233e2eac61a310&DOCKER_IMAGE_TAG=master&BRANCH_NAME=master&CALLBACK_GATEWAY_JOB_ID=1&WHICH_PARTITION=4&NUM_PARTITIONS=15&delay=0&GITHUB_REPOSITORY=git%40github.com%3Amysite%2Fdoorstep-django.git&SHA=a2b2ab39763104258b92ed22f7233e2eac61a310&DOCKER_IMAGE_TAG=master&BRANCH_NAME=master&CALLBACK_GATEWAY_JOB_ID=1&WHICH_PARTITION=12&NUM_PARTITIONS=15&delay=0

            The problem is clearly that the build params which I am attempting to pass are repeated. When I examine the other jenkins server that I am trying to start the job on, I see a message in the server log that says:

            java.lang.IllegalArgumentException: Illegal number of parameter values for BRANCH_NAME: 2

            This seems to confirm that the bug is in the plugin and that it is mistakenly sending all of the build params 2 times.

            Show
            piratejohnny Jon B added a comment - Here's the error I see in my logs (slightly cleansed by you get the idea: Server returned HTTP response code: 500 for URL: https: //generaljenkins.mydomain.com//job/django_test/buildWithParameters?GITHUB_REPOSITORY=git%40github.com%3Amysite%2Fdoorstep-django.git&SHA=a2b2ab39763104258b92ed22f7233e2eac61a310&DOCKER_IMAGE_TAG=master&BRANCH_NAME=master&CALLBACK_GATEWAY_JOB_ID=1&WHICH_PARTITION=4&NUM_PARTITIONS=15&delay=0&GITHUB_REPOSITORY=git%40github.com%3Amysite%2Fdoorstep-django.git&SHA=a2b2ab39763104258b92ed22f7233e2eac61a310&DOCKER_IMAGE_TAG=master&BRANCH_NAME=master&CALLBACK_GATEWAY_JOB_ID=1&WHICH_PARTITION=12&NUM_PARTITIONS=15&delay=0 The problem is clearly that the build params which I am attempting to pass are repeated. When I examine the other jenkins server that I am trying to start the job on, I see a message in the server log that says: java.lang.IllegalArgumentException: Illegal number of parameter values for BRANCH_NAME: 2 This seems to confirm that the bug is in the plugin and that it is mistakenly sending all of the build params 2 times.
            Hide
            cashlalala KaiHsiang Chang added a comment -

            fixed in v3.0.0

            Show
            cashlalala KaiHsiang Chang added a comment - fixed in v3.0.0

              People

              • Assignee:
                cashlalala KaiHsiang Chang
                Reporter:
                ashokm Ashok Manji
              • Votes:
                5 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: