java.net.SocketException: Software caused connection abort: recv failed
843811Apr 8 2003 — edited May 28 2007HI All,
I am trying to access my tomcat server on ssl. for this i have created a certificate/key using the keytool of jdk1.4. I am able to access this from my standalone client when not using the client-authentication.That is it works fine without client-authentication but when i use the client authentication it throws the exception pasted below..also there is my code..
Can anybody help me to find out the solution for this...i am stuck with this but could not find any solution...
some insights required from some gurus..
Akhil Nagpal
....//////////////code/////////////////////
KeyManager km[] km = getKeyManagers(clientCertPath,storePass,keyPass);
TrustManager tm[] = {new CMSunX509TrustManager(truststorepath,trsutstorepass)};
SSLContext sslContext = SSLContext.getInstance("SSL");
sslContext.init(km, tm, null);
SSLSocketFactory ssf = sslContext.getSocketFactory();
HttpsURLConnection.setDefaultSSLSocketFactory(ssf);
urlConn = (HttpsURLConnection)url.openConnection();
urlConn.setHostnameVerifier(new CNHostNameVerifier());
Now i get the output and input streams and do my work on them
////////////////////////////////////////////
/********Exception************************/
Exception in thread "main" java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at com.sun.net.ssl.internal.ssl.InputRecord.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.InputRecord.read(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.HandshakeOutStream.flush(DashoA6275)
at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SunJSSE_az.j(DashoA6275)
at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
at sun.net.www.protocol.https.HttpsClient.afterConnect(DashoA6275)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(DashoA6275)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:528)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(DashoA6275)
at com.sds.kb.cm.https.CMHttpsClient.sendMultiParameters(CMHttpsClient.java:99)
//////////////////////////8****************//////////////