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

java.io.IOException: Stream is closed when the CLI has not read entirely the input

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      2.151, 2.150.1

      Description

      Class hudson.cli.CLI opens several threads for different purposes. One is the "input reader" to store internally the standard input. In case of an abrupt or quick ending of the CLI command (-auth option not provided when it's necessary, for example) and the standard input is large, it might not be entirely read, throwing an unexpected warning message and error trace:

      WARNING: null
      java.io.IOException: Stream is closed
      	at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:3530)
      	at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3504)
      	at java.io.DataOutputStream.writeInt(DataOutputStream.java:197)
      	at hudson.cli.PlainCLIProtocol$EitherSide.send(PlainCLIProtocol.java:180)
      	at hudson.cli.PlainCLIProtocol$EitherSide.send(PlainCLIProtocol.java:187)
      	at hudson.cli.PlainCLIProtocol$EitherSide$1.write(PlainCLIProtocol.java:207)
      	at hudson.cli.CLI$5.run(CLI.java:721)
      

      Although the CLI ends with no error, this message should not be displayed since it's indicating an undesired situation.

        Attachments

          Issue Links

            Activity

            fcojfernandez Francisco Fernández created issue -
            fcojfernandez Francisco Fernández made changes -
            Field Original Value New Value
            Issue Type Task [ 3 ] Bug [ 1 ]
            fcojfernandez Francisco Fernández made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            fcojfernandez Francisco Fernández made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            fcojfernandez Francisco Fernández made changes -
            Remote Link This issue links to "PR#3708 (Web Link)" [ 21965 ]
            Hide
            fcojfernandez Francisco Fernández added a comment -

            PR merged into master

            Show
            fcojfernandez Francisco Fernández added a comment - PR merged into master
            fcojfernandez Francisco Fernández made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]
            oleg_nenashev Oleg Nenashev made changes -
            Labels lts-candidate
            olivergondza Oliver Gondža made changes -
            Labels lts-candidate 2.151.2
            olivergondza Oliver Gondža made changes -
            Labels 2.151.2 2.150.1-fixed
            batmat Baptiste Mathus made changes -
            Released As 2.151
            batmat Baptiste Mathus made changes -
            Released As 2.151 2.151, 2.150.1

              People

              Assignee:
              fcojfernandez Francisco Fernández
              Reporter:
              fcojfernandez Francisco Fernández
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: