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

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

    XMLWordPrintable

Details

    Description

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

      Attachments

        Activity

          sramage Steve Ramage created issue -
          sramage Steve Ramage made changes -
          Field Original Value New Value
          Description 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 Checking the "Do not fail if remote fails" button will cause cancellation requests to be ignored.
          bpowell 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();
            }
          }
          
          bpowell 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(); } }
          bpowell 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> ...
          
          bpowell 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> ...
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 164089 ] JNJira + In-Review [ 181505 ]
          seanf Sean Flanigan added a comment - There seems to be a related pull request:  https://github.com/jenkinsci/parameterized-remote-trigger-plugin/pull/12

          People

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

            Dates

              Created:
              Updated: