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

Jenkins CLI unable to create job - hudson.cli.DiagnosedStreamCorruptionException

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Trivial
    • Resolution: Cannot Reproduce
    • Component/s: cli, core, remoting
    • Labels:
      None
    • Environment:
      OS: Centos 7.6 / Centos 5.11
      Jenkins: 2.150.2 (Fresh install with recommended plugins)
      Java: Oracle JDK 11.0.2 (Centos 7.6) / JDK 8u202 (Centos 5.11)
    • Similar Issues:

      Description

       

      Hi all, we recently upgraded our Jenkins to 2.150.2 from 1.454. However, our legacy applications are experiencing issues using the Jenkins CLI.

      So, I decided to do some testing with a fresh install of Jenkins both on our current environment (Centos 5.11 - JDK 8u202) and a more up-to-date environment (Centos 7.6 - JDK 11.0.2). Note that this install includes the recommended plugins, as suggested by the first-time setup. I'm running Jenkins as follows:

      java -jar jenkins.war --httpPort=8080
      

      On both instances, I was able to run the following successfully:

      java -jar jenkins-cli.jar -auth user:password -s http://localhost:8080/ help
      

      I then attempted to create a blank job using the following command:

       

      java -jar jenkins-cli.jar -auth user:password -s http://localhost:8080/ create-job 0_TEST
      

      Both environments produced the same error, which I have included below:

       

      Mar 14, 2019 3:26:19 PM hudson.cli.PlainCLIProtocol$EitherSide$Reader run
      WARNING: null
      hudson.cli.DiagnosedStreamCorruptionException
      Read back: 0x00 0x00 0x00 0x0c 0x00 0x00 0x0a
      'create-job' 0x00 0x00 0x00 0x08 0x00 0x00 0x06 '0_TEST' 0x00 0x00 0x00 0x07 0x02 0x00 0x05 'UTF-8' 0x00 0x00 0x00 0x07 0x01 0x00 0x05 'en_GB' 0x00 0x00 0x00 0x00 0x03
      Read ahead:
      Diagnosis problem:
          java.io.IOException: java.util.concurrent.TimeoutException: Idle timeout expired: 5001/5000 ms
              at org.eclipse.jetty.server.HttpInput$ErrorState.noContent(HttpInput.java:1080)
              at org.eclipse.jetty.server.HttpInput.read(HttpInput.java:313)
              at org.eclipse.jetty.server.HttpInput.read(HttpInput.java:256)
              at org.apache.commons.io.input.ProxyInputStream.read(ProxyInputStream.java:59)
              at hudson.cli.FlightRecorderInputStream$1.run(FlightRecorderInputStream.java:59)
          Caused by: java.util.concurrent.TimeoutException: Idle timeout expired: 5001/5000 ms
              at org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:166)
              at org.eclipse.jetty.io.IdleTimeout$1.run(IdleTimeout.java:50)
              at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
              at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
              at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
              at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
              at java.base/java.lang.Thread.run(Thread.java:834)
              Suppressed: java.lang.Throwable: HttpInput failure
                      at org.eclipse.jetty.server.HttpInput.failed(HttpInput.java:826)
                      at org.eclipse.jetty.server.HttpConnection$BlockingReadCallback.failed(HttpConnection.java:649)
                      at org.eclipse.jetty.io.FillInterest.onFail(FillInterest.java:138)
                      at org.eclipse.jetty.io.AbstractEndPoint.onIdleExpired(AbstractEndPoint.java:406)
                      ... 8 more
              at hudson.cli.FlightRecorderInputStream.analyzeCrash(FlightRecorderInputStream.java:82)
              at hudson.cli.PlainCLIProtocol$EitherSide$Reader.run(PlainCLIProtocol.java:145)
      Caused by: java.io.IOException: java.util.concurrent.TimeoutException: Idle timeout expired: 5001/5000 ms
              at org.eclipse.jetty.server.HttpInput$ErrorState.noContent(HttpInput.java:1080)
              at org.eclipse.jetty.server.HttpInput.read(HttpInput.java:313)
              at org.eclipse.jetty.server.HttpInput.read(HttpInput.java:256)
              at org.apache.commons.io.input.ProxyInputStream.read(ProxyInputStream.java:59)
              at hudson.cli.FlightRecorderInputStream.read(FlightRecorderInputStream.java:88)
              at java.base/java.io.DataInputStream.readInt(DataInputStream.java:392)
              at hudson.cli.PlainCLIProtocol$EitherSide$Reader.run(PlainCLIProtocol.java:110)
      Caused by: java.util.concurrent.TimeoutException: Idle timeout expired: 5001/5000 ms
              at org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:166)
              at org.eclipse.jetty.io.IdleTimeout$1.run(IdleTimeout.java:50)
              at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
              at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
              at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
              at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
              at java.base/java.lang.Thread.run(Thread.java:834)
              Suppressed: java.lang.Throwable: HttpInput failure
                      at org.eclipse.jetty.server.HttpInput.failed(HttpInput.java:826)
                      at org.eclipse.jetty.server.HttpConnection$BlockingReadCallback.failed(HttpConnection.java:649)
                      at org.eclipse.jetty.io.FillInterest.onFail(FillInterest.java:138)
                      at org.eclipse.jetty.io.AbstractEndPoint.onIdleExpired(AbstractEndPoint.java:406)
                      ... 8 more
      

      We really depend on the application to generate the jobs we on a day-to-day basis, so we would ideally like to see a resolution for this. Otherwise we will need to pursue an alternative method for generating the jobs.

      If any further information is required, please let me know and I will provide it.

       

        Attachments

          Activity

          Hide
          gambo David Abrante added a comment -

          Ended up re-writing the application using the Jenkins REST API instead.

          Has the remote CLI been deprecated? 

          Show
          gambo David Abrante added a comment - Ended up re-writing the application using the Jenkins REST API instead. Has the remote CLI been deprecated? 
          Hide
          jthompson Jeff Thompson added a comment -

          That's a big upgrade to 2.150.2 from 1.454.

          Yes, the Remoting CLI was deprecated over two years ago: https://jenkins.io/blog/2017/04/11/new-cli/

          More recently, as the deprecation had warned, that capability was removed: https://jenkins.io/blog/2019/02/17/remoting-cli-removed/

          I'm glad you were able to find an alternative that works for you.

          I'll close this ticket out.

          Show
          jthompson Jeff Thompson added a comment - That's a big upgrade to 2.150.2 from 1.454. Yes, the Remoting CLI was deprecated over two years ago:  https://jenkins.io/blog/2017/04/11/new-cli/ More recently, as the deprecation had warned, that capability was removed:  https://jenkins.io/blog/2019/02/17/remoting-cli-removed/ I'm glad you were able to find an alternative that works for you. I'll close this ticket out.
          Hide
          stuck_tech a b added a comment - - edited

          It is unclear to me why the method described in this issue (the same one I am attempting to use) does not work. The `remote-cli-removed` blog post states that the -remoting flag was removed but neither the commands listed in this issue nor mine use the {{-remoting }}flag.

          Looking at the `new-cli` post and the linked documentation (https://jenkins.io/doc/book/managing/cli/) I see no reason why the command should not work as listed in this issue. It seems to follow the current documentation, which states...

           java -jar jenkins-cli.jar [-s JENKINS_URL] -auth @/home/kohsuke/.jenkins-cli command

          What am I missing here? Why does that generate the listed error?

          Happy to attempt a different method but it's unclear what that method would be as this seems to be inline with the current documentation.

          Note: we are on version 2.207 of Jenkins

          Show
          stuck_tech a b added a comment - - edited It is unclear to me why the method described in this issue (the same one I am attempting to use) does not work. The ` remote-cli-removed ` blog post states that the -remoting flag was removed but neither the commands listed in this issue nor mine use the {{-remoting }}flag. Looking at the ` new-cli ` post and the linked documentation ( https://jenkins.io/doc/book/managing/cli/ ) I see no reason why the command should not work as listed in this issue. It seems to follow the current documentation, which states...  java -jar jenkins-cli.jar [-s JENKINS_URL] -auth @/home/kohsuke/.jenkins-cli command What am I missing here? Why does that generate the listed error? Happy to attempt a different method but it's unclear what that method would be as this seems to be inline with the current documentation. Note: we are on version 2.207 of Jenkins
          Hide
          jthompson Jeff Thompson added a comment -

          a b your issue sounds different from the originally reported issue. You don't mention upgrade and the use of the Remoting transport for CLI. You may be getting a similar or even the same error message, though that isn't clear. You need to create your own ticket and provide better information instead of re-opening this one.

          Further, I'm able to get the CLI to work fine according to the documentation and don't see the error reported earlier. This suggests that you've probably got usage or configuration problems. Possibly network or system problems. You would need to provide a reproducible issue description. The Jenkins issue tracker is not a support forum. You may get better help from the Jenkins User email list or gitter channel.

           

          Show
          jthompson Jeff Thompson added a comment - a b your issue sounds different from the originally reported issue. You don't mention upgrade and the use of the Remoting transport for CLI. You may be getting a similar or even the same error message, though that isn't clear. You need to create your own ticket and provide better information instead of re-opening this one. Further, I'm able to get the CLI to work fine according to the documentation and don't see the error reported earlier. This suggests that you've probably got usage or configuration problems. Possibly network or system problems. You would need to provide a reproducible issue description. The Jenkins issue tracker is not a support forum. You may get better help from the Jenkins User email list or gitter channel.  

            People

            • Assignee:
              jthompson Jeff Thompson
              Reporter:
              gambo David Abrante
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: