On Fri, 2010-01-29 at 16:25 -0800, Razvan Mihailescu-Baltag wrote: > We don't use any special proxy for the java applications and for other > applications. > > Bellow is a request being made to the public url: > > wget http://server.name.com/directory > --00:09:23-- http://server.name.com/directory > => `directory' > Resolving server.name.com... server.ip.address > Connecting to server.name.com:80... connected. > HTTP request sent, awaiting response... 301 Moved Permanently > Location: http://server.ip.address/directory/ [following] > --00:09:23-- http://server.ip.address/directory/ > => `index.html' > Reusing existing connection to server.ip.address:80. > HTTP request sent, awaiting response... 200 OK > Length: 44 [text/html] > index.html: Permission denied > > Next, the request being made to the private url: > > wget http://server.name.com > --00:14:08-- http://server.name.com/ > => `index.html' > Resolving server.name.com... server.ip.address > Connecting to server.name.com |server.ip.address|:80... connected. > HTTP request sent, awaiting response... 403 Forbidden > 00:14:08 ERROR 403: Forbidden. > > My understanding here is that we have basic connectivity to the server. Wget > is able to establish a connection to the server, but it seems that http > client > throws an exception at > org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:127). > > Unfortunatelly, on the machine where my java application runs I cannot > install > any other applications and only have wget and curl tools. > >
The root exception is thrown by the java.net.PlainSocketImpl class. This is a local connectivity problem, which has nothing to do with HttpClient. The target host is either not accessible or the timeout value is too aggressive. > > > > Caused by: java.net.ConnectException: Connection timed out > > > > at java.net.PlainSocketImpl.socketConnect(Native Method) > > > > at java.net.PlainSocketImpl.doConnect(Unknown Source) > > > > at java.net.PlainSocketImpl.connectToAddress(Unknown Source) > > > > at java.net.PlainSocketImpl.connect(Unknown Source) > > > > at java.net.SocksSocketImpl.connect(Unknown Source) > > > > at java.net.Socket.connect(Unknown Source) > > > > at > > > org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFa > ctory.java:123) > > > > at > > > org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(D > efaultClientConnectionOperator.java:123) > > > The fact that you can access the target host from _another_ machine is meaningless. Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
