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

Parameterized Remote Trigger Plugin is not triggering job in remote jenkins

    XMLWordPrintable

Details

    • Bug
    • Status: In Progress (View Workflow)
    • Blocker
    • Resolution: Fixed
    • None
    • Parameterized Remote Trigger Plugin version - 3.0.3
      My Jenkins version - 2.121.2
      Remote Jenkins version - 2.73.3

    Description

      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.

       

      Attachments

        1. Configuration.png
          72 kB
          Dinesh
        2. image-2018-08-02-09-06-29-421.png
          89 kB
          Trey Bohon
        3. image-2018-08-02-15-05-19-964.png
          8 kB
          KaiHsiang Chang
        4. image-2018-08-02-15-07-31-063.png
          6 kB
          KaiHsiang Chang
        5. image-2018-08-02-15-08-56-621.png
          48 kB
          KaiHsiang Chang
        6. image-2018-08-02-17-45-54-123.png
          12 kB
          KaiHsiang Chang
        7. image-2018-08-02-17-46-28-212.png
          16 kB
          KaiHsiang Chang
        8. image-2018-08-02-17-49-59-985.png
          17 kB
          KaiHsiang Chang
        9. image-2018-08-02-19-09-26-082.png
          44 kB
          KaiHsiang Chang
        10. RemoteTriggerFailure.png
          157 kB
          Dinesh
        11. TimeOutRemoteTrigger.png
          30 kB
          Dinesh

        Activity

          PR 47 resolved 

          cashlalala KaiHsiang Chang added a comment - PR 47  resolved 
          totoroliu Rick Liu added a comment - - edited

          Job Jenkins server:
          Jenkins core. v.2.121.3
          Parameterized Remote Trigger Plugin v.3.0.6

          Remote Jenkins server:
          Jenkins core. v.2.121.3

          I still see this error from the job console:

          [Pipeline] triggerRemoteJob
          ################################################################################################################
          Parameterized Remote Trigger Configuration:

          Pipeline code:
          triggerRemoteJob auth: CredentialsAuth(credentials: 'xxxxxxxxxxxxx'),
          blockBuildUntilComplete: false,
          job: 'https://jenkins-robot.corp.fortinet.com/job/FortiOS_Automated_Test_6.0/job/FOS_Distributed_Smoke_Test',
          parameters: """BUILD=${build}\nLABEL=ECO_${ECO_ID}\nENV=SMOKE_PRODUCTION""", pollInterval: 300

          totoroliu Rick Liu added a comment - - edited Job Jenkins server: Jenkins core. v.2.121.3 Parameterized Remote Trigger Plugin v.3.0.6 Remote Jenkins server: Jenkins core. v.2.121.3 I still see this error from the job console: [Pipeline] triggerRemoteJob ################################################################################################################ Parameterized Remote Trigger Configuration: job: https://jenkins-robot.corp.fortinet.com/job/FortiOS_Automated_Test_6.0/job/FOS_Distributed_Smoke_Test auth: 'Credentials Authentication' as user 'xxxxxx' (Credentials ID 'xxxxxxxxxxxxx') parameters: [BUILD=5098, LABEL=ECO_130206, ENV=SMOKE_PRODUCTION] blockBuildUntilComplete: false connectionRetryLimit: 5 ################################################################################################################ fail to accquire lock because of timeout, skip locking... Triggering parameterized remote job 'https://jenkins-robot.corp.fortinet.com/job/FortiOS_Automated_Test_6.0/job/FOS_Distributed_Smoke_Test' Using job-level defined 'Credentials Authentication' as user 'xxxxxx' (Credentials ID 'xxxxxxxxxxxxx') Triggering remote job now. 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 - 300 seconds until next attempt. URL: https://jenkins-robot.corp.fortinet.com/queue/item/114603/api/json/ , parameters: Retry attempt #1 out of 5 Connection to remote server failed [404] , waiting for to retry - 300 seconds until next attempt. URL: https://jenkins-robot.corp.fortinet.com/queue/item/114603/api/json/ , parameters: Retry attempt #2 out of 5 Connection to remote server failed [404] , waiting for to retry - 300 seconds until next attempt. URL: https://jenkins-robot.corp.fortinet.com/queue/item/114603/api/json/ , parameters: Retry attempt #3 out of 5 Connection to remote server failed [404] , waiting for to retry - 300 seconds until next attempt. URL: https://jenkins-robot.corp.fortinet.com/queue/item/114603/api/json/ , parameters: Retry attempt #4 out of 5 Connection to remote server failed [404] , waiting for to retry - 300 seconds until next attempt. URL: https://jenkins-robot.corp.fortinet.com/queue/item/114603/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.'. Pipeline code: triggerRemoteJob auth: CredentialsAuth(credentials: 'xxxxxxxxxxxxx'), blockBuildUntilComplete: false, job: 'https://jenkins-robot.corp.fortinet.com/job/FortiOS_Automated_Test_6.0/job/FOS_Distributed_Smoke_Test', parameters: """BUILD=${build}\nLABEL=ECO_${ECO_ID}\nENV=SMOKE_PRODUCTION""", pollInterval: 300
          totoroliu Rick Liu added a comment -

          I'm sorry.
          I was trying to re-open the issue,
          but clicked the wrong butto to resolve the issue.

          Could anyone help me to revert my action?

          totoroliu Rick Liu added a comment - I'm sorry. I was trying to re-open the issue, but clicked the wrong butto to resolve the issue. Could anyone help me to revert my action?

          totoroliu - I've run into this issue recently and it seems to occur when I up the polling time from 30 seconds to 300. If I use 30, it works again.

          ukphilj Philip Johnson added a comment - totoroliu - I've run into this issue recently and it seems to occur when I up the polling time from 30 seconds to 300. If I use 30, it works again.
          ivanak Ivan added a comment -

          Hi all, 

          before I open new one i want to try it here. Have similar problem where i following the documentation [here|https://www.jenkins.io/doc/pipeline/steps/Parameterized-Remote-Trigger/.] 

          I'm getting this error/warming message and 403 error when i use "remoteJenkinsURL" instead of "remoteJenkinsName"

          [Pipeline] triggerRemoteJob 11:37:15 WARNING: Unknown parameter(s) found for class type 'org.jenkinsci.plugins.ParameterizedRemoteTrigger.pipeline.RemoteBuildPipelineStep': auth2
          

          **Here is the conf im using it

          stage ("SOME PLUGIN") {
                  steps {
                      script {
                          //Trigger remote job
                          def handle = triggerRemoteJob(
                              // remoteJenkinsName: "JenkinsB",
                              remoteJenkinsUrl: 'https://something.com/jenkins/something', 
                              job: 'taskdir/task01',
                              auth2: TokenAuth(userName: 'user', apiToken: 'token'),
                              trustAllCertificates: true,
                              overrideTrustAllCertificates: true,
                              parameters: "project_name=TEST\nSTACK_NAME=${STACK_NAME}"
                              )            }
                  }
              }   
          
          

          And the error is :

          Connection to remote server failed [403], waiting to retry - 10 seconds until next attempt. URL:
          https://something.com/jenkins/something/job/taskdir/job/task01/api/json, parameters:
          

           

          ivanak Ivan added a comment - Hi all,  before I open new one i want to try it here. Have similar problem where i following the documentation [here| https://www.jenkins.io/doc/pipeline/steps/Parameterized-Remote-Trigger/ .]  I'm getting this error/warming message and 403 error when i use "remoteJenkinsURL" instead of "remoteJenkinsName" [Pipeline] triggerRemoteJob 11:37:15 WARNING: Unknown parameter(s) found for class type 'org.jenkinsci.plugins.ParameterizedRemoteTrigger.pipeline.RemoteBuildPipelineStep' : auth2 **Here is the conf im using it stage ( "SOME PLUGIN" ) { steps { script { //Trigger remote job def handle = triggerRemoteJob( // remoteJenkinsName: "JenkinsB" , remoteJenkinsUrl: 'https: //something.com/jenkins/something' , job: 'taskdir/task01' , auth2: TokenAuth(userName: 'user' , apiToken: 'token' ), trustAllCertificates: true , overrideTrustAllCertificates: true , parameters: "project_name=TEST\nSTACK_NAME=${STACK_NAME}" ) } } } And the error is : Connection to remote server failed [403], waiting to retry - 10 seconds until next attempt. URL: https: //something.com/jenkins/something/job/taskdir/job/task01/api/json, parameters:  

          People

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

            Dates

              Created:
              Updated:
              Resolved: