Within my client Ant task to download files off of a Jetty server, I occasionally get a
javax.net.ssl.SSLException: SSL peer shut down incorrectly
at com.sun.net.ssl.internal.ssl.InputRecord.readV3Record(InputRecord.java:408)
at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:360)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:789)
I have Googled for a bit - but so far I do not have a conclusive answer as to why this might be happening.
Can anyone explain what might be the root cause of this exception?
My Jetty logs do not seem to have an equivalent trace of this exception. However, it seems that the Jetty server is indeed terminating the secure connection.
As a bit of a background - I see this exception when two clients spawned by the Ant task use the same certificate to download predetermined files from the Jetty server. The only suspicion I have is that presenting the same certificate by two clients originating from the same host is tripping up the Jetty and it ends up shutting down the connection - but thats just a unproven theory.
This problem can be caused if you have a plaintext socket that you have wrapped in an SSLSocket and you close the plaintext socket rather than the SSLSocket. The exception is warning about a possible truncation attack.
Of course it can also be caused by a real truncation attack.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With