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

Using Remote Trigger Plugin and properties files can get job into a weird state where it cannot be aborted

      Using this to execute a remote job on another jenkins system
      I had the block check box checked and was trying to use a properties file in the workspace for the parameters

      The job never triggered the remote job on the other jenkins server. The other jenkins server is indeed up. Predefined params with same configuration was working. When tried to do this with properties file check box.. the job got into a BAD state. I tried to abort, did not work. I tried to toggle node offline and disconnect the node, did not work

      The job is in an infinite loop.... this is REALLY bad
      I cannot kill this job. I think I am going to kill the process on the node.

      [EnvInject] - Loading node environment variables.
      Building remotely on rh632-us506 in workspace /var/lib/jenkins/workspace/LLBB3-Work-Queue
      Run condition [Regular expression match] enabling prebuild for step [Trigger/call builds on other projects]
      Run condition [Regular expression match] enabling prebuild for step [Trigger a remote parameterized job]
      [LLBB3-Work-Queue] $ /bin/sh -xe /tmp/hudson3940059047949035559.sh
      + echo 3133
      3133
      + echo SequoiaBuild=3133
      Regular expression run condition: Expression=[^SCN$], Label=[Sequoia]
      Run condition [Regular expression match] preventing perform for step [Trigger/call builds on other projects]
      Regular expression run condition: Expression=[^Sequoia$], Label=[Sequoia]
      Run condition [Regular expression match] enabling perform for step [Trigger a remote parameterized job]
      Triggering this remote job: BVT1-csdl-glider-1
      Not checking if the remote job BVT1-csdl-glider-1 is building.
      This job is build #[111] on the remote server.
      Triggering remote job now.
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      Retry attempt #1 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      Retry attempt #2 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      Retry attempt #3 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      Retry attempt #4 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      Retry attempt #5 out of 5
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: Max number of connection retries have been exeeded.
      Blocking local job until remote job completes
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      Retry attempt #1 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      Retry attempt #2 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      Retry attempt #3 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      Retry attempt #4 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      Retry attempt #5 out of 5
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: Max number of connection retries have been exeeded.
      Waiting for remote build to start.
      Waiting for 60 seconds until next poll.
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      Retry attempt #1 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      Retry attempt #2 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      Retry attempt #3 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      Retry attempt #4 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      Retry attempt #5 out of 5
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: Max number of connection retries have been exeeded.
      Waiting for remote build to start.
      Waiting for 60 seconds until next poll.
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      Retry attempt #1 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      Retry attempt #2 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      Retry attempt #3 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      Retry attempt #4 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      Retry attempt #5 out of 5
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: Max number of connection retries have been exeeded.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Waiting for remote build to start.
      Waiting for 60 seconds until next poll.
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #1 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #2 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #3 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #4 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #5 out of 5
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: Max number of connection retries have been exeeded.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Waiting for remote build to start.
      Waiting for 60 seconds until next poll.
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #1 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #2 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #3 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #4 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #5 out of 5
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: Max number of connection retries have been exeeded.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Waiting for remote build to start.
      Waiting for 60 seconds until next poll.
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #1 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #2 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #3 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #4 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #5 out of 5
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: Max number of connection retries have been exeeded.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Waiting for remote build to start.
      Waiting for 60 seconds until next poll.
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #1 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #2 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #3 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #4 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #5 out of 5
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: Max number of connection retries have been exeeded.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Waiting for remote build to start.
      Waiting for 60 seconds until next poll.
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #1 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #2 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #3 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #4 out of 5
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #5 out of 5
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: Max number of connection retries have been exeeded.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Waiting for remote build to start.
      Waiting for 60 seconds until next poll.
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #1 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #2 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #3 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #4 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #5 out of 5
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: Max number of connection retries have been exeeded.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Waiting for remote build to start.
      Waiting for 60 seconds until next poll.
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #1 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #2 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #3 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #4 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #5 out of 5
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: Max number of connection retries have been exeeded.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Waiting for remote build to start.
      Waiting for 60 seconds until next poll.
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #1 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #2 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #3 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      Retry attempt #4 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #5 out of 5
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: Max number of connection retries have been exeeded.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Waiting for remote build to start.
      Waiting for 60 seconds until next poll.
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #1 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #2 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #3 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #4 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #5 out of 5
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: Max number of connection retries have been exeeded.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Waiting for remote build to start.
      Waiting for 60 seconds until next poll.
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #1 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #2 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #3 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #4 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #5 out of 5
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: Max number of connection retries have been exeeded.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Waiting for remote build to start.
      Waiting for 60 seconds until next poll.
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #1 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #2 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #3 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.
      ERROR: Remote build failed for the following reason, but the build will continue:
      ERROR: null
      Retry attempt #4 out of 5
      Connection to remote server failed, waiting for to retry - 60 seconds until next attempt.

          [JENKINS-24731] Using Remote Trigger Plugin and properties files can get job into a weird state where it cannot be aborted

          Ok I powered off the node this job was running on and still cannot abort this job, there is something seriously wrong with this plugin
          I added core to this.. because that should be able to overwrite and kill this job but I cannot. I am probably going to have to reboot the server

          Lorelei McCollum added a comment - Ok I powered off the node this job was running on and still cannot abort this job, there is something seriously wrong with this plugin I added core to this.. because that should be able to overwrite and kill this job but I cannot. I am probably going to have to reboot the server

          Yeah I had to restart the jenkins server to kill this. VERY bad

          Lorelei McCollum added a comment - Yeah I had to restart the jenkins server to kill this. VERY bad

          Daniel Beck added a comment -

          Not a core issue. There's little core can do about a plugin that catches InterruptedException in what's effectively a 'while(true)' loop.

          Daniel Beck added a comment - Not a core issue. There's little core can do about a plugin that catches InterruptedException in what's effectively a 'while(true)' loop.

          Ahh Thanks for the information, I didn't know if core would allow things like this or not. Not good though. Hopefully the plugin team can get a fix out for this

          Lorelei McCollum added a comment - Ahh Thanks for the information, I didn't know if core would allow things like this or not. Not good though. Hopefully the plugin team can get a fix out for this

          This is the issue in the code

          while (preCheckResponse.getBoolean("building") == true || preCheckResponse.getString("result") == null) {
          listener.getLogger().println("Remote build is currently running - waiting for it to finish.");
          preCheckResponse = sendHTTPCall(preCheckUrlString, "POST", build, listener);
          listener.getLogger().println("Waiting for " + this.pollInterval + " seconds until next retry.");
          // Sleep for 'pollInterval' seconds.
          // Sleep takes miliseconds so need to convert this.pollInterval to milisecopnds (x 1000)
          try {
          Thread.sleep(this.pollInterval * 1000);
          } catch (InterruptedException e) {
          this.failBuild(e, listener);
          }
          }

          failBuild never is allowed to get into the abort exception because the boolean variable that would allow that is never modified after instance created

          Lorelei McCollum added a comment - This is the issue in the code while (preCheckResponse.getBoolean("building") == true || preCheckResponse.getString("result") == null) { listener.getLogger().println("Remote build is currently running - waiting for it to finish."); preCheckResponse = sendHTTPCall(preCheckUrlString, "POST", build, listener); listener.getLogger().println("Waiting for " + this.pollInterval + " seconds until next retry."); // Sleep for 'pollInterval' seconds. // Sleep takes miliseconds so need to convert this.pollInterval to milisecopnds (x 1000) try { Thread.sleep(this.pollInterval * 1000); } catch (InterruptedException e) { this.failBuild(e, listener); } } failBuild never is allowed to get into the abort exception because the boolean variable that would allow that is never modified after instance created

          Maurice W. added a comment -

          Hm, don't see why that would cause an issue.
          The lines you indicated above are polling the remote server to check if the scheduled job is running yet or yet. If the remote job is still running (aka: the status is "building") then this job will just keep sleeping and re-trying until the remote job is done.

          The only way I can see that this would fall in to a "while(true)" loop is if the remote job never terminates.

          Can you provide some info on what your setup is like or how you were triggering this issue? Or maybe even a log file?

          Maurice W. added a comment - Hm, don't see why that would cause an issue. The lines you indicated above are polling the remote server to check if the scheduled job is running yet or yet. If the remote job is still running (aka: the status is "building") then this job will just keep sleeping and re-trying until the remote job is done. The only way I can see that this would fall in to a "while(true)" loop is if the remote job never terminates. Can you provide some info on what your setup is like or how you were triggering this issue? Or maybe even a log file?

          Could you try v3.0.1 for bug reproduction? 

          According to  your description, I think your issue should be fixed already. 

          KaiHsiang Chang added a comment - Could you try v3.0.1 for bug reproduction?  According to  your description, I think your issue should be fixed already. 

            cashlalala KaiHsiang Chang
            lorelei Lorelei McCollum
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: