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

Jenkins CLI to start a build no longer working in 1.564

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Duplicate
    • Component/s: cli, core
    • Labels:
    • Environment:
      Jenkins 1.564
      Running on Centos 5.8
    • Similar Issues:

      Description

      Prior to upgrade 1.4X we were able to start builds remotely using the cli. Now when we try and do this we get the following output

      -bash-3.2$ java -jar /tools/jenkins/jenkins-cli.jar -s http://engtools:8080 build test-my-build -p email_name=email-1@domain.com,email-2@domian.com -p workspace_dir=/net/machine/path -p full_imagename=4.2.2.0 -p includes=test1 -p --username jenkins --password jenkins

      May 28, 2014 12:37:26 PM hudson.remoting.SynchronousCommandTransport$ReaderThread run
      SEVERE: I/O error in channel Chunked connection to http://engtools:8080/cli
      java.io.StreamCorruptedException: invalid stream header: 0A0A0A0A
      at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
      at java.io.ObjectInputStream.<init>(Unknown Source)
      at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:40)
      at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
      at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)

      Exception in thread "main" hudson.remoting.RequestAbortedException: hudson.remoting.RequestAbortedException: java.io.StreamCorruptedException: invalid stream header: 0A0A0A0A
      at hudson.remoting.RequestAbortedException.wrapForRethrow(RequestAbortedException.java:41)
      at hudson.remoting.RequestAbortedException.wrapForRethrow(RequestAbortedException.java:34)
      at hudson.remoting.Request.call(Request.java:174)
      at hudson.remoting.Channel.call(Channel.java:739)
      at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:168)
      at hudson.remoting.$Proxy1.waitForProperty(Unknown Source)
      at hudson.remoting.Channel.waitForRemoteProperty(Channel.java:1122)
      at hudson.cli.CLI.<init>(CLI.java:145)
      at hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:72)
      at hudson.cli.CLI._main(CLI.java:459)
      at hudson.cli.CLI.main(CLI.java:382)
      Caused by: hudson.remoting.RequestAbortedException: java.io.StreamCorruptedException: invalid stream header: 0A0A0A0A
      at hudson.remoting.Request.abort(Request.java:299)
      at hudson.remoting.Channel.terminate(Channel.java:802)
      at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:69)
      Caused by: java.io.StreamCorruptedException: invalid stream header: 0A0A0A0A
      at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
      at java.io.ObjectInputStream.<init>(Unknown Source)
      at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:40)
      at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
      at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)

        Attachments

          Issue Links

            Activity

            Hide
            danielbeck Daniel Beck added a comment -

            Does the jenkins-cli.jar fit the Jenkins version, or is it outdated?

            Show
            danielbeck Daniel Beck added a comment - Does the jenkins-cli.jar fit the Jenkins version, or is it outdated?
            Hide
            peter_kline Peter Kline added a comment -

            this is with the latest cli.jar

            Show
            peter_kline Peter Kline added a comment - this is with the latest cli.jar
            Hide
            danielbeck Daniel Beck added a comment - - edited

            Is this limited to triggering builds, or any CLI commands (e.g. list-jobs)?

            When you authenticate using an SSH key rather than password, does that work?

            How is Jenkins authentication configured? Jenkins user database, LDAP, Active Directory plugin, ...?

            Show
            danielbeck Daniel Beck added a comment - - edited Is this limited to triggering builds, or any CLI commands (e.g. list-jobs)? When you authenticate using an SSH key rather than password, does that work? How is Jenkins authentication configured? Jenkins user database, LDAP, Active Directory plugin, ...?
            Hide
            peter_kline Peter Kline added a comment -

            We see this with calls list list-jobs. For the command "version" we see pages of jibberish but it does display the version somewhere in the mess.

            We haven't tried authenticating via cert. We use ldap as our method of authentication. We have upgraded our version to 1.566 with all latest plugins and no luck.

            Show
            peter_kline Peter Kline added a comment - We see this with calls list list-jobs. For the command "version" we see pages of jibberish but it does display the version somewhere in the mess. We haven't tried authenticating via cert. We use ldap as our method of authentication. We have upgraded our version to 1.566 with all latest plugins and no luck.
            Hide
            peter_kline Peter Kline added a comment -

            By setting

            -Dhudson.diyChunking=false

            in /etc/sysconfig/jenkins and restarting I am now able to run remote build calls. Leaving ticket open as while this solves my problem not sure if this is a long term viable fix

            Show
            peter_kline Peter Kline added a comment - By setting -Dhudson.diyChunking=false in /etc/sysconfig/jenkins and restarting I am now able to run remote build calls. Leaving ticket open as while this solves my problem not sure if this is a long term viable fix
            Hide
            danielbeck Daniel Beck added a comment -

            Seems to be a duplicate of JENKINS-23232.

            Show
            danielbeck Daniel Beck added a comment - Seems to be a duplicate of JENKINS-23232 .
            Hide
            anthonygreen Anthony Green added a comment - - edited

            I'm experiencing this issue w/ Jenkins ver. 1.598 installed inside a Docker container on Ubuntu Trusty

            Show
            anthonygreen Anthony Green added a comment - - edited I'm experiencing this issue w/ Jenkins ver. 1.598 installed inside a Docker container on Ubuntu Trusty
            Hide
            huyang hu yang added a comment - - edited

            Hi Anthony,
            I've experienced such case in my Docker for version 1.7.1 jenkins version 1.609.3
            I/O error in channel Chunked connection to http://*.*.36.176:5858/cli.
            Since this Issue has already been resolved, may I know if you've managed to get it works again in your environment?

            Regards,

            Hu Yang

            Show
            huyang hu yang added a comment - - edited Hi Anthony, I've experienced such case in my Docker for version 1.7.1 jenkins version 1.609.3 I/O error in channel Chunked connection to http://*.*.36.176:5858/cli . Since this Issue has already been resolved, may I know if you've managed to get it works again in your environment? Regards, Hu Yang

              People

              • Assignee:
                anthonygreen Anthony Green
                Reporter:
                peter_kline Peter Kline
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: