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

Parameterized Remote Trigger Plugin is not triggering job in remote jenkins

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • None
    • Parameterized Remote Trigger Plugin version - 3.0.3
      My Jenkins version - 2.121.2
      Remote Jenkins version - 2.73.3

      While triggering remote jenkins job from my local jenkins it was working with the version 2.2.2. But since few weeks it was not triggering, so we have updated the Parameterized Remote Trigger Plugin version from 2.2.2 to 3.0.3. But still the remote jenkins job and was showing the below issue:

      Run condition [Execute Windows Batch commands] enabling perform for step [BuilderChain]
      ERROR: Build step failed with exception
      java.lang.NullPointerException
      at org.jenkinsci.plugins.ParameterizedRemoteTrigger.RemoteBuildConfiguration.evaluateEffectiveRemoteHost(RemoteBuildConfiguration.java:385)
      at org.jenkinsci.plugins.ParameterizedRemoteTrigger.RemoteBuildConfiguration.perform(RemoteBuildConfiguration.java:533)
      at org.jenkinsci.plugins.ParameterizedRemoteTrigger.RemoteBuildConfiguration.perform(RemoteBuildConfiguration.java:514)
      at org.jenkinsci.plugins.conditionalbuildstep.BuilderChain.perform(BuilderChain.java:71)
      at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:110)
      at org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail.conditionalRun(BuildStepRunner.java:154)
      at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105)
      at org.jenkinsci.plugins.conditionalbuildstep.ConditionalBuilder.perform(ConditionalBuilder.java:134)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      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:504)
      at hudson.model.Run.execute(Run.java:1798)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:429)
      Build step 'Conditional steps (multiple)' marked build as failure

      In the remote jenkins i have given a folder path, in that particular folder it has around 5 jobs and I wanted to trigger all of them. But it triggers 1st job alone and fails with the above issue.

       

          [JENKINS-52810] Parameterized Remote Trigger Plugin is not triggering job in remote jenkins

          Dinesh created issue -

          Would you check your job and global configuration setting first against the release note? 

          It's a huge change from v2.2.2 to v3.x. 

          Or, would you share the configuration image for me? 

           

           

          KaiHsiang Chang added a comment - Would you check your job and global configuration setting first against the release note?  It's a huge change from v2.2.2 to v3.x.  Or, would you share the configuration image for me?     
          Dinesh made changes -
          Attachment New: Configuration.png [ 43551 ]

          Dinesh added a comment -

          The configurations are proper. PFA.

          Dinesh added a comment - The configurations are proper. PFA.

          thanks, would you also provide the global remote host configuration? 

          KaiHsiang Chang added a comment - thanks, would you also provide the global remote host configuration? 

          Dinesh added a comment -

          Yes, we use it Jenkins A. There we will be providing a "Display name" and "Remote Jenkins URL", then the same will be reflecting under "Select a remote host" inside the Server Info for the job.

          Dinesh added a comment - Yes, we use it Jenkins A. There we will be providing a "Display name" and "Remote Jenkins URL" , then the same will be reflecting under "Select a remote host" inside the Server Info for the job.

          dineshkumar_n, you should check your remote server configuration.

          If the URL can be correctly parsed, it's no way that url.getHost() throw NPE. 

          String addr = server.getAddress(); 
          if (addr != null) { 
            URL url = new URL(addr); 
            Semaphore s = hostLocks.get(url.getHost());  <---- line 385
          

          By the way, in the 3.x.x releases, almost every release has some configuration changes.

          Although most of them are adding fields to the original configuration, you should still check your setting. 

          KaiHsiang Chang added a comment - dineshkumar_n , you should check your remote server configuration. If the URL can be correctly parsed, it's no way that url.getHost() throw NPE.  String addr = server.getAddress(); if (addr != null ) { URL url = new URL(addr); Semaphore s = hostLocks.get(url.getHost()); <---- line 385 By the way, in the 3.x.x releases, almost every release has some configuration changes. Although most of them are adding fields to the original configuration, you should still check your setting. 
          KaiHsiang Chang made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Dinesh added a comment -

          I have validated the configurations and all are proper. When i executed the build i am facing the below issue without a configuration change :

          fail to accquire lock because of timeout, skip locking...
          CSRF protection is disabled on the remote server.
          fail to accquire lock because of timeout, skip locking...
          Connection to remote server failed [404], waiting for to retry - 10 seconds until next attempt. URL: https://<Jenkins_URL>/view/All/queue/item/81305/api/json/,
          parameters: Retry attempt #1 out of 5
          Connection to remote server failed [404], waiting for to retry - 10 seconds until next attempt. URL: https://<Jenkins_URL>/view/All/queue/item/81305/api/json/
          parameters: Retry attempt #2 out of 5
          Connection to remote server failed [404], waiting for to retry - 10 seconds until next attempt. URL: https://<Jenkins_URL>/view/All/queue/item/81305/api/json/,
          parameters:
          Retry attempt #3 out of 5
          Connection to remote server failed [404], waiting for to retry - 10 seconds until next attempt. URL: https://<Jenkins_URL>/view/All/queue/item/81305/api/json/,
          parameters:
          Retry attempt #4 out of 5
          Connection to remote server failed [404], waiting for to retry - 10 seconds until next attempt. URL: https://<Jenkins_URL>/view/All/queue/item/81305/api/json/,
          parameters:
          Retry attempt #5 out of 5
          ERROR: Remote build failed with 'ExceedRetryLimitException' for the following reason: 'Max number of connection retries have been exeeded.'.
          ERROR: ExceedRetryLimitException: Max number of connection retries have been exeeded.

          BTW, in the error "view/All/queue/item/81305/api/json/" is automatically getting added. If that is added in URL the same path will not be present. Kindly can you provide your inputs.

          Dinesh added a comment - I have validated the configurations and all are proper. When i executed the build i am facing the below issue without a configuration change : fail to accquire lock because of timeout, skip locking... CSRF protection is disabled on the remote server. fail to accquire lock because of timeout, skip locking... Connection to remote server failed [404] , waiting for to retry - 10 seconds until next attempt. URL: https://<Jenkins_URL>/view/All/queue/item/81305/api/json/, parameters: Retry attempt #1 out of 5 Connection to remote server failed [404] , waiting for to retry - 10 seconds until next attempt. URL: https://<Jenkins_URL>/view/All/queue/item/81305/api/json/ parameters: Retry attempt #2 out of 5 Connection to remote server failed [404] , waiting for to retry - 10 seconds until next attempt. URL: https://<Jenkins_URL>/view/All/queue/item/81305/api/json/, parameters: Retry attempt #3 out of 5 Connection to remote server failed [404] , waiting for to retry - 10 seconds until next attempt. URL: https://<Jenkins_URL>/view/All/queue/item/81305/api/json/, parameters: Retry attempt #4 out of 5 Connection to remote server failed [404] , waiting for to retry - 10 seconds until next attempt. URL: https://<Jenkins_URL>/view/All/queue/item/81305/api/json/, parameters: Retry attempt #5 out of 5 ERROR: Remote build failed with 'ExceedRetryLimitException' for the following reason: 'Max number of connection retries have been exeeded.'. ERROR: ExceedRetryLimitException: Max number of connection retries have been exeeded. BTW, in the error "view/All/queue/item/81305/api/json/" is automatically getting added. If that is added in URL the same path will not be present. Kindly can you provide your inputs.

          fail to accquire lock because of timeout, skip locking... <— this line wasn't related to your problem

          Connection to remote server failed [404], waiting for to retry - 10 seconds until next attempt. URL: https://<Jenkins_URL>/view/All/queue/item/81305/api/json/, <--- this line told the problem,

          Please check your remote server URL in either global configuration & job configuration, and check your job name or URL  as well, 

          the segment "view/All" is definitely added by some mistakes and definitely not auto-generated by this plugin. 

           

          I could almost 99% recognize this issue as a man-made error ...

          Be more specifically, your job URL should be in http://*some_jenkins_host*/job/*some_job_name*/ instead of directly copy the URL with view in it.

          Without the specific job URL, there's no way to 100% tell an accurate job name.

          So, please,

          use the url format i gave,

          or just give a job name along with the remote server config whose URL should be http://*some_jenkins_host* .

           

          Hope this will help you out.

           

           

           

          KaiHsiang Chang added a comment - fail to accquire lock because of timeout, skip locking.. . <— this line wasn't related to your problem Connection to remote server failed  [404] , waiting for to retry - 10 seconds until next attempt. URL: https://<Jenkins_URL>/view/All/queue/item/81305/api/json/,  <--- this line told the problem, Please check your remote server URL in either global configuration & job configuration, and check your job name or URL  as well,  the segment " view/All " is definitely added by some mistakes and definitely not auto-generated by this plugin.    I could almost 99% recognize this issue as a man-made error ... Be more specifically, your job URL should be in  http://*some_jenkins_host*/job/*some_job_name*/ instead of directly copy the URL with view in it. Without the specific job URL, there's no way to 100% tell an accurate job name. So, please, use the url format i gave, or just give a job name along with the remote server config whose URL should be http://*some_jenkins_host*  .   Hope this will help you out.      

            cashlalala KaiHsiang Chang
            dineshkumar_n Dinesh
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: