java.io.StreamCorruptedException: invalid stream header: 0A6CACED

Jenkins JIRA | stephenconnolly | 1 year ago
  1. 0

    The changes in [PR 41|https://github.com/jenkinsci/remoting/pull/41] introduced a regression whereby the read-ahead buffered input stream gets thrown away after the protocol has been detected but before the protocol negotiation starts. The result of this is that depending on random timing factors, the capability and mode information that has been sent to the remote side may get lost and one side will infer a capability of 0 while the other side believes the agreed capability to be more. When the remote side is assuming chunking, the connection will typically fail immediately with an error such as: {code:none} INFO: Protocol failed to establish channel java.io.StreamCorruptedException: invalid stream header: 0A6CACED at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:806) at java.io.ObjectInputStream.<init>(ObjectInputStream.java:299) at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48) at hudson.remoting.ChannelBuilder.makeTransport(ChannelBuilder.java:430) at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:389) at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:310) at org.jenkinsci.remoting.engine.JnlpProtocol2.buildChannel(JnlpProtocol2.java:93) at org.jenkinsci.remoting.engine.JnlpProtocol.establishChannel(JnlpProtocol.java:79) at hudson.remoting.Engine.run(Engine.java:245) {code} But if the remote side is not assuming chunking then more subtle remoting issues could arise (e.g. if the remote slave is running an older pre-chunking slave.jar and connecting to a newer Jenkins... not that you should be doing that, but some people may... this reason is why I argue the issue is "Critical")

    Jenkins JIRA | 1 year ago | stephenconnolly
    java.io.StreamCorruptedException: invalid stream header: 0A6CACED
  2. 0

    The changes in [PR 41|https://github.com/jenkinsci/remoting/pull/41] introduced a regression whereby the read-ahead buffered input stream gets thrown away after the protocol has been detected but before the protocol negotiation starts. The result of this is that depending on random timing factors, the capability and mode information that has been sent to the remote side may get lost and one side will infer a capability of 0 while the other side believes the agreed capability to be more. When the remote side is assuming chunking, the connection will typically fail immediately with an error such as: {code:none} INFO: Protocol failed to establish channel java.io.StreamCorruptedException: invalid stream header: 0A6CACED at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:806) at java.io.ObjectInputStream.<init>(ObjectInputStream.java:299) at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48) at hudson.remoting.ChannelBuilder.makeTransport(ChannelBuilder.java:430) at hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:389) at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:310) at org.jenkinsci.remoting.engine.JnlpProtocol2.buildChannel(JnlpProtocol2.java:93) at org.jenkinsci.remoting.engine.JnlpProtocol.establishChannel(JnlpProtocol.java:79) at hudson.remoting.Engine.run(Engine.java:245) {code} But if the remote side is not assuming chunking then more subtle remoting issues could arise (e.g. if the remote slave is running an older pre-chunking slave.jar and connecting to a newer Jenkins... not that you should be doing that, but some people may... this reason is why I argue the issue is "Critical")

    Jenkins JIRA | 1 year ago | stephenconnolly
    java.io.StreamCorruptedException: invalid stream header: 0A6CACED
  3. 0

    H2DB : column[UUID]("NAME") fails with Deserialization failed unless setting O.DBType("UUID")

    GitHub | 2 years ago | petervandenabeele
    org.h2.jdbc.JdbcSQLException: Deserialization failed, cause: "java.io.StreamCorruptedException: invalid stream header: 91502BE7" [90027-186]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    invalid stream header: CAFEBABE exception in applet while reading from database through java code

    Stack Overflow | 2 years ago
    java.io.StreamCorruptedException: invalid stream header: CAFEBABE
  6. 0

    GitHub comment 58#138293916

    GitHub | 1 year ago | Donnerbart
    java.io.StreamCorruptedException: invalid stream header: FFFFFFE9
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.StreamCorruptedException

    invalid stream header: 0A6CACED

    at java.io.ObjectInputStream.readStreamHeader()
  2. Java RT
    ObjectInputStream.<init>
    1. java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:806)
    2. java.io.ObjectInputStream.<init>(ObjectInputStream.java:299)
    2 frames
  3. Hudson :: Remoting Layer
    ChannelBuilder.build
    1. hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48)
    2. hudson.remoting.ChannelBuilder.makeTransport(ChannelBuilder.java:430)
    3. hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java:389)
    4. hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:310)
    4 frames
  4. org.jenkinsci.remoting
    JnlpProtocol.establishChannel
    1. org.jenkinsci.remoting.engine.JnlpProtocol2.buildChannel(JnlpProtocol2.java:93)
    2. org.jenkinsci.remoting.engine.JnlpProtocol.establishChannel(JnlpProtocol.java:79)
    2 frames
  5. Hudson :: Remoting Layer
    Engine.run
    1. hudson.remoting.Engine.run(Engine.java:245)
    1 frame