Hi folks!

I have a problem with configuring a proxy to be used by CloseableHttpClient.

In a little demosetup I configure the system proxy to be used, by a http
client 3.X, 4.X and a download with url.openStream().

The httpclient actually notices, that it should use a prox, in this case at
the ip and port, as printed below. Unfortunately only the url connection
works, as both http client implementations get a timeout.

The following is the Exception, thrown by the 4.x client.

org.apache.http.conn.ConnectTimeoutException: Connect to
172.16.7.48:6666 [/172.16.7.48] failed: Connect timed out
at 
org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:132)
at 
org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:318)
at 
org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:371)
at 
org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219)[...]Caused
by: java.net.SocketTimeoutException: Connect timed out
at java.net.SocksSocketImpl.readSocksReply(SocksSocketImpl.java:125)

I described the case in more detail here:
http://stackoverflow.com/questions/26807789/apache-commons-httpclient-4-3-5-via-http-proxy

Maybe someone from this group can contribute any help.

Thank you in advance!

Reply via email to