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

hudson.remoting.ChannelClosedException: Channel "unknown": Remote call on JNLP4-connect connection from ip

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • nomad-plugin
    • None
    • Jenkins Master version : 2.145

      Java version on master : 1.8

      Java version on nomad slave(docker conatiner 1.8)

      Nomad plugin version: 0.6.1

      Master OS : Amazon Linux AMI 2017.09

      Slave OS: Ubuntu 18.04

      Hi All,

      1)Whenever a change in repo, pull request builder trigger the Jenkins jobs(target branch defined in jobs specification)

      2)We are using Jenkins pipeline both frontend and backend test run in parallel.

      3) Jenkins will allocate nomad slave to run our frontend and backend task(In Nomad Job template we specify the cpu, memory and docker images to run).

      4) We are experiencing the "hudson.remoting.ChannelClosedException:" at frequent times.

       

       

       

       

       

       

      Jenkins Console log:

       

      [Backend]    -> 0.0624s Cannot contact jenkins-519afe492c4efa: hudson.remoting.ChannelClosedException: Channel "unknown": Remote call on JNLP4-connect connection from ip-10-0-0-10.ec2.internal/10.0.0.10:44176 failed. The channel is closing down or has closed down[Backend]    -> 0.0624sCannot contact jenkins-519afe492c4efa: hudson.remoting.ChannelClosedException: Channel "unknown": Remote call on JNLP4-connect connection from ip-10-0-0-10.ec2.internal/10.0.0.10:44176 failed. The channel is closing down or has closed down[Frontend] Cannot contact jenkins-519afe4939b540: hudson.remoting.ChannelClosedException: Channel "unknown": Remote call on JNLP4-connect connection from ip-10-0-0-10.ec2.internal/10.0.0.10:34472 failed. The channel is closing down or has closed down[Frontend] Could not connect to jenkins-519afe4939b540 to send interrupt signal to process[Frontend] Cancelling nested steps due to timeout[Pipeline] [Frontend] }[Backend] Could not connect to jenkins-519afe492c4efa to send interrupt signal to process[Backend] Cancelling nested steps due to timeout[Pipeline] [Frontend] // stage[Pipeline] [Frontend] }[Pipeline] [Frontend] // node[Pipeline] [Frontend] }[Pipeline] [Backend] }[Pipeline] [Frontend] // timeout[Pipeline] [Backend] // stage[Pipeline] [Frontend] echo[Frontend] Issue org.jenkinsci.plugins.workflow.steps.FlowInterruptedException[Pipeline] [Frontend] sh[Frontend] Required context class hudson.FilePath is missing[Frontend] Perhaps you forgot to surround the code with a step that provides this, such as: node[Pipeline] [Frontend] stage[Pipeline] [Frontend] { (Publish Reports frontend)[Pipeline] [Backend] }[Pipeline] [Backend] // node[Pipeline] [Backend] }[Pipeline] [Frontend] step[Frontend] Required context class hudson.FilePath is missing[Frontend] Perhaps you forgot to surround the code with a step that provides this, such as: node[Pipeline] [Frontend] echo[Frontend] issue with report frontend org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing[Pipeline] [Frontend] }[Pipeline] [Backend] // timeout[Pipeline] [Frontend] // stage[Pipeline] [Frontend] }[Frontend] Failed in branch Frontend[Pipeline] [Backend] echo[Backend] Issue org.jenkinsci.plugins.workflow.steps.FlowInterruptedException[Pipeline] [Backend] sh[Backend] Required context class hudson.FilePath is missing[Backend] Perhaps you forgot to surround the code with a step that provides this, such as: node[Pipeline] [Backend] stage[Pipeline] [Backend] { (Publish Reports backend)[Pipeline] [Backend] publishHTML[Backend] Required context class hudson.Launcher is missing[Backend] Perhaps you forgot to surround the code with a step that provides this, such as: node[Pipeline] [Backend] echo[Backend] issue with reportbackend org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.Launcher is missing[Pipeline] [Backend] }[Pipeline] [Backend] // stage[Pipeline] [Backend] }[Backend] Failed in branch Backend[Pipeline] // parallel[Pipeline] End of PipelineSetting status of 94d5 to FAILURE with url https://sample.example.com/job/nomad-test-PR/47/ and message: 'Failed  'Using context: Automation tests (Run-test)Also:   org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing at org.jenkinsci.plugins.workflow.steps.StepDescriptor.checkContextAvailability(StepDescriptor.java:260) at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:206) at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:153) at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122) at sun.reflect.GeneratedMethodAccessor601.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:157) at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:133) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:120) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:155) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:159) at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17) at WorkflowScript.distributed_run(WorkflowScript:206) at WorkflowScript.run(WorkflowScript:230)org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing at org.jenkinsci.plugins.workflow.steps.StepDescriptor.checkContextAvailability(StepDescriptor.java:260) at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:206) at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:153) at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122) at sun.reflect.GeneratedMethodAccessor601.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:157) at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:133) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:120) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:155) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:159) at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17) at WorkflowScript.distributed_run(WorkflowScript:206) at WorkflowScript.run(WorkflowScript:228) at __cps.transform__(Native Method) at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82) at sun.reflect.GeneratedMethodAccessor404.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21) at com.cloudbees.groovy.cps.Next.step(Next.java:83) at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174) at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163) at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129) at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$101(SandboxContinuable.java:34) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.lambda$run0$0(SandboxContinuable.java:59) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:58) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:174) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:332) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$200(CpsThreadGroup.java:83) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:244) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:232) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)Finished: FAILURE

          [JENKINS-57984] hudson.remoting.ChannelClosedException: Channel "unknown": Remote call on JNLP4-connect connection from ip

          see https://issues.jenkins-ci.org/browse/JENKINS-58766

          maybe its the same.

          change the workingDir, not /home/jenkins

          Jonas Büttner added a comment - see  https://issues.jenkins-ci.org/browse/JENKINS-58766 maybe its the same. change the workingDir, not /home/jenkins

          Eddie Mashayev added a comment - - edited

          Any update here?

          I got the same issue when running Jobs

          Cannot contact hudson.remoting.ChannelClosedException Channel "unknown" Remote call on JNLP4-connect connection from failed The channel is closing down or has closed down
          

          It some time works and sometimes get this above error.
          Please update this is a real blocker.

          Some info about my Jenkins and plugins:
          Jenkins: 2.176.3
          Kubernetes plugin 1.19.0

          I also have updated them both to latest in my test environment(Jenkins:2.176.3, Kubernetes:1.19.0), still the same issue..

           

          Eddie Mashayev added a comment - - edited Any update here? I got the same issue when running Jobs Cannot contact hudson.remoting.ChannelClosedException Channel "unknown" Remote call on JNLP4-connect connection from failed The channel is closing down or has closed down It some time works and sometimes get this above error. Please update this is a real blocker. Some info about my Jenkins and plugins: Jenkins: 2.176.3 Kubernetes plugin 1.19.0 I also have updated them both to latest in my test environment(Jenkins:2.176.3, Kubernetes:1.19.0), still the same issue..  

          Xuezhong Yan added a comment -

          I am using AWS EC2 Plugin to create the Jenkins agent during the build, and I am also facing the "agent was removed" error:
          Cannot contact EC2 (AWS) - Linux (i-0131bf3cbae77aec7): hudson.remoting.ChannelClosedException: Channel "unknown": Remote call on EC2 (AWS) - Linux (i-0131bf3cbae77aec7) failed. The channel is closing down or has closed down
          The frequency of the error is about  2/10

          Xuezhong Yan added a comment - I am using AWS EC2 Plugin to create the Jenkins agent during the build, and I am also facing the "agent was removed" error: Cannot contact EC2 (AWS) - Linux (i-0131bf3cbae77aec7): hudson.remoting.ChannelClosedException: Channel "unknown": Remote call on EC2 (AWS) - Linux (i-0131bf3cbae77aec7) failed. The channel is closing down or has closed down The frequency of the error is about  2/10

          iverberk Hey do you use EKS and spot instances to run your builds?

          Eddie Mashayev added a comment - iverberk Hey do you use EKS and spot instances to run your builds?

          Is this still an issue? Can it be closed?

          Adrian Fedoreanu added a comment - Is this still an issue? Can it be closed?

            iverberk Ivo Verberk
            vasu9295 Vasu G
            Votes:
            4 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: