hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Need help with ProxySelectorRoutePlanner
Date Fri, 14 Jan 2011 13:43:45 GMT
On Thu, 2011-01-13 at 16:57 -0500, David Motes wrote:
> I probably was not clear about the ProxySelectorRoutePlanner, I took
> that code out.
> 
>  With ProxySelectorRoutePlanner and
> System.setProperty("java.net.useSystemProxies",
> "true") the routing code looks right based on the trace:
> 2011/01/11 10:58:34:296 EST [DEBUG] SingleClientConnManager - Get
> connection for route
> HttpRoute[{}->http://192.168.1.144:8000->http://www2.mytest.com]
> 
> But the java tcp code uses ProxySelector to select a proxy so it ends
> up trying to proxy->proxy->destination.
> 
> Without ProxySelectorRoutePlanner I get the following stack trace when
> configured to use proxy:
> java.net.SocksSocketImpl.connect(SocksSocketImpl.java:423)
> <-----NOTE it is in the socks code
> java.net.Socket.connect(Socket.java:518)
> org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:123)
> <-----NOTE connect
> org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:133)
> org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
> org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:108)
> org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576)
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554)
> 
> Note it is in SocksSocketImpl waiting for a response from the socks
> server, will not pull out.
> 
> Not configured to use proxy results in this:
> java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:340)
> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
> java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
> java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
> <-----NOTE it is in the socks code

Which still seems to suggest a configuration issue.

Oleg



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


Mime
View raw message