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

“Could not initialize class ProcessLiveness$LibC” running sh on Windows

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • durable-task-plugin
    • Jenkins 2.32.2
      Linux master, Windows slave
      Pipeline 2.5
      Pipeline Groovy 2.27
      Pipeline Job 2.10
      Pipeline Nodes and Processes 2.9
      Pipeline Stage 2.2

      I have two Windows slaves. When I run pipeline jobs on these slaves I get tons of error messages

      Cannot contact Windows7: java.io.IOException: Remote call on Channel to /172.17.xxx.xxx failed
      

      Yet the job finishes successfully. A minimal example to reproduce is

      node('windows') {
          stage('Test') {
              sh '''
                  for ((i=0; i < 100; i++)); do
                      echo $i
                      sleep 1
                  done
              '''
          }
      }
      

      Executing the same shell script via a freestyle job on the same Windows slave works without any error messages therefore it's very likely that this is a bug in the pipeline implementation.
      Restarting slaves and master doesn't change anything. I also couldn't find any more information in log files (or I am looking at the wrong place)

          [JENKINS-42405] “Could not initialize class ProcessLiveness$LibC” running sh on Windows

          Thorsten Meinl created issue -

          Thorsten Meinl added a comment - - edited

          After I figured out how to turn on more logging messages, I got this:

          could not check C:\Users\jenkins\slave\workspace\r-WGI6TZZNQOBAAHSSLVRBWLNOVFN3FM5CSX5AJTOHIS4QEFKE2BPA@2
          java.io.IOException: Remote call on Channel to /172.17.xxx.xxx failed
          	at hudson.remoting.Channel.call(Channel.java:830)
          	at org.jenkinsci.plugins.durabletask.ProcessLiveness._isAlive(ProcessLiveness.java:77)
          	at org.jenkinsci.plugins.durabletask.ProcessLiveness.isAlive(ProcessLiveness.java:59)
          	at org.jenkinsci.plugins.durabletask.BourneShellScript$ShellController.exitStatus(BourneShellScript.java:198)
          	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.check(DurableTaskStep.java:307)
          	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.run(DurableTaskStep.java:276)
          	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
          	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          	at java.lang.Thread.run(Thread.java:745)
          Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.jenkinsci.plugins.durabletask.ProcessLiveness$LibC
          	at org.jenkinsci.plugins.durabletask.ProcessLiveness$Liveness.call(ProcessLiveness.java:98)
          	at org.jenkinsci.plugins.durabletask.ProcessLiveness$Liveness.call(ProcessLiveness.java:91)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:153)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
          	at hudson.remoting.Request$2.run(Request.java:336)
          	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
          	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          	at hudson.remoting.Engine$1$1.run(Engine.java:94)
          	at java.lang.Thread.run(Thread.java:745)
          	at ......remote call to Channel to /172.17.xxx.xxx(Native Method)
          	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1537)
          	at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
          	at hudson.remoting.Channel.call(Channel.java:822)
          	... 12 more
          

          Thorsten Meinl added a comment - - edited After I figured out how to turn on more logging messages, I got this: could not check C:\Users\jenkins\slave\workspace\r-WGI6TZZNQOBAAHSSLVRBWLNOVFN3FM5CSX5AJTOHIS4QEFKE2BPA@2 java.io.IOException: Remote call on Channel to /172.17.xxx.xxx failed at hudson.remoting.Channel.call(Channel.java:830) at org.jenkinsci.plugins.durabletask.ProcessLiveness._isAlive(ProcessLiveness.java:77) at org.jenkinsci.plugins.durabletask.ProcessLiveness.isAlive(ProcessLiveness.java:59) at org.jenkinsci.plugins.durabletask.BourneShellScript$ShellController.exitStatus(BourneShellScript.java:198) at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.check(DurableTaskStep.java:307) at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.run(DurableTaskStep.java:276) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.jenkinsci.plugins.durabletask.ProcessLiveness$LibC at org.jenkinsci.plugins.durabletask.ProcessLiveness$Liveness.call(ProcessLiveness.java:98) at org.jenkinsci.plugins.durabletask.ProcessLiveness$Liveness.call(ProcessLiveness.java:91) at hudson.remoting.UserRequest.perform(UserRequest.java:153) at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:336) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at hudson.remoting.Engine$1$1.run(Engine.java:94) at java.lang.Thread.run(Thread.java:745) at ......remote call to Channel to /172.17.xxx.xxx(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1537) at hudson.remoting.UserResponse.retrieve(UserRequest.java:253) at hudson.remoting.Channel.call(Channel.java:822) ... 12 more

          Joe Fowler added a comment -

          I've not figured out how to turn on the additional logging? How did you accomplish this? I am curious it the issue I have is the same, or not.

          I run running a linux master and agents. My error is very similar.

          Cannot contact DevelopmentBuild1_whyme: java.io.IOException: Remote call on DevelopmentBuild1_whyme failed.

          My problem started occurring on 2 different Jenkins masters with different agents, and on different machines. The problem seemed to have coincided with plugin updates.

          Joe Fowler added a comment - I've not figured out how to turn on the additional logging? How did you accomplish this? I am curious it the issue I have is the same, or not. I run running a linux master and agents. My error is very similar. Cannot contact DevelopmentBuild1_whyme: java.io.IOException: Remote call on DevelopmentBuild1_whyme failed. My problem started occurring on 2 different Jenkins masters with different agents, and on different machines. The problem seemed to have coincided with plugin updates.

          Thorsten Meinl added a comment - https://wiki.jenkins-ci.org/display/JENKINS/Logging

          Joe Fowler added a comment -

          Thanks for the link!

          Joe Fowler added a comment - Thanks for the link!

          Joe Fowler added a comment -

          Thanks to the logging, I have confirmed that my error is the same error that is documented in this issue.. 

           

          Joe Fowler added a comment - Thanks to the logging, I have confirmed that my error is the same error that is documented in this issue..   

          We are seeing the same issue with MultibranchPipeline jobs with Windows Server 2012 slaves. Rolling back a number of Pipeline/Workflow plugins solved the issue for us. We were not able to identify exactly which of the pipeline related plugins introduced this issue, but since they are very interdependent it would not help us much anyway.

          We are also stuck with an old version of Blue Ocean since it requires a newer version of the Pipeline plugin which would introduce this issue again.

          Below is the combination of Pipeline related plugins which has not yet introduce these error messages for us (... java.io.IOException: Remote call on Channel ...):

          pipeline-build-step:2.4
          pipeline-github-lib:1.0
          pipeline-graph-analysis:1.3
          pipeline-input-step:2.5
          pipeline-milestone-step:1.3
          pipeline-model-api:1.0.1
          pipeline-model-declarative-agent:1.0.1
          pipeline-model-definition:1.0.1
          pipeline-multibranch-defaults:1.1
          pipeline-rest-api:2.4
          pipeline-stage-step:2.2
          plain-credentials:1.4
          pipeline-stage-tags-metadata:1.0.1
          pipeline-stage-view:2.4
          workflow-aggregator:2.5
          workflow-api:2.10
          workflow-basic-steps:2.4
          workflow-cps:2.26
          workflow-cps-global-lib:2.6
          workflow-durable-task-step:2.8
          workflow-job:2.10
          workflow-multibranch:2.12
          workflow-remote-loader:1.4
          workflow-scm-step:2.3
          workflow-step-api:2.9
          workflow-support:2.12

           

          Anders Holmblad added a comment - We are seeing the same issue with MultibranchPipeline jobs with Windows Server 2012 slaves. Rolling back a number of Pipeline/Workflow plugins solved the issue for us. We were not able to identify exactly which of the pipeline related plugins introduced this issue, but since they are very interdependent it would not help us much anyway. We are also stuck with an old version of Blue Ocean since it requires a newer version of the Pipeline plugin which would introduce this issue again. Below is the combination of Pipeline related plugins which has not yet introduce these error messages for us ( ... java.io.IOException: Remote call on Channel ...): pipeline-build-step:2.4 pipeline-github-lib:1.0 pipeline-graph-analysis:1.3 pipeline-input-step:2.5 pipeline-milestone-step:1.3 pipeline-model-api:1.0.1 pipeline-model-declarative-agent:1.0.1 pipeline-model-definition:1.0.1 pipeline-multibranch-defaults:1.1 pipeline-rest-api:2.4 pipeline-stage-step:2.2 plain-credentials:1.4 pipeline-stage-tags-metadata:1.0.1 pipeline-stage-view:2.4 workflow-aggregator:2.5 workflow-api:2.10 workflow-basic-steps:2.4 workflow-cps:2.26 workflow-cps-global-lib:2.6 workflow-durable-task-step:2.8 workflow-job:2.10 workflow-multibranch:2.12 workflow-remote-loader:1.4 workflow-scm-step:2.3 workflow-step-api:2.9 workflow-support:2.12  

          Downgrade of plugin "Pipeline: Nodes and Processes" from v.2.9 to v.2.8 has fixed this problem (at least in my environment)

          Ivan Prokhorov added a comment - Downgrade of plugin "Pipeline: Nodes and Processes" from v.2.9 to v.2.8 has fixed this problem (at least in my environment)

          Joe Fowler added a comment -

          Thanks Ivan.... I downgraded that plugin form 2.10 to 2.8, and it has fixed the problem in my case as well. 

          Joe Fowler added a comment - Thanks Ivan.... I downgraded that plugin form 2.10 to 2.8, and it has fixed the problem in my case as well. 

          I can confirm that a dependency to the "Pipeline: Nodes and Processes" plugin introduced the error, and a downgrade from version 2.10 to 2.8 removed the error message;
          Cannot contact <slave>: java.io.IOException: Remote call on Channel to /<ip> failed

          One plugin which is dependent on version 2.10 of this plugin is BlueOcean 1.0.0-b25

          Anders Holmblad added a comment - I can confirm that a dependency to the "Pipeline: Nodes and Processes" plugin introduced the error, and a downgrade from version 2.10 to 2.8 removed the error message; Cannot contact <slave>: java.io.IOException: Remote call on Channel to /<ip> failed One plugin which is dependent on version 2.10 of this plugin is BlueOcean 1.0.0-b25

            Unassigned Unassigned
            sithmein Thorsten Meinl
            Votes:
            8 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: