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

cli hudson.remoting.ChannelClosedException unathenticated

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: remoting
    • Labels:
    • Environment:
      OS: RHEL 7.2
      Jenkins: 2.0rc1
      Java: openjdk 1.8.0.71-2
    • Similar Issues:

      Description

      When running jenkins-cli unauthenticated and authentication is required, jenkins-cli will sometimes give a hudson.remoting.ChannelClosedException exception. This seems to happen on the first invocation of the client. Subsequent executions seem okay.

      [root@jenkins2 groovy_scripts]# java -jar /var/cache/jenkins/war/WEB-INF/jenkins-cli.jar -s http://localhost:8080 groovy /ccs/home/msg31/master.groovy
      
      ERROR: anonymous is missing the Overall/Read permission
      Apr 21, 2016 9:00:32 AM hudson.remoting.RemoteInvocationHandler$Unexporter run
      WARNING: Couldn't clean up oid=3 from null
      hudson.remoting.ChannelClosedException: channel is already closed
              at hudson.remoting.Channel.send(Channel.java:578)
              at hudson.remoting.RemoteInvocationHandler$PhantomReferenceImpl.cleanup(RemoteInvocationHandler.java:360)
              at hudson.remoting.RemoteInvocationHandler$PhantomReferenceImpl.access$700(RemoteInvocationHandler.java:319)
              at hudson.remoting.RemoteInvocationHandler$Unexporter.run(RemoteInvocationHandler.java:420)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: hudson.remoting.Channel$OrderlyShutdown
              at hudson.remoting.Channel$CloseCommand.execute(Channel.java:1080)
              at hudson.remoting.Channel$1.handle(Channel.java:501)
              at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:60)
      Caused by: Command close created at
              at hudson.remoting.Command.<init>(Command.java:56)
              at hudson.remoting.Channel$CloseCommand.<init>(Channel.java:1074)
              at hudson.remoting.Channel$CloseCommand.<init>(Channel.java:1072)
              at hudson.remoting.Channel.close(Channel.java:1156)
              at hudson.remoting.Channel.close(Channel.java:1138)
              at hudson.remoting.Channel$CloseCommand.execute(Channel.java:1079)
              ... 2 more
      
      [root@jenkins2 groovy_scripts]# java -jar /var/cache/jenkins/war/WEB-INF/jenkins-cli.jar -s http://localhost:8080 groovy /ccs/home/msg31/master.groovy
      
      ERROR: anonymous is missing the Overall/Read permission
      

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Well, it should not be a WARNING at least. I'll change the logging level for the closed channel to FINE in remoting. It's safe, because in such case there will be always a message about the channel termination

          Show
          oleg_nenashev Oleg Nenashev added a comment - Well, it should not be a WARNING at least. I'll change the logging level for the closed channel to FINE in remoting. It's safe, because in such case there will be always a message about the channel termination
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          In remoting 3 the behavior is fixed by https://github.com/jenkinsci/remoting/commit/f4d287652e09da627f51779bec1c3ca7f1d46e70.
          We will need a fix only for the stable-2.x branch

          Show
          oleg_nenashev Oleg Nenashev added a comment - In remoting 3 the behavior is fixed by https://github.com/jenkinsci/remoting/commit/f4d287652e09da627f51779bec1c3ca7f1d46e70 . We will need a fix only for the stable-2.x branch
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          https://github.com/jenkinsci/remoting/commit/f4d287652e09da627f51779bec1c3ca7f1d46e70 likely suppresses the exception in both branches. It does not print Unexporter's ChannelClosedExceptions to the log

          Show
          oleg_nenashev Oleg Nenashev added a comment - https://github.com/jenkinsci/remoting/commit/f4d287652e09da627f51779bec1c3ca7f1d46e70 likely suppresses the exception in both branches. It does not print Unexporter's ChannelClosedExceptions to the log
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Stable-2.x branch is EoL. No need to fix anything there

          Show
          oleg_nenashev Oleg Nenashev added a comment - Stable-2.x branch is EoL. No need to fix anything there

            People

            • Assignee:
              oleg_nenashev Oleg Nenashev
              Reporter:
              pyther Matthew Gyurgyik
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: