Two Laptop Bag
The moose likes Sockets and Internet Protocols and the fly likes java.net.ConnectException: Connection timed out: connect Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "java.net.ConnectException: Connection timed out: connect" Watch "java.net.ConnectException: Connection timed out: connect" New topic
Author

java.net.ConnectException: Connection timed out: connect

surendra babu k
Greenhorn

Joined: Oct 21, 2011
Posts: 11
java.net.ConnectException: Connection timed out: connect

Hi.. I am getting the above exception while sending a request to remote server....

while processing credit cards i am getting this exception

Can any one tell how can i handle that exception....

Thanks in adv.....
Nam Ha Minh
Ranch Hand

Joined: Oct 31, 2011
Posts: 347

Probably the server was taking so long to respond, so time out happened.


Job Offer: Online working Java technical writing
surendra babu k
Greenhorn

Joined: Oct 21, 2011
Posts: 11
How can i handle that exception...

lets say i am processing four cards at a time...after processing 3 cards successfully if timeout exception occurs in the 4th card then my system shows the four cards are not processed because of time out exception.

naveen yadav
Ranch Hand

Joined: Oct 23, 2011
Posts: 380

you can try public void setConnectTimeout(int timeout) to set the time out period . This method may throw java.net.SocketException , so you need to handle that.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: java.net.ConnectException: Connection timed out: connect
 
Similar Threads
javax.mail.MessagingException is thrown when sending mail
javax.naming.CommunicationException
please help ..... error while running program using eclipse
Error with tiles
java.net.ConnectException: Connection timed out: connect