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

Checking Status of remote job fail

    Details

    • Similar Issues:

      Description

      when trigger run remote job it can not get status for job that was executed and getting status from previous job
      log output is :
      Triggering this remote job: clear_files
      Not checking if the remote job clear_files is building.
      Triggering remote job now.
      Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build.
      Checking parameters of #21
      Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build.
      Query failed.
      Checking parameters of #20
      This job is build #[20] on the remote server.
      Blocking local job until remote job completes
      Remote build started!
      Remote build finished with status SUCCESS.
      Started calculate disk usage of build

      on remote server job id was 21

        Attachments

          Issue Links

            Activity

            Hide
            ad_robotics Adrian Popa added a comment - - edited

            I have the same problem. Using Jenkins v1.634 (also v1.647) to remotely trigger a job on Jenkins v1.646 and using Parameterized Remote Trigger Plugin v2.2.2.
            Job gets triggered successfully but the log shows Query failed and then checks the status of a previous build. Exactly as described by abelous

            Did anyone try to fix this?

            Show
            ad_robotics Adrian Popa added a comment - - edited I have the same problem. Using Jenkins v1.634 (also v1.647) to remotely trigger a job on Jenkins v1.646 and using Parameterized Remote Trigger Plugin v2.2.2. Job gets triggered successfully but the log shows Query failed and then checks the status of a previous build. Exactly as described by abelous Did anyone try to fix this?
            Hide
            ad_robotics Adrian Popa added a comment - - edited

            Temporary workaround!
            Apparently this plugin identifies the remote jobs current build by checking if the build parameters match. As to why, I don't know.
            A fix for this is to pass on to the remote job a unique value, the build number of the triggering job. Thus every build will have a unique number associated to it.

            Jenkins A -> Job A -> Trigger a remote parameterized job / Parameters / uniqueMarker=$BUILD_NUMBER
            Jenkins B -> Job B -> Check This build is parameterized and add string uniqueMarker
            Job A on Jenkins A triggers Job B on Jenkins B through the plugin.
            This circumvents the problem.

            Show
            ad_robotics Adrian Popa added a comment - - edited Temporary workaround! Apparently this plugin identifies the remote jobs current build by checking if the build parameters match. As to why, I don't know. A fix for this is to pass on to the remote job a unique value, the build number of the triggering job. Thus every build will have a unique number associated to it. Jenkins A -> Job A -> Trigger a remote parameterized job / Parameters / uniqueMarker=$BUILD_NUMBER Jenkins B -> Job B -> Check This build is parameterized and add string uniqueMarker Job A on Jenkins A triggers Job B on Jenkins B through the plugin. This circumvents the problem.
            Hide
            cnagaraju Chinmayee Nagaraju added a comment -

            Adrian Pop
            How do you use this uniqueMarker=$BUILD_NUMBER ? I still see this when i provide uniqueMarker

            Triggering remote job now.
            Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build.
            Checking parameters of #25
            Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build.
            Query failed.
            Checking parameters of #24
            Unable to find expected value for Environment
            Unable to find expected value for platform
            Unable to find expected value for testsuit
            Unable to find expected value for summarypath
            Unable to find expected value for createbugonfailure
            Unable to find expected value for cyclename
            Unable to find expected value for fuzenodeLoc
            Unable to find expected value for fullyQaulifiedDomainName
            Param uniqueMarker doesn't match!
            Checking parameters of #26
            Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build.
            Query failed.
            Checking parameters of #23
            Unable to find expected value for Environment
            Unable to find expected value for platform
            Unable to find expected value for testsuit
            Unable to find expected value for summarypath
            Unable to find expected value for createbugonfailure
            Unable to find expected value for cyclename
            Unable to find expected value for fuzenodeLoc
            Unable to find expected value for fullyQaulifiedDomainName
            This job is build #[23] on the remote server.
            
            Show
            cnagaraju Chinmayee Nagaraju added a comment - Adrian Pop How do you use this uniqueMarker=$BUILD_NUMBER ? I still see this when i provide uniqueMarker Triggering remote job now. Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build. Checking parameters of #25 Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build. Query failed. Checking parameters of #24 Unable to find expected value for Environment Unable to find expected value for platform Unable to find expected value for testsuit Unable to find expected value for summarypath Unable to find expected value for createbugonfailure Unable to find expected value for cyclename Unable to find expected value for fuzenodeLoc Unable to find expected value for fullyQaulifiedDomainName Param uniqueMarker doesn't match! Checking parameters of #26 Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build. Query failed. Checking parameters of #23 Unable to find expected value for Environment Unable to find expected value for platform Unable to find expected value for testsuit Unable to find expected value for summarypath Unable to find expected value for createbugonfailure Unable to find expected value for cyclename Unable to find expected value for fuzenodeLoc Unable to find expected value for fullyQaulifiedDomainName This job is build #[23] on the remote server.
            Hide
            ad_robotics Adrian Popa added a comment - - edited

            Chinmayee Nagaraju
            Job A on Jenkins A triggers a job B on Jenkins B.
            In job A's config page, go to Trigger a remote parameterized job (the plugin) / Job Info / Parameters and write "uniqueMarker=$BUILD_NUMBER", without the quotes.
            In Job B's config check "This is a parameterized build" and add a string parameter called uniqueMarker.
            That's it The remote trigger plugin seems to identify the build you just triggered by the parameters it has been started with, and not by the build number. I guess this is because the build (of job B) doesn't get a build number until it exits the queue. You can use any parameter name with any unique value, something like the current time would also work.

            Show
            ad_robotics Adrian Popa added a comment - - edited Chinmayee Nagaraju Job A on Jenkins A triggers a job B on Jenkins B. In job A's config page, go to Trigger a remote parameterized job (the plugin) / Job Info / Parameters and write "uniqueMarker=$BUILD_NUMBER", without the quotes. In Job B's config check "This is a parameterized build" and add a string parameter called uniqueMarker. That's it The remote trigger plugin seems to identify the build you just triggered by the parameters it has been started with, and not by the build number. I guess this is because the build (of job B) doesn't get a build number until it exits the queue. You can use any parameter name with any unique value, something like the current time would also work.
            Hide
            cnagaraju Chinmayee Nagaraju added a comment -

            Thanks ! it works when there is only 1 parameter - uniqueMarker on the remote job .. when there are multiple other parameters.. it still is checking for the older builds

            Show
            cnagaraju Chinmayee Nagaraju added a comment - Thanks ! it works when there is only 1 parameter - uniqueMarker on the remote job .. when there are multiple other parameters.. it still is checking for the older builds
            Hide
            ad_robotics Adrian Popa added a comment -

            IT works just fine with multiple parameters for me. I print the message in Job B in the console and exit with that exit code.

            Show
            ad_robotics Adrian Popa added a comment - IT works just fine with multiple parameters for me. I print the message in Job B in the console and exit with that exit code.
            Hide
            mhelff Martin Helff added a comment -

            This happens when the new build is queued on the remote. The scan for the build number will receive an empty result when looking up the status of the remote build:

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

            The automatic scan (+-2 build numbers) most likely will pick the older build and then report the "wrong" results.

            I just created a patch (pull req #23) on Github, which adds an option that forces to only check the next build number and not to "guess" it.

            Show
            mhelff Martin Helff added a comment - This happens when the new build is queued on the remote. The scan for the build number will receive an empty result when looking up the status of the remote build: Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build. The automatic scan (+-2 build numbers) most likely will pick the older build and then report the "wrong" results. I just created a patch (pull req #23) on Github, which adds an option that forces to only check the next build number and not to "guess" it.
            Hide
            rishabh_sharma Rishabh Sharma added a comment -

            I am also facing same issue with Jenkins while triggering remote jenkins job:

            Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build.
            ERROR: Build step failed with exception
            java.lang.NullPointerException
            	at org.jenkinsci.plugins.ParameterizedRemoteTrigger.RemoteBuildConfiguration.isRemoteJobParameterized(RemoteBuildConfiguration.java:1167)
            	at org.jenkinsci.plugins.ParameterizedRemoteTrigger.RemoteBuildConfiguration.perform(RemoteBuildConfiguration.java:488)
            	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
            	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
            	at hudson.model.Build$BuildExecution.build(Build.java:205)
            	at hudson.model.Build$BuildExecution.doRun(Build.java:162)
            	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
            	at com.tikal.jenkins.plugins.multijob.MultiJobBuild$MultiJobRunnerImpl.run(MultiJobBuild.java:136)
            	at hudson.model.Run.execute(Run.java:1738)
            	at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:73)
            	at hudson.model.ResourceController.execute(ResourceController.java:98)
            	at hudson.model.Executor.run(Executor.java:410)
            Build step 'Trigger a remote parameterized job' marked build as failure
            Notifying upstream projects of job completion
            Finished: FAILURE
            

            Is it just the same we are discussing here?

            Show
            rishabh_sharma Rishabh Sharma added a comment - I am also facing same issue with Jenkins while triggering remote jenkins job: Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build. ERROR: Build step failed with exception java.lang.NullPointerException at org.jenkinsci.plugins.ParameterizedRemoteTrigger.RemoteBuildConfiguration.isRemoteJobParameterized(RemoteBuildConfiguration.java:1167) at org.jenkinsci.plugins.ParameterizedRemoteTrigger.RemoteBuildConfiguration.perform(RemoteBuildConfiguration.java:488) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.Build$BuildExecution.build(Build.java:205) at hudson.model.Build$BuildExecution.doRun(Build.java:162) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at com.tikal.jenkins.plugins.multijob.MultiJobBuild$MultiJobRunnerImpl.run(MultiJobBuild.java:136) at hudson.model.Run.execute(Run.java:1738) at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:73) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Build step 'Trigger a remote parameterized job' marked build as failure Notifying upstream projects of job completion Finished: FAILURE Is it just the same we are discussing here?
            Hide
            mzeyen Maik Zeyen added a comment -

            Rishabh Sharma: I got this message when my remote job does not have a parameter. Just like in this comment from Adrian Popa:
            https://issues.jenkins-ci.org/browse/JENKINS-32462?focusedCommentId=255097&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-255097
            your remote job needs a parameter.

            Show
            mzeyen Maik Zeyen added a comment - Rishabh Sharma : I got this message when my remote job does not have a parameter. Just like in this comment from Adrian Popa: https://issues.jenkins-ci.org/browse/JENKINS-32462?focusedCommentId=255097&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-255097 your remote job needs a parameter.
            Hide
            markuskiss Markus Kiss added a comment -

            We are facing the same issue... I saw that many pull requests are pending on the parameterized build trigger plugin since a year now: https://github.com/jenkinsci/parameterized-remote-trigger-plugin/pulls that fix many issues that are open here. Is the project still actively maintained, Maurice W.? Thanks in advance!

            Show
            markuskiss Markus Kiss added a comment - We are facing the same issue... I saw that many pull requests are pending on the parameterized build trigger plugin since a year now: https://github.com/jenkinsci/parameterized-remote-trigger-plugin/pulls that fix many issues that are open here. Is the project still actively maintained, Maurice W. ? Thanks in advance!
            Hide
            funeeldy marlene cote added a comment -

            Hello. Is this plugin supported? will this bug get fixed soon? it is causing many problems for us. thank you

            Show
            funeeldy marlene cote added a comment - Hello. Is this plugin supported? will this bug get fixed soon? it is causing many problems for us. thank you
            Hide
            piratejohnny Jon B added a comment -

            huge thank you waiting for whoever fixes this...

            Show
            piratejohnny Jon B added a comment - huge thank you waiting for whoever fixes this...
            Hide
            illenseer illenseer added a comment -

            What is the status of the pending pull requests... - Will anyone please fix/maintain this? Maurice W.? - Thanks.

            Show
            illenseer illenseer added a comment - What is the status of the pending pull requests... - Will anyone please fix/maintain this? Maurice W. ? - Thanks.
            Hide
            himanshu_paliwal Himanshu Paliwal added a comment -

            Any Update on above issue?

            Show
            himanshu_paliwal Himanshu Paliwal added a comment - Any Update on above issue?
            Hide
            cashlalala KaiHsiang Chang added a comment -

            fixed in v3.0.1

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

              People

              • Assignee:
                cashlalala KaiHsiang Chang
                Reporter:
                abelous abelous
              • Votes:
                20 Vote for this issue
                Watchers:
                25 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: