You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Vinay Murthy <vi...@gmail.com> on 2004/10/14 18:18:22 UTC

connection timing out on httpClient

Hi,
I am using httpClient as a part of htmlUnit. I tried logging into my
mail account (Yahoo!), but unfortunately ended with an exception
trace:
java.net.ConnectException: Connection timed out: connect
	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.Socket.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.<init>(Unknown Source)
	at java.net.Socket.<init>(Unknown Source)
	at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:105)
	at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:663)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:661)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:529)

How can work around this problem ? Can someboby help ?

Regards
Vinay

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


Re: connection timing out on httpClient

Posted by Tom van den Berge <to...@bibit.com>.
Vinay,
Your connection timeout means that setting up the ip connection takes 
too much time. Generally, this can be solved in two ways: either extend 
the timeout period, or make sure the connection can be set up quicky 
enough for you. Have you checked if you can set up a connection at all? 
Typically, this is a network problem...

Cheers,
Tom

Vinay Murthy wrote:

>Hi,
>I am using httpClient as a part of htmlUnit. I tried logging into my
>mail account (Yahoo!), but unfortunately ended with an exception
>trace:
>java.net.ConnectException: Connection timed out: connect
>	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.Socket.connect(Unknown Source)
>	at java.net.Socket.connect(Unknown Source)
>	at java.net.Socket.<init>(Unknown Source)
>	at java.net.Socket.<init>(Unknown Source)
>	at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:105)
>	at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:663)
>	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:661)
>	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:529)
>
>How can work around this problem ? Can someboby help ?
>
>Regards
>Vinay
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>  
>

-- 
Tom van den Berge
Development

Bibit Global Payment Services
Regulierenring 10
3981 LB  Bunnik
Netherlands

[T] +31 30 659 5143
[F] +31 30 656 4464

www.bibit.com


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