Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

SSL peer shut down incorrectly

843811May 13 2008 — edited May 13 2008
Hi.

I'm having a problem with SSL handshake/connection and can't find a solution.

I'm using JAX-WS for a web service client which does connect using https.
Setup of Keystore and certificate works.
The first web service call works but on the second one I'm getting an exception that the remote host closed connection.
How can this be?
Did anyone face the same problem and can help me?


Regards,
Manfred



Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:742)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1030)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1057)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1041)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:402)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:857)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)
at com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:123)
... 14 more
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:333)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:723)
... 22 more
Java Result: 1

Comments

843811
Some more details for this.

javax.net.debug=ssl

shows that the client creates a session for the first call which is cached.
For the second call the client tries to use the cached session but at the handshake stage the mentioned exception occurs.

The server which is a Python using ZSI Web Service logs this message:
"Request handling error: session id context uninitialized".

Any help is very apprechiated

Manfred
843811
Ok. I thought of something like this.

The problem was with the session handling on the server side.
Thought it woekd from Python to Python and from kSOAP to Python so it was more near to guess a problem on the Java side.


Thanks anyway.

Manfred
1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 10 2008
Added on May 13 2008
2 comments
14,042 views