[JIRA] (JENKINS-56564) Jenkins CLI unable to create job - hudson.cli.DiagnosedStreamCorruptionException

0 views
Skip to first unread message

daveabrante@live.co.uk (JIRA)

unread,
Mar 14, 2019, 12:14:03 PM3/14/19
to jenkinsc...@googlegroups.com
David Abrante created an issue
 
Jenkins / Bug JENKINS-56564
Jenkins CLI unable to create job - hudson.cli.DiagnosedStreamCorruptionException
Issue Type: Bug Bug
Assignee: Jeff Thompson
Components: cli, core, remoting
Created: 2019-03-14 16:13
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)
Priority: Minor Minor
Reporter: David Abrante

 

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.

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

daveabrante@live.co.uk (JIRA)

unread,
Apr 16, 2019, 11:46:02 AM4/16/19
to jenkinsc...@googlegroups.com
David Abrante commented on Bug JENKINS-56564
 
Re: Jenkins CLI unable to create job - hudson.cli.DiagnosedStreamCorruptionException

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

Has the remote CLI been deprecated? 

daveabrante@live.co.uk (JIRA)

unread,
Apr 16, 2019, 11:46:03 AM4/16/19
to jenkinsc...@googlegroups.com

jthompson@cloudbees.com (JIRA)

unread,
Apr 24, 2019, 6:33:01 PM4/24/19
to jenkinsc...@googlegroups.com
Jeff Thompson commented on Bug JENKINS-56564
 
Re: Jenkins CLI unable to create job - hudson.cli.DiagnosedStreamCorruptionException

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.

jthompson@cloudbees.com (JIRA)

unread,
Apr 24, 2019, 6:34:02 PM4/24/19
to jenkinsc...@googlegroups.com
Jeff Thompson resolved as Not A Defect
 
Change By: Jeff Thompson
Status: Open Resolved
Resolution: Not A Defect

anonymousaccounts@icloud.com (JIRA)

unread,
Jan 14, 2020, 1:08:07 PM1/14/20
to jenkinsc...@googlegroups.com
a b edited a comment on Bug JENKINS-56564
 
Re: Jenkins CLI unable to create job - hudson.cli.DiagnosedStreamCorruptionException
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...
{code:java}
 java -jar jenkins-cli.jar [-s JENKINS_URL] -auth @/home/kohsuke/.jenkins-cli command {code}

What am I missing here? Why does that generate the listed error?
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

anonymousaccounts@icloud.com (JIRA)

unread,
Jan 14, 2020, 1:08:07 PM1/14/20
to jenkinsc...@googlegroups.com
a b commented on Bug JENKINS-56564

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?

anonymousaccounts@icloud.com (JIRA)

unread,
Jan 14, 2020, 1:17:06 PM1/14/20
to jenkinsc...@googlegroups.com
a b edited a comment on Bug JENKINS-56564
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...
{code:java}
 java -jar jenkins-cli.jar [-s JENKINS_URL] -auth @/home/kohsuke/.jenkins-cli command{code}

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


Note: we are on version 2.207 of Jenkins

anonymousaccounts@icloud.com (JIRA)

unread,
Jan 14, 2020, 1:18:05 PM1/14/20
to jenkinsc...@googlegroups.com
a b edited a comment on Bug JENKINS-56564
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...
{code:java}
 java -jar jenkins-cli.jar [-s JENKINS_URL] -auth @/home/kohsuke/.jenkins-cli command{code}
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

anonymousaccounts@icloud.com (JIRA)

unread,
Jan 14, 2020, 1:19:06 PM1/14/20
to jenkinsc...@googlegroups.com
a b reopened an issue
 
Change By: a b
Resolution: Not A Defect
Status: Resolved Reopened

jthompson@cloudbees.com (JIRA)

unread,
Jan 15, 2020, 2:28:05 PM1/15/20
to jenkinsc...@googlegroups.com
Jeff Thompson commented on Bug JENKINS-56564
 
Re: Jenkins CLI unable to create job - hudson.cli.DiagnosedStreamCorruptionException

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.

 

jthompson@cloudbees.com (JIRA)

unread,
Jan 15, 2020, 3:37:07 PM1/15/20
to jenkinsc...@googlegroups.com
Jeff Thompson closed an issue as Cannot Reproduce
 
Change By: Jeff Thompson
Status: Reopened Closed
Resolution: Cannot Reproduce
Reply all
Reply to author
Forward
0 new messages