commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wade Chandler <wchand...@redesetgrow.com>
Subject Re: daemon issue
Date Tue, 04 Jan 2005 06:06:35 GMT
Eric Renouf wrote:
> 
> Hi all,
> 
> I'm trying to write a Java Daemon which will listen for incoming connections and
> when it gets certain commands start up various threads or processes.  The
> problem that I'm having right now involves the spawned threads creating sockets.
> 
> When running via jsvc as a daemon the main listening thread spawns a thread to
> handle each connection.  That thread is able to create a new Socket(host, port)
> with no problem (just added for testing purposes).  That thread the processes
> the command and, in some cases, spawns a new thread that uses the HttpClient
> package to retrieve a web page, but that failes with a java.net.ConnectException
> connection failed.  If I just try to do the same Socket(host, port) as the
> listening thread does that also fails.
> 
> Also if I run the whole thing by hand, not as a Daemon everything seems to work
> just fine.
> 
> Can anyone help point out something that I could be overlooking, because I'm not
> sure what else to try as far as tracking this down goes.
> 
> Thanks,
> Eric
> ___________________________________________________________
> This mail sent using ToadMail -- Web based e-mail @ ToadNet
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 
> 
Do you have any logging to see if your process is actually binding to 
the server port fine?  Maybe log that, and in the main setup code try to 
make a socket connection to test your server before you continue on and 
debug that section of code.

Wade


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message