You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Solomon Thumma <so...@yahoo.com> on 2006/05/15 17:04:23 UTC

Intermittent SSL handshake failure issue.

 
  We are seeing the below intermittent SSL handshake failure error while trying to read data from an external site. Primarily we see this error when the other site is having some response issues.
   
  We ever this error occurs the http call hangs for couple of minutes. The 5 seconds read time out doesn't seems to work.
   
  We are using httpclient3.0 and Web sphere 5.0.2.10 and IBMJSSE (1.0.3) for SSL communication. 
   
  Could any one provide me some insight into this issue?
   
  -Solomon
   
  Exception Trace.
  java.lang.RuntimeException: java.net.SocketException: SSL handshake failure
 at com.ibm.sslite.m.c(Unknown Source)(Compiled Code)
 at com.ibm.sslite.m.f(Unknown Source)(Compiled Code)
 at com.ibm.sslite.m.a(Unknown Source)(Compiled Code)
 at com.ibm.sslite.n.<init>(Unknown Source)(Inlined Compiled Code)
 at com.ibm.sslite.be.a(Unknown Source)(Compiled Code)
 at com.ibm.sslite.be.<init>(Unknown Source)(Inlined Compiled Code)
 at com.ibm.jsse.bh.a(Unknown Source)(Compiled Code)
 at com.ibm.jsse.b.a(Unknown Source)(Inlined Compiled Code)
 at com.ibm.jsse.b.write(Unknown Source)(Compiled Code)
 at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java(Inlined Compiled Code))
 at java.io.BufferedOutputStream.flush(BufferedOutputStream.java(Compiled Code))
 at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java(Compiled Code))
 at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java(Compiled Code))
 at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java(Compiled Code))
 at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java(Compiled Code))
 at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java(Compiled Code))
 at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java(Compiled Code))
 at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java(Inlined Compiled Code))
  
 

		
---------------------------------
How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.

Re: Intermittent SSL handshake failure issue.

Posted by Roland Weber <ht...@dubioso.net>.
Hello Solomon,

>   Just want to clarify this. Currently we are on jdk1.3.1 (WAS5.0.2.10) and we are using 
>   HttpClient 3.0 (which is supposed on jdk1.4.x).

HttpClient 3.0 supports JDK 1.2.2 and above. BUT: the JDK does not
provide a connection timeout feature until JDK 1.4. That means in
your case, an extra thread will be spawned that tries to interrupt
the main thread after the connection timeout is expired. That may
or may not work, depending on the JSSE implementation.

http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html#connect(java.net.SocketAddress,%20int)

hope that helps,
  Roland

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Re: Intermittent SSL handshake failure issue.

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, 2006-05-23 at 07:21 -0700, Solomon Thumma wrote:
> Thanks Oleg for the reply.
>    
>   I will try setting connect timeout along with read timeout and see if that fixes the problem.
>    
>   Just want to clarify this. Currently we are on jdk1.3.1 (WAS5.0.2.10) and we are using 
>   HttpClient 3.0 (which is supposed on jdk1.4.x). Just wondering whether there will be any impact on the app for this combination.
>    
>   Also I will try to purse with IBM regarding this SSL handshake failure issue.
>    
>   Do you have any other suggestions to over come this issue. Increasing the read timeout (5 secs to 10secs) will be any help ?

It might. At the same time I cannot say anything for sure as, quite
frankly, I do not know what causes the problem is in the first place.

You may want to enable SSL trace output [*] in order to get more details
on what goes wrong during the SSL handshake.

Oleg

[*] -Djavax.net.debug=ssl,handshake

>    
>   -Solomon
>    
>    
>   
> Oleg Kalnichevski <ol...@apache.org> wrote:
>   On Mon, 2006-05-15 at 08:04 -0700, Solomon Thumma wrote: 
> > We are seeing the below intermittent SSL handshake failure error while trying to read data from an external site. Primarily we see this error when the other site is having some response issues.
> > 
> > We ever this error occurs the http call hangs for couple of minutes. The 5 seconds read time out doesn't seems to work.
> 
> Solomon,
> 
> The socket read timeout does not apply here. Make sure the connect
> timeout is set. 
> 
> As to the SSL handshake failure, it appears to be specific to the IBM
> implementation of JSSE. You should probably seek assistance through
> official IBM support channels, unless someone on this list happens to
> have in-depth knowledge of the IBMJSSE implementation.
> 
> Oleg
> 
> > 
> > We are using httpclient3.0 and Web sphere 5.0.2.10 and IBMJSSE (1.0.3) for SSL communication. 
> > 
> > Could any one provide me some insight into this issue?
> > 
> > -Solomon
> > 
> > Exception Trace.
> > java.lang.RuntimeException: java.net.SocketException: SSL handshake failure
> > at com.ibm.sslite.m.c(Unknown Source)(Compiled Code)
> > at com.ibm.sslite.m.f(Unknown Source)(Compiled Code)
> > at com.ibm.sslite.m.a(Unknown Source)(Compiled Code)
> > at com.ibm.sslite.n.(Unknown Source)(Inlined Compiled Code)
> > at com.ibm.sslite.be.a(Unknown Source)(Compiled Code)
> > at com.ibm.sslite.be.(Unknown Source)(Inlined Compiled Code)
> > at com.ibm.jsse.bh.a(Unknown Source)(Compiled Code)
> > at com.ibm.jsse.b.a(Unknown Source)(Inlined Compiled Code)
> > at com.ibm.jsse.b.write(Unknown Source)(Compiled Code)
> > at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java(Inlined Compiled Code))
> > at java.io.BufferedOutputStream.flush(BufferedOutputStream.java(Compiled Code))
> > at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java(Compiled Code))
> > at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java(Compiled Code))
> > at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java(Compiled Code))
> > at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java(Compiled Code))
> > at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java(Compiled Code))
> > at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java(Compiled Code))
> > at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java(Inlined Compiled Code))
> > 
> > 
> > 
> > 
> > ---------------------------------
> > How low will we go? Check out Yahoo! Messenger¢s low PC-to-Phone call rates.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 
> 
> 
> 		
> ---------------------------------
> Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates starting at 1&cent;/min.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Re: Intermittent SSL handshake failure issue.

Posted by Solomon Thumma <so...@yahoo.com>.
Thanks Oleg for the reply.
   
  I will try setting connect timeout along with read timeout and see if that fixes the problem.
   
  Just want to clarify this. Currently we are on jdk1.3.1 (WAS5.0.2.10) and we are using 
  HttpClient 3.0 (which is supposed on jdk1.4.x). Just wondering whether there will be any impact on the app for this combination.
   
  Also I will try to purse with IBM regarding this SSL handshake failure issue.
   
  Do you have any other suggestions to over come this issue. Increasing the read timeout (5 secs to 10secs) will be any help ?
   
  -Solomon
   
   
  
Oleg Kalnichevski <ol...@apache.org> wrote:
  On Mon, 2006-05-15 at 08:04 -0700, Solomon Thumma wrote: 
> We are seeing the below intermittent SSL handshake failure error while trying to read data from an external site. Primarily we see this error when the other site is having some response issues.
> 
> We ever this error occurs the http call hangs for couple of minutes. The 5 seconds read time out doesn't seems to work.

Solomon,

The socket read timeout does not apply here. Make sure the connect
timeout is set. 

As to the SSL handshake failure, it appears to be specific to the IBM
implementation of JSSE. You should probably seek assistance through
official IBM support channels, unless someone on this list happens to
have in-depth knowledge of the IBMJSSE implementation.

Oleg

> 
> We are using httpclient3.0 and Web sphere 5.0.2.10 and IBMJSSE (1.0.3) for SSL communication. 
> 
> Could any one provide me some insight into this issue?
> 
> -Solomon
> 
> Exception Trace.
> java.lang.RuntimeException: java.net.SocketException: SSL handshake failure
> at com.ibm.sslite.m.c(Unknown Source)(Compiled Code)
> at com.ibm.sslite.m.f(Unknown Source)(Compiled Code)
> at com.ibm.sslite.m.a(Unknown Source)(Compiled Code)
> at com.ibm.sslite.n.(Unknown Source)(Inlined Compiled Code)
> at com.ibm.sslite.be.a(Unknown Source)(Compiled Code)
> at com.ibm.sslite.be.(Unknown Source)(Inlined Compiled Code)
> at com.ibm.jsse.bh.a(Unknown Source)(Compiled Code)
> at com.ibm.jsse.b.a(Unknown Source)(Inlined Compiled Code)
> at com.ibm.jsse.b.write(Unknown Source)(Compiled Code)
> at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java(Inlined Compiled Code))
> at java.io.BufferedOutputStream.flush(BufferedOutputStream.java(Compiled Code))
> at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java(Compiled Code))
> at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java(Compiled Code))
> at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java(Compiled Code))
> at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java(Compiled Code))
> at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java(Compiled Code))
> at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java(Compiled Code))
> at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java(Inlined Compiled Code))
> 
> 
> 
> 
> ---------------------------------
> How low will we go? Check out Yahoo! Messenger¢s low PC-to-Phone call rates.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org



		
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates starting at 1&cent;/min.

Re: Intermittent SSL handshake failure issue.

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2006-05-15 at 08:04 -0700, Solomon Thumma wrote: 
>    We are seeing the below intermittent SSL handshake failure error while trying to read data from an external site. Primarily we see this error when the other site is having some response issues.
>    
>   We ever this error occurs the http call hangs for couple of minutes. The 5 seconds read time out doesn't seems to work.

Solomon,

The socket read timeout does not apply here. Make sure the connect
timeout is set. 

As to the SSL handshake failure, it appears to be specific to the IBM
implementation of JSSE. You should probably seek assistance through
official IBM support channels, unless someone on this list happens to
have in-depth knowledge of the IBMJSSE implementation.

Oleg

>    
>   We are using httpclient3.0 and Web sphere 5.0.2.10 and IBMJSSE (1.0.3) for SSL communication. 
>    
>   Could any one provide me some insight into this issue?
>    
>   -Solomon
>    
>   Exception Trace.
>   java.lang.RuntimeException: java.net.SocketException: SSL handshake failure
>  at com.ibm.sslite.m.c(Unknown Source)(Compiled Code)
>  at com.ibm.sslite.m.f(Unknown Source)(Compiled Code)
>  at com.ibm.sslite.m.a(Unknown Source)(Compiled Code)
>  at com.ibm.sslite.n.<init>(Unknown Source)(Inlined Compiled Code)
>  at com.ibm.sslite.be.a(Unknown Source)(Compiled Code)
>  at com.ibm.sslite.be.<init>(Unknown Source)(Inlined Compiled Code)
>  at com.ibm.jsse.bh.a(Unknown Source)(Compiled Code)
>  at com.ibm.jsse.b.a(Unknown Source)(Inlined Compiled Code)
>  at com.ibm.jsse.b.write(Unknown Source)(Compiled Code)
>  at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java(Inlined Compiled Code))
>  at java.io.BufferedOutputStream.flush(BufferedOutputStream.java(Compiled Code))
>  at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java(Compiled Code))
>  at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java(Compiled Code))
>  at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java(Compiled Code))
>  at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java(Compiled Code))
>  at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java(Compiled Code))
>  at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java(Compiled Code))
>  at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java(Inlined Compiled Code))
>   
>  
> 
> 		
> ---------------------------------
> How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org