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

INFO: I/O error in channel Chunked connection to http://localhost:8080/

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • cli
    • None

      My issue is very similar to previously filed JENKINS-23232 and JENKINS-34287.

      These issues were filed when Jenkins version was 1.something and say the bug has been fixed since then, however now it's the version 2.164.2 and the bug (same or similar) is come back. Besides, it looks like the suggested workaround with hudson.diyChunking=true doesn't work for this case. So, I'm filing this issue.

      I'm installing on a very fresh virtualbox machine Ubuntu 18.04 Jenkins 2.164.2. It is being installed by the jenkins chef cookbook. It is my understanding that the cookbook simply installs a jenkins repo (https://pkg.jenkins.io/debian-stable) and installs the jenkins package. It also installs openjdk-8-jdk:amd64, version 8u191-b12-2ubuntu0.18.04.1. There is no pretty much anything else on this box. No firewall, no other packages, nothing I can think of. The external network seems to be stable as well.

      Jenkins runs as this command

      /usr/bin/java -Dhudson.diyChunking=false -Djenkins.install.runSetupWizard=false -jar /usr/share/jenkins/jenkins.war --webroot=/var/cache/jenkins/war --httpListenAddress=0.0.0.0 --httpPort=8080 --ajp13Port=-1
      

      As you can see I tried to run it with -Dhudson.diyChunking=false which seem to not have effect at all.

      The problem manifests itself when I (or chef cookbook for that matter) tries to install additional plugins. In one out of three cases the installation is sucessful, so the problem is intermittent. However when it fails, it fails with a message

      [2019-05-07T03:16:43+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: jenkins_plugin[blueocean] (twindb-jenkins-master::plugins line 4) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '255'
             ---- Begin output of "java" -jar "/tmp/kitchen/cache/jenkins-cli.jar" -s http://localhost:8080 -"remoting" install-plugin blueocean  ----
             STDOUT:
             STDERR: May 07, 2019 3:16:42 AM hudson.remoting.SynchronousCommandTransport$ReaderThread run
             INFO: I/O error in channel Chunked connection to http://localhost:8080/
             java.io.IOException: Unexpected EOF
              at hudson.remoting.ChunkedInputStream.readUntilBreak(ChunkedInputStream.java:99)
              at hudson.remoting.ChunkedCommandTransport.readBlock(ChunkedCommandTransport.java:39)
              at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:35)
              at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:63)
      
             hudson.remoting.RequestAbortedException: java.io.IOException: Unexpected EOF
              at hudson.remoting.Request.abort(Request.java:340)
              at hudson.remoting.Channel.terminate(Channel.java:1040)
              at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:94)
              Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to Chunked connection to http://localhost:8080/
                      at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
                      at hudson.remoting.Request.call(Request.java:202)
                      at hudson.remoting.Channel.call(Channel.java:956)
                      at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:283)
                      at hudson.remoting.$Proxy1.waitForProperty(Unknown Source)
                      at hudson.remoting.Channel.waitForRemoteProperty(Channel.java:1582)
                      at hudson.cli.CLI.<init>(CLI.java:151)
                      at hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:82)
                      at hudson.cli.CLI._main(CLI.java:631)
                      at hudson.cli.CLI.main(CLI.java:427)
             Caused by: java.io.IOException: Unexpected EOF
              at hudson.remoting.ChunkedInputStream.readUntilBreak(ChunkedInputStream.java:99)
              at hudson.remoting.ChunkedCommandTransport.readBlock(ChunkedCommandTransport.java:39)
              at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:35)
              at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:63)
             ---- End output of "java" -jar "/tmp/kitchen/cache/jenkins-cli.jar" -s http://localhost:8080 -"remoting" install-plugin blueocean  ----
      

      The command fails when run by chef as well as manually with same success rate in both cases. As I mentioned before one out three attempts are successful.

      So, my question is - is it something known? And most importantly - are there any workarounds?
      The problem is reproducible very easily, so I can provide any additional information needed (logs, stack traces, gdb, etc).
       

       

            Unassigned Unassigned
            akuzminsky Aleksandr Kuzminsky
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: