wood burning stoves 2.0*
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
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: 498

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


PM Me If You Want to get Urgent Help on Java Programming
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: 384

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.
 
Consider Paul's rocket mass heater.
 
subject: java.net.ConnectException: Connection timed out: connect
 
Similar Threads
java.net.ConnectException: Connection timed out: connect
javax.mail.MessagingException is thrown when sending mail
Error with tiles
please help ..... error while running program using eclipse
javax.naming.CommunicationException