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 Telnet Client fails to detect server disconnect during machine reboot 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 "Telnet Client fails to detect server disconnect during machine reboot" Watch "Telnet Client fails to detect server disconnect during machine reboot" New topic
Author

Telnet Client fails to detect server disconnect during machine reboot

lydia edward
Greenhorn

Joined: Feb 02, 2011
Posts: 11
I have written a telnet client that establishes a telnet session with the help of org.apache.commons.net.telnet.TelnetClient to the server and it monitors a particular file. It reads the latest contents written to that file using the tail -F command . The problem I am facing is that the blocking call inputStream.read(int) does not throw an exception when the telnet server machine reboots, but when network cable is unplugged an IOException is thrown.
Due to this behavior my program fails to receive the updates from the file after a machine reboot. Even the telnetClientObject.isConnected() returns true while the machine is rebooting.

Can you please suggest ways to rectify this issue?

Any help will be appreciated. Thanks in advance

-Lydia
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Telnet Client fails to detect server disconnect during machine reboot