commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "T.J. Hoo" <tj...@hotmail.com>
Subject HttpClient ConnectException: Connection refused: connect
Date Thu, 12 Aug 2004 02:41:48 GMT
I encounter ConnectException: Connection refused: connect
eventhough I set the timeout to 0 (infinite timeout?), what could be the 
problem?

My program:

  MultiThreadedHttpConnectionManager connManager = new 
MultiThreadedHttpConnectionManager();
  client = new HttpClient(connManager);
  client.setTimeout(0);

the exception:

java.net.ConnectException: Connection refused: connect
  at java.net.PlainSocketImpl.socketConnect(Native Method)
  at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
  at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
  at java.net.Socket.connect(Socket.java:452)
  at java.net.Socket.connect(Socket.java:402)
  at java.net.Socket.<init>(Socket.java:309)
  at java.net.Socket.<init>(Socket.java:124)
  at 
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:86)
  at 
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:651)
  at 
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1170)
  at 
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:628)
  at 
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:497)

_________________________________________________________________
Download the latest MSN Messenger http://messenger.msn.com.my


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


Mime
View raw message