aspose file tools
The moose likes Sockets and Internet Protocols and the fly likes A problem of 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 "A problem of "ServerSocket" on Linux" Watch "A problem of "ServerSocket" on Linux" New topic
Author

A problem of "ServerSocket" on Linux

Hogan Wang
Greenhorn

Joined: Dec 17, 2006
Posts: 1
I created a server class with ServerSocket, and run it on Linux (in daemon), however, when the Linux is rebooted, the client side could not feel it. It is still pending at "read" method instead of -1 returned from the method. It works when it is not run in daemon. Why?
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24059
    
  13

Hi,

Welcome to JavaRanch!

I'm not sure what running "in daemon" means -- automatically? Via inetd? In the background?

You can use "telnet" on the Linux machine to talk directly to your server program; that might be a good way to debug this:

telnet localhost port

(where port is the port number you are trying to run the server on.) Does this connect? Does it respond the way you expect if you type something? Until this works, you're obviously not going to be able to use the Java client.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A problem of "ServerSocket" on Linux
 
Similar Threads
background process on tomcat 4
what is daemon threads
ServerSocket not oppening
need clarification on threads
how Daemon Threads are working exactly???why Daemon??