/    Sign up×
Community /Pin to ProfileBookmark

java.net.SocketTimeoutException

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

to post a comment
Java

1 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliNov 08.2005 — 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..
×

Success!

Help @fiooh spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...