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

    • 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

            PR merged into master

            fcojfernandez Francisco Fernández added a comment - PR merged into master

            People

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

              Dates

                Created:
                Updated:
                Resolved: