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

User cannot cancel build if "Do not fail if remote fails" is set.

      Checking the "Do not fail if remote fails" button will cause cancellation requests to be ignored.

          [JENKINS-29220] User cannot cancel build if "Do not fail if remote fails" is set.

          Steve Ramage created issue -
          Steve Ramage made changes -
          Description Original: When clicking the "Validate Address" button, if an error occurs the user will only be told "Address looks good but we are unable to connect to it". Please include some helpful error message New: Checking the "Do not fail if remote fails" button will cause cancellation requests to be ignored.

          Bob Powell added a comment -

          I see this issue occassionally when a remote node is down.

          Attempts to cancel the job are ignored.

          The workaround I use is to find out the executor thread and kill it by name (from the Jenkins script console)

          Thread.getAllStackTraces().keySet().each() {
            t -> println("Name: " + t.getName());
          }
          

          and kill the thread with

          Thread.getAllStackTraces().keySet().each() {
            t -> println("Name: " + t.getName());
            if (t.getName() == " Executor #<insert details>" ){
              println("stopping");
              t.stop();
            }
          }
          

          Bob Powell added a comment - I see this issue occassionally when a remote node is down. Attempts to cancel the job are ignored. The workaround I use is to find out the executor thread and kill it by name (from the Jenkins script console) Thread .getAllStackTraces().keySet().each() { t -> println( "Name: " + t.getName()); } and kill the thread with Thread .getAllStackTraces().keySet().each() { t -> println( "Name: " + t.getName()); if (t.getName() == " Executor #<insert details>" ){ println( "stopping" ); t.stop(); } }

          Bob Powell added a comment -

          For the record, the console log contains the following

          This job is build #[2885] on the remote server.
          Triggering remote job now.
          Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build.
          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.
          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.
          ..... <repeated until job is killed from script console> ...
          

          Bob Powell added a comment - For the record, the console log contains the following This job is build #[2885] on the remote server. Triggering remote job now. Remote Jenkins server returned empty response or invalid JSON - but we can still proceed with the remote build. 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. 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. ..... <repeated until job is killed from script console> ...
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 164089 ] New: JNJira + In-Review [ 181505 ]

          Sean Flanigan added a comment -

          Sean Flanigan added a comment - There seems to be a related pull request:  https://github.com/jenkinsci/parameterized-remote-trigger-plugin/pull/12

            morficus Maurice W.
            sramage Steve Ramage
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: