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. plugin_versions.txt
          6 kB
        2. run-jenkins.sh
          1 kB
        3. plugins.txt
          6 kB

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

          Philippe added a comment -

          Good point. Jenkins master and the nodes are running SLES 15 SP2. OS Patch level for the nodes should be the same. Each of them running on an own machine inside a docker container.

          markewaite Issue was reopened yesterday.

          Philippe added a comment - Good point. Jenkins master and the nodes are running SLES 15 SP2. OS Patch level for the nodes should be the same. Each of them running on an own machine inside a docker container. markewaite Issue was reopened yesterday.

          David added a comment -

          I'm currently facing the same scenario with same Jenkins version 2.479.1. Jenkins together with plugins was also upgraded in November 2024. Running on Windows Server 2022, pipeline running on built-in node.

          Cannot contact : java.io.IOException: cannot find current threadAgent was removed
          org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 422deb70-d017-4614-85b1-69ce267df93c
          Finished: ABORTED

          David added a comment - I'm currently facing the same scenario with same Jenkins version 2.479.1. Jenkins together with plugins was also upgraded in November 2024. Running on Windows Server 2022, pipeline running on built-in node. Cannot contact : java.io.IOException: cannot find current threadAgent was removed org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 422deb70-d017-4614-85b1-69ce267df93c Finished: ABORTED

          Andrea added a comment -

          A little update: today we have tried to enable the built-in node and it is working.

          The built-in node runs on the same machine as the node that has the issue, so we are a little more confused.

          Andrea added a comment - A little update: today we have tried to enable the built-in node and it is working. The built-in node runs on the same machine as the node that has the issue, so we are a little more confused.

          David added a comment -

          Little update here also: After restarting the host, the pipeline executed successfully 2 times (it is scheduled).

          David added a comment - Little update here also: After restarting the host, the pipeline executed successfully 2 times (it is scheduled).

          Philippe added a comment -

          Update from our end, too: After restarting Jenkins master instance everything seems to be running smoothly again. But we still have no clue where or this error was appearing...

          Philippe added a comment - Update from our end, too: After restarting Jenkins master instance everything seems to be running smoothly again. But we still have no clue where or this error was appearing...

          David added a comment -

          This error appeared again after a month, restarting the Jenkins instance solved the issue once again.

          David added a comment - This error appeared again after a month, restarting the Jenkins instance solved the issue once again.

          Vladimir added a comment - - edited

          We found a really strange workaround for that, but maybe it will help someone

          Jenkins 2.496, latest plugins.

          In our Jenkins it only appeared on one agent - "***-win-10" to be precisely. We recreated VM with agent, Jenkins node on Jenkins, upgraded plugins and jenkins itself but nothing helped.

          But somehow recreating Jenkins agent node for the same server as "***-win-11" somehow fixed the problem.

          Vladimir added a comment - - edited We found a really strange workaround for that, but maybe it will help someone Jenkins 2.496, latest plugins. In our Jenkins it only appeared on one agent - "***-win-10" to be precisely. We recreated VM with agent, Jenkins node on Jenkins, upgraded plugins and jenkins itself but nothing helped. But somehow recreating Jenkins agent node for the same server as "***-win-11" somehow fixed the problem.

          David added a comment -

          I read somewhere that this issue may be related to down level envinject plugin.  The version we're using is the same version posted by andrea_albano in the plugin_versions.txt document

          envinject-api:1.199.v3ce31253ed13

          Anyone know if updating to the latest plugin version resolves the issue?

          https://plugins.jenkins.io/envinject-api/

           

          David added a comment - I read somewhere that this issue may be related to down level envinject plugin.  The version we're using is the same version posted by andrea_albano in the plugin_versions.txt document envinject-api:1.199.v3ce31253ed13 Anyone know if updating to the latest plugin version resolves the issue? https://plugins.jenkins.io/envinject-api/  

          David added a comment -

          Also we started to see this issue after upgrading Jenkins to version 2.492.1 which required us to update from Java 11 to Java 17.

          David added a comment - Also we started to see this issue after upgrading Jenkins to version 2.492.1 which required us to update from Java 11 to Java 17.

          Andrea added a comment - - edited

          Today we did a full update of all the plugins and the Ubuntu packets.

          The issue is still there.

          Agent was removed
          org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: b65bfed8-9b8c-4900-957f-4089e724e0f5
          Finished: ABORTED

           

          zmoose current version of envinject-api is 1.235 so I suppose the issue is not related.

          Andrea added a comment - - edited Today we did a full update of all the plugins and the Ubuntu packets. The issue is still there. Agent was removed org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: b65bfed8-9b8c-4900-957f-4089e724e0f5 Finished: ABORTED   zmoose current version of envinject-api is 1.235 so I suppose the issue is not related.

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

              Created:
              Updated: