hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kalnichevski, Oleg" <oleg.kalnichev...@bearingpoint.com>
Subject RE: SocketException
Date Fri, 11 Jul 2003 16:55:54 GMT
It looks like the problem occurs inside org.apache.commons.httpclient.HttpConnection.tunnelCreated()
method when HttpClient attempts to establish a secure tunnel via proxy. It would be interesting
to find out if there are any log entries on the proxy side. 

Can you try to execute your application on Sun JDK 1.4 for a change? I have a slight suspicion
that the problem may be somehow related to IBM implementation of JSSE

Oleg

-----Original Message-----
From: Ramanan nr [mailto:ramanannr@yahoo.com]
Sent: Freitag, 11. Juli 2003 18:43
To: Commons HttpClient Project
Subject: RE: SocketException


Oleg,

My log after enabling the logging for HttpClient
follows. Looks like the connection is getting closed
after the tunnelcreation. maybe my proxy is the
culprit. I am yet to get my proxy log.

does the log look fine from the httpclient
prespective?
  

DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.HttpClient.<clinit>
[104] - Java version: 1.3.1
DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.HttpClient.<clinit>
[105] - Java vendor: IBM Corporation
DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.HttpClient.<clinit>
[106] - Java class path: myclasspath
DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.HttpClient.<clinit>
[107] - Operating system name: Windows NT
DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.HttpClient.<clinit>
[108] - Operating system architecture: x86
DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.HttpClient.<clinit>
[109] - Operating system version: 4.0
DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.HttpClient.<clinit>
[114] - SUN 1.2: SUN (DSA key/parameter generation;
DSA signing; SHA-1, MD5 digests; SecureRandom; X.509
certificates; JKS keystore)
DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.HttpClient.<clinit>
[114] - IBMJCE 1.2: IBMJCE Provider implements the
following: HMAC-SHA1, MD2, MD5, MARS, SHA, MD2withRSA,
MD5withRSA, SHA1withRSA, RSA, SHA1withDSA, RC2, RC4,
Seal)implements the following:
<<algo info...>>


DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.HttpClient.<clinit>
[114] - JSSE 1.0: IBM JSSE provider
DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.methods.GetMethod.<init>
[184] - enter GetMethod(String)
DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.methods.EntityEnclosingMethod.setRequestBody
[389] - enter
EntityEnclosingMethod.setRequestBody(String)
DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.methods.PostMethod.clearRequestBody
[215] - enter PostMethod.clearRequestBody()
DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.methods.EntityEnclosingMethod.clearRequestBody
[212] - enter EntityEnclosingMethod.clearRequestBody()
DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.methods.EntityEnclosingMethod.setRequestContentLength
[295] - enter
EntityEnclosingMethod.setRequestContentLength(int)
DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.HttpState.setProxyCredentials
[577] - enter HttpState.setProxyCredentials(String,
String, Credentials

DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.HttpConnection.<init>
[273] - Creating connection for www.ups.com via proxy
using protocol https:443
DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.HttpConnection.getSoTimeout
[618] - HttpConnection.getSoTimeout()

DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.HttpConnection.setSoTimeout
[601] - HttpConnection.setSoTimeout(10000)
DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.HttpConnection.getSoTimeout
[618] - HttpConnection.getSoTimeout()

DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.HttpClient.executeMethod
[498] - enter HttpClient.executeMethod(HttpMethod)
DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.HttpClient.executeMethod
[549] - enter
HttpClient.executeMethod(HostConfiguration,HttpMethod,HttpState)
DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.HttpConnection.setSoTimeout
[601] - HttpConnection.setSoTimeout(0)
DEBUG 07/11, 12:12:32
org.apache.commons.httpclient.HttpConnection.open
[644] - enter HttpConnection.open()
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.ConnectMethod.<init>
[92] - enter ConnectMethod(HttpMethod)
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.ConnectMethod.execute
[200] - enter ConnectMethod.execute(HttpState,
HttpConnection)
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.HttpMethodBase.execute
[1001] - enter HttpMethodBase.execute(HttpState,
HttpConnection)
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.HttpMethodBase.execute
[1014] - Preemptively sending default basic
credentials
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.auth.HttpAuthenticator.authenticateDefault
[242] - enter
HttpAuthenticator.authenticateDefault(HttpMethod,
HttpConnection, HttpState)
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.HttpState.getCredentials
[493] - enter HttpState.getCredentials(String, String
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.auth.HttpAuthenticator.authenticateProxyDefault
[271] - enter
HttpAuthenticator.authenticateProxyDefault(HttpMethod,
HttpState)
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.HttpState.getProxyCredentials
[619] - enter HttpState.getCredentials(String, String
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.auth.BasicScheme.authenticate
[153] - enter
BasicScheme.authenticate(UsernamePasswordCredentials)
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.HttpMethodBase.execute
[1022] - Default basic proxy credentials applied
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.HttpMethodBase.execute
[1040] - Execute loop try 1
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.HttpMethodBase.processRequest
[2552] - enter
HttpMethodBase.processRequest(HttpState,
HttpConnection)
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.HttpMethodBase.processRequest
[2564] - Attempt number 1 to process request
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.HttpMethodBase.writeRequest
[2210] - enter HttpMethodBase.writeRequest(HttpState,
HttpConnection)
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.HttpConnection.printLine
[1034] - enter HttpConnection.printLine(String)
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.HttpConnection.writeLine
[988] - enter HttpConnection.writeLine(byte[])
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.HttpConnection.write
[927] - enter HttpConnection.write(byte[])
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.HttpConnection.write
[949] - enter HttpConnection.write(byte[], int, int)
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.HttpConnection.writeLine
[1003] - enter HttpConnection.writeLine()
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.HttpConnection.write
[927] - enter HttpConnection.write(byte[])
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.HttpConnection.write
[949] - enter HttpConnection.write(byte[], int, int)
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.Wire.wire [119] - >>
"CONNECT www.xyz.com:443 HTTP/1.1"
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.HttpMethodBase.writeRequestHeaders
[2320] - enter
HttpMethodBase.writeRequestHeaders(HttpState,HttpConnection)
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.ConnectMethod.addRequestHeaders
[180] - enter
ConnectMethod.addRequestHeaders(HttpState,
HttpConnection)
DEBUG 07/11, 12:12:33
org.apache.commons.httpclient.HttpMethodBase.addUserAgentRequestHeader
[1610] - enter
HttpMethodBase.addUserAgentRequestHeaders(HttpState,
HttpConnection)
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpMethodBase.addHostRequestHeader
[1462] - enter
HttpMethodBase.addHostRequestHeader(HttpState,
HttpConnection)
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpMethodBase.addHostRequestHeader
[1492] - Adding Host request header
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpMethodBase.addProxyAuthorizationRequestHeader
[1517] - enter
HttpMethodBase.addProxyAuthorizationRequestHeader(HttpState,
HttpConnection)
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpMethodBase.addProxyConnectionHeader
[1552] - enter
HttpMethodBase.addProxyConnectionHeader(HttpState,
HttpConnection)
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.Wire.wire [105] - >>
"Proxy-Authorization: Basic
cnJhbmdhY2hhcmk6cmFtYW5hbm5y[\r][\n]"
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpConnection.print
[1018] - enter HttpConnection.print(String)
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpConnection.write
[927] - enter HttpConnection.write(byte[])
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpConnection.write
[949] - enter HttpConnection.write(byte[], int, int)
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.Wire.wire [105] - >>
"User-Agent: Jakarta
Commons-HttpClient/2.0beta2[\r][\n]"
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpConnection.print
[1018] - enter HttpConnection.print(String)
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpConnection.write
[927] - enter HttpConnection.write(byte[])
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpConnection.write
[949] - enter HttpConnection.write(byte[], int, int)
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.Wire.wire [105] - >>
"Host: www.xyz.com[\r][\n]"
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpConnection.print
[1018] - enter HttpConnection.print(String)
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpConnection.write
[927] - enter HttpConnection.write(byte[])
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpConnection.write
[949] - enter HttpConnection.write(byte[], int, int)
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.Wire.wire [105] - >>
"Proxy-Connection: Keep-Alive[\r][\n]"
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpConnection.print
[1018] - enter HttpConnection.print(String)
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpConnection.write
[927] - enter HttpConnection.write(byte[])
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpConnection.write
[949] - enter HttpConnection.write(byte[], int, int)
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpConnection.writeLine
[1003] - enter HttpConnection.writeLine()
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpConnection.write
[927] - enter HttpConnection.write(byte[])
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpConnection.write
[949] - enter HttpConnection.write(byte[], int, int)
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream
[780] - enter
HttpConnection.flushRequestOutputStream()
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.Wire.wire [105] - >>
"[\r][\n]"
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream
[780] - enter
HttpConnection.flushRequestOutputStream()
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpMethodBase.readResponse
[1928] - enter HttpMethodBase.readResponse(HttpState,
HttpConnection)
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpMethodBase.readStatusLine
[2129] - enter
HttpMethodBase.readStatusLine(HttpState,
HttpConnection)
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpConnection.readLine
[1062] - enter HttpConnection.readLine()
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpParser.readLine
[134] - enter HttpParser.readLine()
DEBUG 07/11, 12:12:34
org.apache.commons.httpclient.HttpParser.readRawLine
[105] - enter HttpParser.readRawLine()
DEBUG 07/11, 12:12:38
org.apache.commons.httpclient.Wire.wire [105] - <<
"HTTP/1.0 200 Connection established[\r][\n]"
DEBUG 07/11, 12:12:38
org.apache.commons.httpclient.HttpMethodBase.readResponseHeaders
[2092] - enter
HttpMethodBase.readResponseHeaders(HttpState,HttpConnection)
DEBUG 07/11, 12:12:38
org.apache.commons.httpclient.HttpConnection.getResponseInputStream
[855] - enter HttpConnection.getResponseInputStream()
DEBUG 07/11, 12:12:38
org.apache.commons.httpclient.HttpParser.parseHeaders
[166] - enter
HeaderParser.parseHeaders(HttpConnection, HeaderGroup)
DEBUG 07/11, 12:12:38
org.apache.commons.httpclient.HttpParser.readLine
[134] - enter HttpParser.readLine()
DEBUG 07/11, 12:12:38
org.apache.commons.httpclient.HttpParser.readRawLine
[105] - enter HttpParser.readRawLine()
DEBUG 07/11, 12:12:38
org.apache.commons.httpclient.HttpParser.readLine
[134] - enter HttpParser.readLine()
DEBUG 07/11, 12:12:38
org.apache.commons.httpclient.HttpParser.readRawLine
[105] - enter HttpParser.readRawLine()
DEBUG 07/11, 12:12:38
org.apache.commons.httpclient.Wire.wire [105] - <<
"Proxy-agent: Netscape-Proxy/3.52[\r][\n]"
DEBUG 07/11, 12:12:38
org.apache.commons.httpclient.HttpMethodBase.processResponseHeaders
[1806] - enter
HttpMethodBase.processResponseHeaders(HttpState,
HttpConnection)
DEBUG 07/11, 12:12:38
org.apache.commons.httpclient.HttpMethodBase.readResponseBody
[1979] - enter
HttpMethodBase.readResponseBody(HttpState,
HttpConnection)
DEBUG 07/11, 12:12:38
org.apache.commons.httpclient.HttpMethodBase.readResponseBody
[2013] - enter
HttpMethodBase.readResponseBody(HttpState,
HttpConnection)
DEBUG 07/11, 12:12:38
org.apache.commons.httpclient.HttpConnection.getResponseInputStream
[855] - enter HttpConnection.getResponseInputStream()
DEBUG 07/11, 12:12:38
org.apache.commons.httpclient.HttpMethodBase.canResponseHaveBody
[2394] - enter HttpMethodBase.canResponseHaveBody(int)
DEBUG 07/11, 12:12:38
org.apache.commons.httpclient.ConnectMethod.execute
[202] - CONNECT status code 200
DEBUG 07/11, 12:12:38
org.apache.commons.httpclient.HttpConnection.tunnelCreated
[734] - enter HttpConnection.tunnelCreated()
DEBUG 07/11, 12:12:41 com.mypackage.myclass.mymethod
[159] - IOException
java.net.SocketException: Socket closed
	at java.net.PlainSocketImpl.socketGetOption(Native
Method)
	at
java.net.PlainSocketImpl.getOption(PlainSocketImpl.java:214)
	at java.net.Socket.getSendBufferSize(Socket.java:548)
	at
org.apache.commons.httpclient.HttpConnection.tunnelCreated(HttpConnection.java:756)
	at
org.apache.commons.httpclient.ConnectMethod.execute(ConnectMethod.java:204)
	at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:638)
	at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:500)
	at com.mypackage.myclass.mymethod(myclass.java:140)
	






--- "Kalnichevski, Oleg"
<oleg.kalnichevski@bearingpoint.com> wrote:
> Can you also enable debug logging for HttpClient
> classes by doing the following?
> 
> log4j.logger.org.apache.commons.httpclient=DEBUG,
> YOUR_APPENDER
> 
> It may help shed some light on this issue
> 
> Oleg
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
>
commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-httpclient-dev-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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


Mime
View raw message