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

Cannot contact agent-1: java.io.IOException: cannot find current thread

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • workflow-cps-plugin

      We have upgraded to the jenkins version 2.479.1 and the mentioned plugin versions at 20th November 2024.
      Since last Xmas we are facing (or did we just recognize it a month later?) that our pipeline runs are failing after successful build in the deploy to cloud foundry stage. An exemplary log follows:

      [2025-01-03T07:06:25.296Z] info  cloudFoundryDeploy - Staging application "cp-not-db"...
      [2025-01-03T07:07:21.477Z] info  cloudFoundryDeploy - Executing task "deploy" on application "cp-not-db"...
      [2025-01-03T07:07:21.477Z] Cannot contact agent-1: java.io.IOException: cannot find current thread 

      I have rated the priority to critical, because we are not able to get a complete successful run.

        1. plugins.txt
          6 kB
        2. run-jenkins.sh
          1 kB
        3. plugin_versions.txt
          6 kB

          [JENKINS-75085] Cannot contact agent-1: java.io.IOException: cannot find current thread

          Markus created issue -
          Markus made changes -
          Description Original: We have upgraded to the jenkins version 2.479.1 and the mentioned plugin versions at 20th November 2024.
          Since last Xmas we are facing (or did we just recognize it a month later?) that our pipeline runs are failing after successful build in the deploy to cloud foundry stage. An exemplary log follows:


          [2025-01-03T07:06:25.296Z] info cloudFoundryDeploy - Staging application "cp-not-db-blue"...
          [|https://jenkins.copin.c.eu-de-1.cloud.sap/blue/organizations/jenkins/CoPM%2Fcopin-notification-service/detail/master/438/pipeline/#step-2339-log-80][2025-01-03T07:07:18.177Z] ERROR: also cancelling shell steps running on agent-1
          [|https://jenkins.copin.c.eu-de-1.cloud.sap/blue/organizations/jenkins/CoPM%2Fcopin-notification-service/detail/master/438/pipeline/#step-2339-log-83][2025-01-03T07:07:21.477Z] Cannot contact agent-1: java.io.IOException: cannot find current thread
           
          New: We have upgraded to the jenkins version 2.479.1 and the mentioned plugin versions at 20th November 2024.
          Since last Xmas we are facing (or did we just recognize it a month later?) that our pipeline runs are failing after successful build in the deploy to cloud foundry stage. An exemplary log follows:

          [2025-01-03T07:06:25.296Z] info cloudFoundryDeploy - Staging application "cp-not-db-blue"...
          [.../cp-not-service/detail/master/438/pipeline/#step-2339-log-80|https://jenkins.copin.c.eu-de-1.cloud.sap/blue/organizations/jenkins/CoPM%2Fcopin-notification-service/detail/master/438/pipeline/#step-2339-log-80][2025-01-03T07:07:18.177Z] ERROR: also cancelling shell steps running on agent-1
          .../[cp-not-service/detail/master/438/pipeline/#step-2339-log-83|https://jenkins.copin.c.eu-de-1.cloud.sap/blue/organizations/jenkins/CoPM%2Fcopin-notification-service/detail/master/438/pipeline/#step-2339-log-83][2025-01-03T07:07:21.477Z] Cannot contact agent-1: java.io.IOException: cannot find current thread
           
          Markus made changes -
          Description Original: We have upgraded to the jenkins version 2.479.1 and the mentioned plugin versions at 20th November 2024.
          Since last Xmas we are facing (or did we just recognize it a month later?) that our pipeline runs are failing after successful build in the deploy to cloud foundry stage. An exemplary log follows:

          [2025-01-03T07:06:25.296Z] info cloudFoundryDeploy - Staging application "cp-not-db-blue"...
          [.../cp-not-service/detail/master/438/pipeline/#step-2339-log-80|https://jenkins.copin.c.eu-de-1.cloud.sap/blue/organizations/jenkins/CoPM%2Fcopin-notification-service/detail/master/438/pipeline/#step-2339-log-80][2025-01-03T07:07:18.177Z] ERROR: also cancelling shell steps running on agent-1
          .../[cp-not-service/detail/master/438/pipeline/#step-2339-log-83|https://jenkins.copin.c.eu-de-1.cloud.sap/blue/organizations/jenkins/CoPM%2Fcopin-notification-service/detail/master/438/pipeline/#step-2339-log-83][2025-01-03T07:07:21.477Z] Cannot contact agent-1: java.io.IOException: cannot find current thread
           
          New: We have upgraded to the jenkins version 2.479.1 and the mentioned plugin versions at 20th November 2024.
          Since last Xmas we are facing (or did we just recognize it a month later?) that our pipeline runs are failing after successful build in the deploy to cloud foundry stage. An exemplary log follows:

          [2025-01-03T07:06:25.296Z] info  cloudFoundryDeploy - Staging application "cp-not-db-blue"...
          [2025-01-03T07:07:21.477Z] info  cloudFoundryDeploy - Executing task "deploy" on application "cp-not-db-blue"...
          [2025-01-03T07:07:21.477Z] Cannot contact agent-1: java.io.IOException: cannot find current thread 
          Markus made changes -
          Description Original: We have upgraded to the jenkins version 2.479.1 and the mentioned plugin versions at 20th November 2024.
          Since last Xmas we are facing (or did we just recognize it a month later?) that our pipeline runs are failing after successful build in the deploy to cloud foundry stage. An exemplary log follows:

          [2025-01-03T07:06:25.296Z] info  cloudFoundryDeploy - Staging application "cp-not-db-blue"...
          [2025-01-03T07:07:21.477Z] info  cloudFoundryDeploy - Executing task "deploy" on application "cp-not-db-blue"...
          [2025-01-03T07:07:21.477Z] Cannot contact agent-1: java.io.IOException: cannot find current thread 
          New: We have upgraded to the jenkins version 2.479.1 and the mentioned plugin versions at 20th November 2024.
          Since last Xmas we are facing (or did we just recognize it a month later?) that our pipeline runs are failing after successful build in the deploy to cloud foundry stage. An exemplary log follows:

          [2025-01-03T07:06:25.296Z] info  cloudFoundryDeploy - Staging application "cp-not-db-blue"...
          [2025-01-03T07:07:21.477Z] info  cloudFoundryDeploy - Executing task "deploy" on application "cp-not-db-blue"...
          [2025-01-03T07:07:21.477Z] Cannot contact agent-1: java.io.IOException: cannot find current thread 

          I have rated the priority to critical, because we are not able to get a complete successful run.
          Priority Original: Minor [ 4 ] New: Critical [ 2 ]
          Markus made changes -
          Description Original: We have upgraded to the jenkins version 2.479.1 and the mentioned plugin versions at 20th November 2024.
          Since last Xmas we are facing (or did we just recognize it a month later?) that our pipeline runs are failing after successful build in the deploy to cloud foundry stage. An exemplary log follows:

          [2025-01-03T07:06:25.296Z] info  cloudFoundryDeploy - Staging application "cp-not-db-blue"...
          [2025-01-03T07:07:21.477Z] info  cloudFoundryDeploy - Executing task "deploy" on application "cp-not-db-blue"...
          [2025-01-03T07:07:21.477Z] Cannot contact agent-1: java.io.IOException: cannot find current thread 

          I have rated the priority to critical, because we are not able to get a complete successful run.
          New: We have upgraded to the jenkins version 2.479.1 and the mentioned plugin versions at 20th November 2024.
          Since last Xmas we are facing (or did we just recognize it a month later?) that our pipeline runs are failing after successful build in the deploy to cloud foundry stage. An exemplary log follows:

          [2025-01-03T07:06:25.296Z] info  cloudFoundryDeploy - Staging application "cp-not-db"...
          [2025-01-03T07:07:21.477Z] info  cloudFoundryDeploy - Executing task "deploy" on application "cp-not-db"...
          [2025-01-03T07:07:21.477Z] Cannot contact agent-1: java.io.IOException: cannot find current thread 

          I have rated the priority to critical, because we are not able to get a complete successful run.
          Mark Waite made changes -
          Attachment New: plugins.txt [ 63757 ]
          Mark Waite made changes -
          Attachment New: run-jenkins.sh [ 63758 ]

          Mark Waite added a comment - - edited

          I'm not able to duplicate the failure as reported. Others will likely have the same issue because there is not enough information in the report so that others can duplicate the issue from a fresh Jenkins installation. Here are the steps that I took while trying to duplicate the issue:

          1. Create a plugins.txt file that lists the installed plugins and their versions (without the nexus-jenkins-plugin, since it is a proprietary plugin that is no longer distributed by the Jenkins update center)
          2. Create a run-jenkins.sh shell script that downloads the proprietary nexus-jenkins-plugin, uses the plugin installation manager tool to download the other plugins, and downloads Jenkins 2.479.1
          3. Run the run-jenkins.sh shell script and complete the setup wizard by creating a new user and installing no additional plugins
          4. Define an inbound agent and connect that inbound agent
          5. Adjust the number of executors on the Jenkins controller to 0 so that the inbound agent will be used for all jobs
          6. Create a "Hello world" Pipeline job and confirm that it runs on the agent
          7. Add a Pipeline step to the "Hello world" job based on the first example in the Sonatype documentation and confirm that it fails because I do not have a Cloud Foundry installation
          8. Create a Freestyle project and add a "Push to cloud foundry" build step that uses Cl, confirm that it fails because I don't have access to a Cloud Foundry installation

          If there are other maintainers that have access to a Cloud Foundry installation, they might be able to make more progress than I made. More detailed steps that allow others to duplicate the issue will probably be appreciated by others.

          Mark Waite added a comment - - edited I'm not able to duplicate the failure as reported. Others will likely have the same issue because there is not enough information in the report so that others can duplicate the issue from a fresh Jenkins installation. Here are the steps that I took while trying to duplicate the issue: Create a plugins.txt file that lists the installed plugins and their versions (without the nexus-jenkins-plugin, since it is a proprietary plugin that is no longer distributed by the Jenkins update center) Create a run-jenkins.sh shell script that downloads the proprietary nexus-jenkins-plugin , uses the plugin installation manager tool to download the other plugins, and downloads Jenkins 2.479.1 Run the run-jenkins.sh shell script and complete the setup wizard by creating a new user and installing no additional plugins Define an inbound agent and connect that inbound agent Adjust the number of executors on the Jenkins controller to 0 so that the inbound agent will be used for all jobs Create a "Hello world" Pipeline job and confirm that it runs on the agent Add a Pipeline step to the "Hello world" job based on the first example in the Sonatype documentation and confirm that it fails because I do not have a Cloud Foundry installation Create a Freestyle project and add a "Push to cloud foundry" build step that uses Cl, confirm that it fails because I don't have access to a Cloud Foundry installation If there are other maintainers that have access to a Cloud Foundry installation, they might be able to make more progress than I made. More detailed steps that allow others to duplicate the issue will probably be appreciated by others.

          Mark Waite added a comment -

          There are other reports of a similar message, but those reports do not included detailed steps that will allow others to duplicate the issue. There are also suggestions that the symptom "cannot find current thread" may occur for many different reasons. Some of the issues that refer to that message include:

          Mark Waite added a comment - There are other reports of a similar message, but those reports do not included detailed steps that will allow others to duplicate the issue. There are also suggestions that the symptom "cannot find current thread" may occur for many different reasons. Some of the issues that refer to that message include: JENKINS-56890 JENKINS-70993 JENKINS-73336 JENKINS-75062

          Markus added a comment -

          it showed that the misbehavior of agent-1 was somehow caused by agent-2. i did take agent-2 offline and did no longer face this issue.

          Markus added a comment - it showed that the misbehavior of agent-1 was somehow caused by agent-2. i did take agent-2 offline and did no longer face this issue.

            Unassigned Unassigned
            markus_lanz Markus
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: