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

4 views
Skip to first unread message

priyankapanda348@gmail.com (JIRA)

unread,
Sep 27, 2018, 7:10:03 AM9/27/18
to jenkinsc...@googlegroups.com
Priyanka Panda created an issue
 
Jenkins / Bug JENKINS-53813
Jenkins parameterized remote trigger plugin shows null pointer exception
Issue Type: Bug Bug
Assignee: KaiHsiang Chang
Components: parameterized-remote-trigger-plugin
Created: 2018-09-27 11:09
Environment: CentOS release 5.9
Jenkins version 2.7.1
Priority: Minor Minor
Reporter: Priyanka Panda

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
: 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

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

priyankapanda348@gmail.com (JIRA)

unread,
Sep 27, 2018, 7:11:02 AM9/27/18
to jenkinsc...@googlegroups.com
Priyanka Panda updated an issue
Change By: Priyanka Panda
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 <job-name>
Not checking if the remote job
mbissaro_test_smokejob <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}

priyankapanda348@gmail.com (JIRA)

unread,
Sep 27, 2018, 7:11:03 AM9/27/18
to jenkinsc...@googlegroups.com
Priyanka Panda updated an issue
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:
: Got a blank response from Remote Jenkins Server [
: Build step failed with exception

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}

priyankapanda348@gmail.com (JIRA)

unread,
Sep 28, 2018, 1:12:02 AM9/28/18
to jenkinsc...@googlegroups.com
Priyanka Panda commented on Bug JENKINS-53813
 
Re: Jenkins parameterized remote trigger plugin shows null pointer exception

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)

cash924n@gmail.com (JIRA)

unread,
Sep 28, 2018, 1:15:02 AM9/28/18
to jenkinsc...@googlegroups.com

Please also provide your remote server config and job config. 

priyankapanda348@gmail.com (JIRA)

unread,
Sep 28, 2018, 1:28:02 AM9/28/18
to jenkinsc...@googlegroups.com
Priyanka Panda updated an issue
Change By: Priyanka Panda
Attachment: jobconfig.PNG
Attachment: remoteserverconfig.PNG

priyankapanda348@gmail.com (JIRA)

unread,
Sep 28, 2018, 1:29:02 AM9/28/18
to jenkinsc...@googlegroups.com
Priyanka Panda commented on Bug JENKINS-53813
 
Re: Jenkins parameterized remote trigger plugin shows null pointer exception

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

 

cash924n@gmail.com (JIRA)

unread,
Sep 28, 2018, 1:31:01 AM9/28/18
to jenkinsc...@googlegroups.com

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

 

priyankapanda348@gmail.com (JIRA)

unread,
Sep 28, 2018, 1:35:02 AM9/28/18
to jenkinsc...@googlegroups.com

curl from my host server connects me to the remote server without any error

priyankapanda348@gmail.com (JIRA)

unread,
Sep 28, 2018, 1:40:01 AM9/28/18
to jenkinsc...@googlegroups.com
Priyanka Panda edited a comment on Bug JENKINS-53813
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>

cash924n@gmail.com (JIRA)

unread,
Sep 28, 2018, 1:47:02 AM9/28/18
to jenkinsc...@googlegroups.com

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. 

 

 

priyankapanda348@gmail.com (JIRA)

unread,
Sep 28, 2018, 2:31:01 AM9/28/18
to jenkinsc...@googlegroups.com

the remote server URL that i have in my jenkins configuration gives this o/p

-bash-3.2$ curl -I -k "https://jenkins_instance.org.com"
HTTP/1.1 200 OK
Date: Fri, 28 Sep 2018 06:28:28 GMT
Content-Type: text/html;charset=utf-8
Connection: keep-alive
X-Content-Type-Options: nosniff

 

but on the configuration page, it throws the error that i have mentioned above.

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

 

 

 

cash924n@gmail.com (JIRA)

unread,
Sep 28, 2018, 2:45:02 AM9/28/18
to jenkinsc...@googlegroups.com

I don't think I can reproduce your environmental issues...  even though I really want to help you.

tobias.honacker@sap.com (JIRA)

unread,
Aug 29, 2019, 9:54:04 AM8/29/19
to jenkinsc...@googlegroups.com

KaiHsiang Chang

 

i have the same issue

 

2019-08-29 13:34:48.988+0000 [id=1459566]       WARNING o.j.p.P.utils.HttpHelper#sendHTTPCall: Server returned HTTP response code: 5
00 for URL: https://jenkins.c.eu-de-1.cloud/job/MLF-Deployment/job/deploy.from.branch//buildWithParameters?delay=0 -
[HTTP/1.1 500 Server Error]
java.io.IOException: Server returned HTTP response code: 500 for URL: https://mjenkins.c.eu-de-1.cloud/job/MLF-Deploym
ent/job/deploy.from.branch//buildWithParameters?delay=0
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1900)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
        at sun.net.www.protocol.http.HttpURLConnection.getHeaderFields(HttpURLConnection.java:3080)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getHeaderFields(HttpsURLConnectionImpl.java:297)
        at org.jenkinsci.plugins.ParameterizedRemoteTrigger.utils.HttpHelper.sendHTTPCall(HttpHelper.java:490)
Caused: java.io.IOException: Server returned HTTP response code: 500 for URL: https://jenkins.c.eu-de-1.cloud/job/MLF-Deployment/job/deploy.from.branch//buildWithParameters?delay=0
        at sun.reflect.GeneratedConstructorAccessor3544.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1950)
        at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1945)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1944)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1514)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
        at org.jenkinsci.plugins.ParameterizedRemoteTrigger.utils.HttpHelper.readInputStream(HttpHelper.java:195)
        at org.jenkinsci.plugins.ParameterizedRemoteTrigger.utils.HttpHelper.sendHTTPCall(HttpHelper.java:507)
        at org.jenkinsci.plugins.ParameterizedRemoteTrigger.utils.HttpHelper.tryCall(HttpHelper.java:596)
        at org.jenkinsci.plugins.ParameterizedRemoteTrigger.utils.HttpHelper.tryPost(HttpHelper.java:611)
        at org.jenkinsci.plugins.ParameterizedRemoteTrigger.RemoteBuildConfiguration.performTriggerAndGetQueueId(RemoteBuildConfiguration.java:658)
        at org.jenkinsci.plugins.ParameterizedRemoteTrigger.pipeline.RemoteBuildPipelineStep$Execution.run(RemoteBuildPipelineStep.java:273)
        at org.jenkinsci.plugins.ParameterizedRemoteTrigger.pipeline.RemoteBuildPipelineStep$Execution.run(RemoteBuildPipelineStep.java:249)
        at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748) 

 

                    steps {
                        script {
triggerRemoteJob abortTriggeredJob: true, auth: TokenAuth(apiToken: '****', userName: 'admin'), enhancedLogging: true, job: 'https://jenkins.c.eu-de-1.cloud/job/MLF-Deployment/job/deploy.from.branch', maxConn: 1, parameters: '''GIT_REF=${params.stagingGitRef}
environment=${env.terraformEnvironment}
deployment=devbdp_deployment
taintServiceKeys=false
modelDeployment=false
runTests=${env.integrationTestsOnCF}
timeout_integration=${env.integrationTestsTimeout}
applyTerraform=${env.DeployToCF}''', pollInterval: 60, shouldNotFailBuild: true, useCrumbCache: true, useJobInfoCache: true
                        }
                    } 

 

[Pipeline] triggerRemoteJob
15:44:37  ################################################################################################################
15:44:37    Parameterized Remote Trigger Configuration:
15:44:37      - job:                     https://jenkins.c.eu-de-1.cloud/job/MLF-Deployment/job/deploy.from.branch 
15:44:37      - auth:                    'Token Authentication' as user 'admin'
15:44:37      - parameters:              [GIT_REF=${params.stagingGitRef}, environment=${env.terraformEnvironment}, deployment=devbdp_deployment, taintServiceKeys=false, modelDeployment=false, runTests=${env.integrationTestsOnCF}, timeout_integration=${env.integrationTestsTimeout}, applyTerraform=${env.DeployToCF}]
15:44:37      - blockBuildUntilComplete: true
15:44:37      - connectionRetryLimit:    5
15:44:37      - trustAllCertificates:    false
15:44:37  ################################################################################################################
[Pipeline] sh
15:44:37  Connection to remote server failed [500], waiting to retry - 60 seconds until next attempt. URL: https://jenkins.c.eu-de-1.cloud/job/MLF-Deployment/job/deploy.from.branch/api/json, parameters: 
[Pipeline] sh 

 

i tried nearly everything but nothing worked out for me. I followed the documentation here https://github.com/jenkinsci/parameterized-remote-trigger-plugin/blob/master/README.md

mgaert@gmx.de (JIRA)

unread,
Feb 13, 2020, 9:36:03 AM2/13/20
to jenkinsc...@googlegroups.com
Michael Gärtner updated an issue
 
Change By: Michael Gärtner
Priority: Minor Major
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages