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 Saurabh AMBASTA <sa...@lexmarkpartners-europe.com> on 2007/07/30 17:34:28 UTC
Still getting socket closed exception
Hi,
I have duplicated the http header that IE sends to a particular url. But
when I send access the URL using httpclient, I get socket closed
exception. Its a https site and it opens with IE. I am unable to access
that site with httpclient.
2007/07/30 17:15:35:218 CEST [DEBUG] HttpMethodBase - Adding Host request
header
2007/07/30 17:15:35:228 CEST [DEBUG] header - >> "connection:
Keep-Alive[\r][\n]"
2007/07/30 17:15:35:228 CEST [DEBUG] header - >> "accept: image/gif,
image/x-xbitmap,image/jpeg, ima
ge/pjpeg, application/x-shockwave-flash, application/vnd.ms-powerpoint,
application/msword, applicat
ion/vnd.ms-excel, */*[\r][\n]"
2007/07/30 17:15:35:228 CEST [DEBUG] header - >> "accept-language:
en-us[\r][\n]"
2007/07/30 17:15:35:238 CEST [DEBUG] header - >> "accept-encoding: gzip,
deflate[\r][\n]"
2007/07/30 17:15:35:238 CEST [DEBUG] header - >> "User-Agent: Mozilla/4.0
(compatible; MSIE 6.0; Win
dows NT 5.1; SV1) [\r][\n]"
2007/07/30 17:15:35:248 CEST [DEBUG] header - >> "Host:
knetca1.place.lexmark.com[\r][\n]"
2007/07/30 17:15:35:248 CEST [DEBUG] header - >> "[\r][\n]"
2007/07/30 17:15:35:398 CEST [DEBUG] HttpMethodDirector - Closing the
connection.
2007/07/30 17:15:35:408 CEST [DEBUG] HttpMethodDirector - Method retry
handler returned false. Autom
atic recovery will not be attempted
2007/07/30 17:15:35:408 CEST [DEBUG] HttpConnection - Releasing connection
back to connection manage
r.
java.net.SocketException: Socket closed
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA12275)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:67)
at
java.io.BufferedOutputStream.flush(BufferedOutputStream.java:125)
at
org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(Unknown
Source)
at
org.apache.commons.httpclient.HttpMethodBase.writeRequest(Unknown Source)
at org.apache.commons.httpclient.HttpMethodBase.execute(Unknown
Source)
at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown
Source)
at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown
Source)
at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown
Source)
at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown
Source)
thanks and regards,
Saurabh Ambasta
Phone : 33 - (0) 2 38 71 1508
Email : saurabh.ambasta@lexmarkpartners-europe.com
Re: Still getting socket closed exception
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Wed, 2007-08-01 at 10:33 +0200, Saurabh AMBASTA wrote:
> Hello Roland,
>
> Thanks for your help. With JSSE debug parameters, we were able to pinpoint
> the problem to the SSL version that the client was sending. We are using
> sun JSSE and by default the SSL version that it sends out for the SSL
> handshake is v3.1 which corresponds to TLS1.0. How do we change this to
> v3.0 in httpclient ?
>
Please refer to the HttpClient SSL guide:
http://commons.apache.org/httpclient/sslguide.html
Oleg
>
> thanks and regards,
> Saurabh Ambasta
>
>
>
>
>
>
> Roland Weber <os...@dubioso.net>
> 07/30/2007 06:24 PM
> Please respond to
> "HttpClient User Discussion" <ht...@jakarta.apache.org>
>
>
> To
> HttpClient User Discussion <ht...@jakarta.apache.org>
> cc
>
> Subject
> Re: Still getting socket closed exception
>
>
>
>
>
>
> Hello Saurabh,
>
> > java.net.SocketException: Socket closed
> > at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
>
> This looks like some kind of SSL handshake problem,
> and we're really not SSL specialists on this list.
> Have you tried to enable SSL debug messages?
> http://java.sun.com/j2se/1.4.2/docs/guide/security/jsse/JSSERefGuide.html#Debug
>
>
> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
Re: Still getting socket closed exception
Posted by Saurabh AMBASTA <sa...@lexmarkpartners-europe.com>.
Hello Roland,
Thanks for your help. With JSSE debug parameters, we were able to pinpoint
the problem to the SSL version that the client was sending. We are using
sun JSSE and by default the SSL version that it sends out for the SSL
handshake is v3.1 which corresponds to TLS1.0. How do we change this to
v3.0 in httpclient ?
thanks and regards,
Saurabh Ambasta
Roland Weber <os...@dubioso.net>
07/30/2007 06:24 PM
Please respond to
"HttpClient User Discussion" <ht...@jakarta.apache.org>
To
HttpClient User Discussion <ht...@jakarta.apache.org>
cc
Subject
Re: Still getting socket closed exception
Hello Saurabh,
> java.net.SocketException: Socket closed
> at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
This looks like some kind of SSL handshake problem,
and we're really not SSL specialists on this list.
Have you tried to enable SSL debug messages?
http://java.sun.com/j2se/1.4.2/docs/guide/security/jsse/JSSERefGuide.html#Debug
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: Still getting socket closed exception
Posted by Roland Weber <os...@dubioso.net>.
Hello Saurabh,
> java.net.SocketException: Socket closed
> at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
This looks like some kind of SSL handshake problem,
and we're really not SSL specialists on this list.
Have you tried to enable SSL debug messages?
http://java.sun.com/j2se/1.4.2/docs/guide/security/jsse/JSSERefGuide.html#Debug
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