Click to See Complete Forum and Search --> : java.net.SocketTimeoutException


fiooh
11-08-2005, 11:33 AM
hi to everybody!
I have this problem:

trying to reach some intranet addresses from my webapp, i have to check if a machine is down or not respondig for any other problem, to avoid everything going slow waiting a http standard timeout.

any suggestion?

I'm trying with some classes found on the net: i have not source codes, so i don't know how they works, but the result of a call with my url as parameter is OK or TIMEOUT or ERROR... using standard http addresses, even intranet ones, everything is ok. when i try with the one i'm interested in, i receive this error:

java.net.SocketTimeoutException: Read timed out

the response of the http call is an xml: calling it from ie, everything ok.

any help very very appreciated.

bye

Khalid Ali
11-08-2005, 12:05 PM
its difficult to guess how they have implemented the code. Typically if you try to access an http address programatically, they you should set the user_agent header in the response so that the destination server knows the request is from a valid browser. Sometimes if its not from a browser the destination server might not respond..