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

Close forcibly channel on StreamCorruptedException

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • remoting
    • None

      On some cases, it can happen that the connection ends up in a very bad state, and it could throw a StreamCorruptedException and some stack trace like :

      WARNING: Failed to construct Command
      java.io.StreamCorruptedException: invalid stream header: 436C6173
          at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:857)
          at java.io.ObjectInputStream.<init>(ObjectInputStream.java:349)
          at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48)
          at hudson.remoting.AbstractByteBufferCommandTransport.processCommand(AbstractByteBufferCommandTransport.java:201)
          at hudson.remoting.AbstractByteBufferCommandTransport.receive(AbstractByteBufferCommandTransport.java:188)
      

      In such cases, there's few chance that the application will be written/designed to recover.

      In this case, Remoting should probably just forcibly terminate the connection, so that it gets reestablished cleanly from scratch.

            rysteboe Rebecca Ysteboe
            batmat Baptiste Mathus
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: