commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krzysztof Cieniuch" <kcieni...@wp.pl>
Subject [daemon]: jsvc.exec error: Service exit with a return value of 143
Date Fri, 12 Mar 2004 14:08:16 GMT
Hi,
I'm going to write simple server program
I would like to run it as a daemon process on linux.
(Debian 3.0r2 with kernel 2.4.24)
I found that daemon project is exactly what I need
but for two days I'm struggling with strange problem
when shuting down server in log file I get

[CUT]
jsvc.exec debug: Caught SIGTERM: Scheduling a shutdown
jsvc.exec debug: Shutdown or reload requested: exiting
jsvc.exec error: Service exit with a return value of 143

I have found that this must be some timeout problem.
I've written simple program with just one thread 
in stop() method in my main server class I'm calling function 
to stop the thread and then call join() on this thread to wait 
till it ends.
What I've found:
When my thread ends right away everthing is ok.
but if it takes some time to end the thread (closing sockets
freeing resources) I get above error message
Output from my server indicates that it just has been
killed in the middle of exiting.
This I can achive simply by calling killall on java
process, I think that purpose of daemon package is
to cleanly end java program.

Chris
PS I'm using j2sdk 1.4.2_4

----------------------------------------------------
Legenda swingu Scott Hamilton zagra w Polsce!
http://klik.wp.pl/?adr=http%3A%2F%2Fmuzyka.wp.pl%2Fimprezy.html%3Fidn%3D869&sid=137



---------------------------------------------------------------------
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