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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • cli
    • 2.151, 2.150.1

      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.

          [JENKINS-54310] java.io.IOException: Stream is closed when the CLI has not read entirely the input

          Francisco Fernández created issue -
          Francisco Fernández made changes -
          Issue Type Original: Task [ 3 ] New: Bug [ 1 ]
          Francisco Fernández made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Francisco Fernández made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Francisco Fernández made changes -
          Remote Link New: This issue links to "PR#3708 (Web Link)" [ 21965 ]
          Francisco Fernández made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]
          Oleg Nenashev made changes -
          Labels New: lts-candidate
          Oliver Gondža made changes -
          Labels Original: lts-candidate New: 2.151.2
          Oliver Gondža made changes -
          Labels Original: 2.151.2 New: 2.150.1-fixed
          Baptiste Mathus made changes -
          Released As New: 2.151
          Baptiste Mathus made changes -
          Released As Original: 2.151 New: 2.151, 2.150.1

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

              Created:
              Updated:
              Resolved: