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!

JSSE - SSL Handshake Failure

843811Jul 30 2008 — edited Jul 30 2008
Hi All,

I am using axis2 client to access a Web service using https. I generated java code using axis2 wsdl2java tool. I have set up truststore and password as
System.setProperty("javax.net.ssl.trustStore",filename);
System.setProperty("javax.net.ssl.trustStorePassword",password);

When i try to access the web service it fails with Handshake exception. The client is not sending the certificate even though tomcat 6 configuration for ssl is correct.Pls help me out.



http-80-1, READ: TLSv1 Alert, length = 2
http-80-1, RECV TLSv1 ALERT: fatal, handshake_failure
http-80-1, called closeSocket()
http-80-1, handling exception: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
http-80-1, called close()
http-80-1, called closeInternal(true)
http-80-1, called close()
http-80-1, called closeInternal(true)
http-80-1, called close()
http-80-1, called closeInternal(true)
http-80-1, setSoTimeout(30000) called
http-80-1, setSoTimeout(30000) called
%% No cached client session
*** ClientHello, TLSv1
RandomCookie: GMT: 1200523817 bytes = { 161, 234, 224, 218, 19, 201, 80, 87, 1, 39, 244, 129, 167, 109, 73, 157, 144, 57, 230, 206, 210, 47, 182, 50, 196, 28, 100, 226 }
Session ID: {}
Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_DES_CBC_SHA, SSL_DHE_RSA_WITH_DES_CBC_SHA, SSL_DHE_DSS_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA]
Compression Methods: { 0 }
***
[write] MD5 and SHA1 hashes: len = 73
0000: 01 00 00 45 03 01 48 8F 8A 29 A1 EA E0 DA 13 C9 ...E..H..)......
0010: 50 57 01 27 F4 81 A7 6D 49 9D 90 39 E6 CE D2 2F PW.'...mI..9.../
0020: B6 32 C4 1C 64 E2 00 00 1E 00 04 00 05 00 2F 00 .2..d........./.
0030: 33 00 32 00 0A 00 16 00 13 00 09 00 15 00 12 00 3.2.............
0040: 03 00 08 00 14 00 11 01 00 .........
http-80-1, WRITE: TLSv1 Handshake, length = 73
[write] MD5 and SHA1 hashes: len = 98
0000: 01 03 01 00 39 00 00 00 20 00 00 04 01 00 80 00 ....9... .......
0010: 00 05 00 00 2F 00 00 33 00 00 32 00 00 0A 07 00 ..../..3..2.....
0020: C0 00 00 16 00 00 13 00 00 09 06 00 40 00 00 15 ............@...
0030: 00 00 12 00 00 03 02 00 80 00 00 08 00 00 14 00 ................
0040: 00 11 48 8F 8A 29 A1 EA E0 DA 13 C9 50 57 01 27 ..H..)......PW.'
0050: F4 81 A7 6D 49 9D 90 39 E6 CE D2 2F B6 32 C4 1C ...mI..9.../.2..
0060: 64 E2 d.
http-80-1, WRITE: SSLv2 client hello message, length = 98
[Raw write]: length = 100
0000: 80 62 01 03 01 00 39 00 00 00 20 00 00 04 01 00 .b....9... .....
0010: 80 00 00 05 00 00 2F 00 00 33 00 00 32 00 00 0A ....../..3..2...
0020: 07 00 C0 00 00 16 00 00 13 00 00 09 06 00 40 00 ..............@.
0030: 00 15 00 00 12 00 00 03 02 00 80 00 00 08 00 00 ................
0040: 14 00 00 11 48 8F 8A 29 A1 EA E0 DA 13 C9 50 57 ....H..)......PW
0050: 01 27 F4 81 A7 6D 49 9D 90 39 E6 CE D2 2F B6 32 .'...mI..9.../.2
0060: C4 1C 64 E2 ..d.
[Raw read]: length = 5
0000: 16 03 01 00 4A ....J
[Raw read]: length = 74
0000: 02 00 00 46 03 01 48 8F 8A 2C 0F F7 D2 97 87 CE ...F..H..,......
0010: BE C0 24 91 CD DF 76 19 C8 A4 A1 8B BF 1C C1 B5 ..$...v.........
0020: B6 AA 04 73 EB BA 20 91 31 A0 09 3B C9 16 C2 FA ...s.. .1..;....
0030: CD DF BF 26 38 CD 38 00 0E 17 82 10 AA C8 47 EC ...&8.8.......G.
0040: 7F A5 4B 7A 4C 6E 8B 00 04 00 ..KzLn....
http-80-1, READ: TLSv1 Handshake, length = 74
*** ServerHello, TLSv1
RandomCookie: GMT: 1200523820 bytes = { 15, 247, 210, 151, 135, 206, 190, 192, 36, 145, 205, 223, 118, 25, 200, 164, 161, 139, 191, 28, 193, 181, 182, 170, 4, 115, 235, 186 }
Session ID: {145, 49, 160, 9, 59, 201, 22, 194, 250, 205, 223, 191, 38, 56, 205, 56, 0, 14, 23, 130, 16, 170, 200, 71, 236, 127, 165, 75, 122, 76, 110, 139}
Cipher Suite: SSL_RSA_WITH_RC4_128_MD5
Compression Method: 0
***
%% Created: [Session-22, SSL_RSA_WITH_RC4_128_MD5]
** SSL_RSA_WITH_RC4_128_MD5
[read] MD5 and SHA1 hashes: len = 74
0000: 02 00 00 46 03 01 48 8F 8A 2C 0F F7 D2 97 87 CE ...F..H..,......
0010: BE C0 24 91 CD DF 76 19 C8 A4 A1 8B BF 1C C1 B5 ..$...v.........
0020: B6 AA 04 73 EB BA 20 91 31 A0 09 3B C9 16 C2 FA ...s.. .1..;....
0030: CD DF BF 26 38 CD 38 00 0E 17 82 10 AA C8 47 EC ...&8.8.......G.
0040: 7F A5 4B 7A 4C 6E 8B 00 04 00 ..KzLn....
[Raw read]: length = 5
0000: 16 03 01 06 69 ....i
[Raw read]: length = 1641

http-80-1, READ: TLSv1 Alert, length = 2
http-80-1, RECV TLSv1 ALERT: fatal, handshake_failure
http-80-1, called closeSocket()
http-80-1, handling exception: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
http-80-1, called close()
http-80-1, called closeInternal(true)
http-80-1, called close()
http-80-1, called closeInternal(true)
http-80-1, called close()
http-80-1, called closeInternal(true)
org.apache.axis2.AxisFault: Received fatal alert: handshake_failure
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:72)
at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:495)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1973)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:520)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:191)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at com.epsilon.webservice.axis2.client.ClientInquiryService_V1X0Stub.VerifyCommonAccount(ClientInquiryService_V1X0Stub.java:177)
at com.epsilon.webservice.axis2.client.pointsTransferClient.callWebService(pointsTransferClient.java:140)
at com.epsilon.wa.view.http.struts.action.points.pointsTransferExecuteAction.execute(pointsTransferExecuteAction.java:43)
at com.epsilon.wa.view.http.struts.action.BaseAction.execute(BaseAction.java:158)
at com.epsilon.wa.view.http.struts.action.BaseAction.execute(BaseAction.java:91)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.epsilon.wa.view.http.servlet.SessionFilter.doFilter(SessionFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.epsilon.common.view.http.servlet.LoggerFilterBase.doFilter(LoggerFilterBase.java:69)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:856)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)
at java.lang.Thread.run(Unknown Source)
Caused by: com.ctc.wstx.exc.WstxIOException: Received fatal alert: handshake_failure
at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313)
at org.apache.axiom.om.impl.MTOMXMLStreamWriter.flush(MTOMXMLStreamWriter.java:118)
at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:422)
at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:68)
... 46 more
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at org.apache.commons.httpclient.ChunkedOutputStream.flush(ChunkedOutputStream.java:190)
at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:99)
at com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:311)
... 49 more

Edited by: soundar.priya on Jul 29, 2008 9:05 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 27 2008
Added on Jul 30 2008
1 comment
1,953 views