This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes TCP timeout with error message(java.net.SocketException: Software caused connection abort:recv fail) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "TCP timeout with error message(java.net.SocketException: Software caused connection abort:recv fail)" Watch "TCP timeout with error message(java.net.SocketException: Software caused connection abort:recv fail)" New topic
Author

TCP timeout with error message(java.net.SocketException: Software caused connection abort:recv fail)

john price
Ranch Hand

Joined: Feb 24, 2011
Posts: 495

My TCP client times out after 9-10 minutes. I have tested this on multiple computers. The server remains up, fine, and running with no other errors. This is the error message displayed on the server cmd line:

This is the error I receive on the client:

What does this mean and how can I fix it?
Thanks,
cc11rocks aka John Price


“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” (Mosher's Law of Software Engineering)
“If debugging is the process of removing bugs, then programming must be the process of putting them in.” (Edsger Dijkstra)
Rupesh Mhatre
Ranch Hand

Joined: Apr 29, 2011
Posts: 35

john price wrote:java.lang.StringIndexOutOfBoundsException: String index out of range: 0

In this case you are getting empty String thats why you are getting StringIndexOutOfBoundsException.

In first case just check whether your firewall is blocking the port you are using.
john price
Ranch Hand

Joined: Feb 24, 2011
Posts: 495

I am running the server and the client...Connected to my IP address and have port forwarding set up. Works until 9-10 minutes. Then, sets off error. Just put up a try and catch clause around that line. Get slightly different error:

Thanks,
John Price aka cc11rocks
john price
Ranch Hand

Joined: Feb 24, 2011
Posts: 495

I had to go into Windows to fix this:
Control Panel > Installed Updated > Turn Windows Features on or Off > (CheckBox) Simple TCPIP services (i.e. echo, daytime etc)
Works like a charm now.
cc11rocks aka John Price
 
Consider Paul's rocket mass heater.
 
subject: TCP timeout with error message(java.net.SocketException: Software caused connection abort:recv fail)