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

Jenkins parameterized remote trigger plugin shows null pointer exception

      I have a jenkins job that triggers a job on a remote server(another jenkins instance), but the job fails with this error on the console

       

      Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build.
       Triggering this remote job: <job-name>
       Not checking if the remote job <job-name> is building.
       Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build.
       ERROR: Remote build failed for the following reason, but the build will continue:
       ERROR
       : Got a blank response from Remote Jenkins Server [
       http://jenkins-instance.org.com
       ], cannot continue.
       ERROR
       : Build step failed with exception
       java.lang.NullPointerException 
       Build step 'Trigger a remote parameterized job' marked build as failure
       [BFA] Scanning build for known causes...
       [BFA] No failure causes found
       [BFA] Done. 0s
       Finished: FAILURE

          [JENKINS-53813] Jenkins parameterized remote trigger plugin shows null pointer exception

          Priyanka Panda created issue -
          Priyanka Panda made changes -
          Description Original: I have a jenkins job that triggers a job on a remote server(another jenkins instance), but the job fails with this error on the console
          Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build.
          Triggering this remote job: mbissaro_test_smokejob
          Not checking if the remote job mbissaro_test_smokejob is building.
          Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build.
          ERROR: Remote build failed for the following reason, but the build will continue:
          [ERROR|http://stacktrace.jenkins-ci.org/search?query=ERROR]
          : Got a blank response from Remote Jenkins Server [
          [http://jenkins-instance.org.com|http://winter-soldier.mot.com/]
          ], cannot continue.
          [ERROR|http://stacktrace.jenkins-ci.org/search?query=ERROR]
          : Build step failed with exception
          [java.lang.NullPointerException |http://stacktrace.jenkins-ci.org/search?query=java.lang.NullPointerException]
          Build step 'Trigger a remote parameterized job' marked build as failure
          [BFA] Scanning build for known causes...
          [BFA] No failure causes found
          [BFA] Done. 0s
          Finished: FAILURE
          New: I have a jenkins job that triggers a job on a remote server(another jenkins instance), but the job fails with this error on the console

           
          {code:java}
          Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build.
           Triggering this remote job: mbissaro_test_smokejob
           Not checking if the remote job mbissaro_test_smokejob is building.
           Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build.
           ERROR: Remote build failed for the following reason, but the build will continue:
           ERROR
           : Got a blank response from Remote Jenkins Server [
           http://jenkins-instance.org.com
           ], cannot continue.
           ERROR
           : Build step failed with exception
           java.lang.NullPointerException
           Build step 'Trigger a remote parameterized job' marked build as failure
           [BFA] Scanning build for known causes...
           [BFA] No failure causes found
           [BFA] Done. 0s
           Finished: FAILURE{code}
          Priyanka Panda made changes -
          Description Original: I have a jenkins job that triggers a job on a remote server(another jenkins instance), but the job fails with this error on the console

           
          {code:java}
          Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build.
           Triggering this remote job: mbissaro_test_smokejob
           Not checking if the remote job mbissaro_test_smokejob is building.
           Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build.
           ERROR: Remote build failed for the following reason, but the build will continue:
           ERROR
           : Got a blank response from Remote Jenkins Server [
           http://jenkins-instance.org.com
           ], cannot continue.
           ERROR
           : Build step failed with exception
           java.lang.NullPointerException
           Build step 'Trigger a remote parameterized job' marked build as failure
           [BFA] Scanning build for known causes...
           [BFA] No failure causes found
           [BFA] Done. 0s
           Finished: FAILURE{code}
          New: I have a jenkins job that triggers a job on a remote server(another jenkins instance), but the job fails with this error on the console

           
          {code:java}
          Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build.
           Triggering this remote job: <job-name>
           Not checking if the remote job <job-name> is building.
           Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build.
           ERROR: Remote build failed for the following reason, but the build will continue:
           ERROR
           : Got a blank response from Remote Jenkins Server [
           http://jenkins-instance.org.com
           ], cannot continue.
           ERROR
           : Build step failed with exception
           java.lang.NullPointerException
           Build step 'Trigger a remote parameterized job' marked build as failure
           [BFA] Scanning build for known causes...
           [BFA] No failure causes found
           [BFA] Done. 0s
           Finished: FAILURE{code}

          Update: updating the parameterized remote trigger plugin fixed the issue, but there is a different error now
           
           fail to accquire lock because of timeout, skip locking...
          Connection to remote server failed , waiting for to retry - 10 seconds until next attempt. URL: https://jenkins.org.com/job/job_name/api/json, parameters:
          Retry attempt #1 out of 5
          Connection to remote server failed , waiting for to retry - 10 seconds until next attempt. URL: https://jenkins.org.com/job/job_name/api/json, parameters, parameters:
          Retry attempt #2 out of 5
          Connection to remote server failed , waiting for to retry - 10 seconds until next attempt. URL: https://jenkins.org.com/job/job_name/api/json, parameters, parameters:
          Retry attempt #3 out of 5
          Connection to remote server failed , waiting for to retry - 10 seconds until next attempt. URL: https://jenkins.org.com/job/job_name/api/json, parameters, parameters:
          Retry attempt #4 out of 5
          Connection to remote server failed , waiting for to retry - 10 seconds until next attempt. URL: https://jenkins.org.com/job/job_name/api/json, parameters, parameters:
          Retry attempt #5 out of 5
          FATAL: Max number of connection retries have been exeeded.
          org.jenkinsci.plugins.ParameterizedRemoteTrigger.exceptions.ExceedRetryLimitException: Max number of connection retries have been exeeded.
          at org.jenkinsci.plugins.ParameterizedRemoteTrigger.utils.HttpHelper.sendHTTPCall(HttpHelper.java:526)
          at org.jenkinsci.plugins.ParameterizedRemoteTrigger.utils.HttpHelper.sendHTTPCall(HttpHelper.java:521)
          at org.jenkinsci.plugins.ParameterizedRemoteTrigger.utils.HttpHelper.sendHTTPCall(HttpHelper.java:521)

          Priyanka Panda added a comment - Update: updating the parameterized remote trigger plugin fixed the issue, but there is a different error now    fail to accquire lock because of timeout, skip locking... Connection to remote server failed , waiting for to retry - 10 seconds until next attempt. URL: https://jenkins.org.com/job/job_name/api/json , parameters: Retry attempt #1 out of 5 Connection to remote server failed , waiting for to retry - 10 seconds until next attempt. URL: https://jenkins.org.com/job/job_name/api/json , parameters, parameters: Retry attempt #2 out of 5 Connection to remote server failed , waiting for to retry - 10 seconds until next attempt. URL: https://jenkins.org.com/job/job_name/api/json , parameters, parameters: Retry attempt #3 out of 5 Connection to remote server failed , waiting for to retry - 10 seconds until next attempt. URL: https://jenkins.org.com/job/job_name/api/json , parameters, parameters: Retry attempt #4 out of 5 Connection to remote server failed , waiting for to retry - 10 seconds until next attempt. URL: https://jenkins.org.com/job/job_name/api/json , parameters, parameters: Retry attempt #5 out of 5 FATAL: Max number of connection retries have been exeeded. org.jenkinsci.plugins.ParameterizedRemoteTrigger.exceptions.ExceedRetryLimitException: Max number of connection retries have been exeeded. at org.jenkinsci.plugins.ParameterizedRemoteTrigger.utils.HttpHelper.sendHTTPCall(HttpHelper.java:526) at org.jenkinsci.plugins.ParameterizedRemoteTrigger.utils.HttpHelper.sendHTTPCall(HttpHelper.java:521) at org.jenkinsci.plugins.ParameterizedRemoteTrigger.utils.HttpHelper.sendHTTPCall(HttpHelper.java:521)

          Please also provide your remote server config and job config. 

          KaiHsiang Chang added a comment - Please also provide your remote server config and job config. 
          Priyanka Panda made changes -
          Attachment New: jobconfig.PNG [ 44621 ]
          Attachment New: remoteserverconfig.PNG [ 44622 ]

          Done.

          Also in the remote server config it shows, "

          Address looks good, but a connection could not be stablished."

          But i can access the same URL through my browser

           

          Priyanka Panda added a comment - Done. Also in the remote server config it shows, " Address looks good, but a connection could not be stablished." But i can access the same URL through my browser  

          How about curl the link form your host which runs Jenkins server? 

           

          KaiHsiang Chang added a comment - How about curl the link form your host which runs Jenkins server?   

          Priyanka Panda added a comment - - edited

          curl from my host server connects me to the remote server without any error for https://jenkins-instance.org.com link

          on the other hand http throws this error

          <html>
          <head><title>301 Moved Permanently</title></head>
          <body bgcolor="white">
          <center><h1>301 Moved Permanently</h1></center>
          <hr><center>nginx/1.12.2</center>
          </body>
          </html>

          Priyanka Panda added a comment - - edited curl from my host server connects me to the remote server without any error for https://jenkins-instance.org.com link on the other hand http throws this error <html> <head><title>301 Moved Permanently</title></head> <body bgcolor="white"> <center><h1>301 Moved Permanently</h1></center> <hr><center>nginx/1.12.2</center> </body> </html>

          something wrong with your proxy sever setting IMO, 

          generally speaking, curl a Jenkins main page should return 200 or maybe either 403 or 401 if any security settings were configured,  even with a proxy server.

          for example,

          [xxx@xxx logs]$curl -I http://myjks/01/
          HTTP/1.1 200 OK
          Date: Fri, 28 Sep 2018 05:42:58 GMT
          X-Content-Type-Options: nosniff
          Set-Cookie: ACEGI_SECURITY_HASHED_REMEMBER_ME_COOKIE=;Path=/hcswcis01;Expires=Thu, 01-Jan-1970 00:00:00 GMT;Max-Age=0;HttpOnly
          Expires: Thu, 01 Jan 1970 00:00:00 GMT
          Cache-Control: no-cache,no-store,must-revalidate
          X-Hudson-Theme: default
          Referrer-Policy: same-origin
          Content-Type: text/html;charset=utf-8
          Set-Cookie: JSESSIONID.e5d5b7ea=node03kmibbixqi02uz1r64zya6ij94.node0;Path=/hcswcis01;HttpOnly
          X-Hudson: 1.395
          X-Jenkins: 2.138.1
          X-Jenkins-Session: cf840d79
          X-Hudson-CLI-Port: 32001
          X-Jenkins-CLI-Port: 32001
          X-Jenkins-CLI2-Port: 32001
          X-Frame-Options: sameorigin
          X-Instance-Identity: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiMbiAi3UyrabxZdP/7qzD9bg7bb8ti72ME7F/5Xw41yEw186+f7uXB8mF80WXY+9NodgZd6jkTw2nKjiDM/qArOOVnYoEDYFqworqIHEhX7UAA6BKydlAl33Z9FF6WLx2O6mtXTXxfwF/M3/mDa9bgKfrL6rINXpuDyDw5kzj3owF+epNEQyrNDGF8ait36Re+rN6Wae1qWS8cyWZstYfdkar2dP9m5X/HhA9oprnuz1q69QZQGRpaHvu6P6+5AjsNSFJVC9djfEFSOMrgqkAOwFYCUewyCEuFUsN1fWW0azS6QfFH/TsngwgnLbFLaj+NfzU8n7OT2M6ip8+X/sZwIDAQAB
          Content-Length: 26762
          Server: Jetty(9.4.z-SNAPSHOT)

           

          I don't think this is a bug. 

           

           

          KaiHsiang Chang added a comment - something wrong with your proxy sever setting IMO,  generally speaking, curl a Jenkins main page should return 200 or maybe either 403 or 401 if any security settings were configured,  even with a proxy server. for example, [xxx@xxx logs] $curl -I http://myjks/01/ HTTP/1.1 200 OK Date: Fri, 28 Sep 2018 05:42:58 GMT X-Content-Type-Options: nosniff Set-Cookie: ACEGI_SECURITY_HASHED_REMEMBER_ME_COOKIE=;Path=/hcswcis01;Expires=Thu, 01-Jan-1970 00:00:00 GMT;Max-Age=0;HttpOnly Expires: Thu, 01 Jan 1970 00:00:00 GMT Cache-Control: no-cache,no-store,must-revalidate X-Hudson-Theme: default Referrer-Policy: same-origin Content-Type: text/html;charset=utf-8 Set-Cookie: JSESSIONID.e5d5b7ea=node03kmibbixqi02uz1r64zya6ij94.node0;Path=/hcswcis01;HttpOnly X-Hudson: 1.395 X-Jenkins: 2.138.1 X-Jenkins-Session: cf840d79 X-Hudson-CLI-Port: 32001 X-Jenkins-CLI-Port: 32001 X-Jenkins-CLI2-Port: 32001 X-Frame-Options: sameorigin X-Instance-Identity: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAiMbiAi3UyrabxZdP/7qzD9bg7bb8ti72ME7F/5Xw41yEw186+f7uXB8mF80WXY+9NodgZd6jkTw2nKjiDM/qArOOVnYoEDYFqworqIHEhX7UAA6BKydlAl33Z9FF6WLx2O6mtXTXxfwF/M3/mDa9bgKfrL6rINXpuDyDw5kzj3owF+epNEQyrNDGF8ait36Re+rN6Wae1qWS8cyWZstYfdkar2dP9m5X/HhA9oprnuz1q69QZQGRpaHvu6P6+5AjsNSFJVC9djfEFSOMrgqkAOwFYCUewyCEuFUsN1fWW0azS6QfFH/TsngwgnLbFLaj+NfzU8n7OT2M6ip8+X/sZwIDAQAB Content-Length: 26762 Server: Jetty(9.4.z-SNAPSHOT)   I don't think this is a bug.     

            cashlalala KaiHsiang Chang
            priyankapanda348 Priyanka Panda
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: