Hi All,
We are trying to switch from Java Web to the Tomcat7 container. Our code used to utilize the Destination API, however it is not available anymore.
So, for outgoing communications we use an explicitly instantiated HttpClient. However, when trying to issue requests to external hosts we receive the following exception:
java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:581)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:72)
at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:118)
... 36 more
I guess, that it is because we have not set up the proper Proxy for the HttpClient.
So, my question is:
How to fetch the proxy settings from the HCP container so that they would be used to grammatically configure the HttpClient?
With best regards,
Alexander Vyssokii