File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes Handling a TCP reset Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Handling a TCP reset" Watch "Handling a TCP reset" New topic
Author

Handling a TCP reset

Thomas Emerst
Greenhorn

Joined: Dec 26, 2010
Posts: 7
Hi,

The project consists of a server and a client. The client is at-first, sending data to the server. In-turn, the server replies - it is essential for the client to wait and acquire the server's reply after each call.
My issue is fairly odd: my client, while awaiting for the server's response (in a while{} loop), stalls and never seizes to execute. Upon some investigation, Wireshark unvealed that the server is sending a TCP-reset (RST) message back to my client, but the program doesn't seem to pick that up and throw an exception or an error.



The client gets stuck at the while(this.bis.ready() == false) {} loop, since the server isn't sending any data, it's terminating with a TCP-reset message, but the program continues to run, no exception is thrown. How can I detect the connection-reset?

Thank you.



[Thumbnail for stall.PNG]

siharvey Harvey
Greenhorn

Joined: May 16, 2012
Posts: 1
Hi,

We are currently facing exactly the same problem you described below. We appear to successfully send a request but timeout waiting for a response. Using Wireshark we can see that an RST message is being sent back from the server but no exception is raised in our application.

Did you find an answer to your original question?

Thank you.
 
 
subject: Handling a TCP reset