You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Massimo Signori <si...@webscience.it> on 2004/10/29 17:48:28 UTC
Connection timeout
Got this Exception during downloading a file from server using httpClient:
671 [thread applet-qcocorrector.view.MainApplet.class] DEBUG
qcocorrector.adapter.security.KeyManagerAdapter - downloadQCOKey, keyURL:
http://srv001:12000/Aula_2//correzioni/2323132/3116861/21/qcos/xyz.txt
734 [thread applet-qcocorrector.view.MainApplet.class] DEBUG
qcocorrector.adapter.security.KeyManagerAdapter - Executing HttpMethod
Get...
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.createSo
cket(DefaultProtocolSocketFactory.java:86)
at
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:652)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:628)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:497)
at
qcocorrector.adapter.security.AppletKeyManager.downloadQCOKey(AppletKeyManag
er.java:87)
at qcocorrector.view.MainApplet.startModel(MainApplet.java:254)
at qcocorrector.view.MainApplet.init(MainApplet.java:86)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
an here's the code:
httpMethod = new GetMethod(keyURL);
for ( statusCode = -1; attempt < MAX_ATTEMPTS; attempt++) {
try {
logger.debug("Executing HttpMethod Get...");
statusCode = this.httpClient.executeMethod(httpMethod);
logger.debug("Done");
key = httpMethod.getResponseBody();
}
catch (Exception e) {
e.printStackTrace();
//throw new
KeyManagerException(KeyManagerException.ERROR_DOWNLOADING_QCO_KEY);
}
finally{
httpMethod.releaseConnection();
}
I'm using HttpClient version 2.0.2 on winxp sp2 with JRE 1.4.2_05.
The URL is correct and file exists on server...
Any ideas ?
Best regards,
Massimo
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org
Re: Connection timeout
Posted by Ortwin Glück <or...@nose.ch>.
Massimo,
The exception only indicates that a TCP connection to your server could
not be established within the given timeout time. This is not an error
within HttpClient but rather on your network or server.
Thanks for your understanding
Ortwin Glück
Massimo Signori wrote:
> Got this Exception during downloading a file from server using httpClient:
> java.net.ConnectException: Connection timed out: connect
>
--
_________________________________________________________________
NOSE applied intelligence ag
ortwin glück [www] http://www.nose.ch
software engineer
hardturmstrasse 171 [pgp id] 0x81CF3416
8005 zürich [office] +41-1-277 57 35
switzerland [fax] +41-1-277 57 12
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org