You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Bernard <bh...@actrix.gen.nz> on 2005/02/14 23:01:13 UTC

Multiple broken Tomcat Linux daemon instances with jsvc?

Hi all,

Summary: Using jsvc may result in multiple running instances of the
Tomcat servlet engine on the same machine with the same pid file. Is
this an intended behavior?


Background, Details:

I intend to use Tomcat 5.5 in a commercial environment with multiple
virtual hosts.

It appears that when adding a virtual host, Tomcat needs to be
re-started to recognize a new host entry in server.xml.

Furthermore, something like jsvc (from the Apache Jakarta Commons
Daemon project) must be used to call the servlet destroy() methods in
order to have a controlled shutdown without losing data e.g. user
sessions.

Tomcat includes shell scripts that execute jsvc. I adapted such a
script and added the parameter --pidfile
as documented in http://jakarta.apache.org/commons/daemon/jsvc.html

jsvc creates a pid file as expected, however it does not delete it
when its process is killed.

jsvc also creates multiple instances even if the pid file exists.

Consequently, multiple instances of Tomcat may exist of which only one
can be deleted via the pid file.

I am trying to understand what I am missing here because I think that
the described scenario is not acceptable in a professional
environment. Or maybe further development is needed.


Many thanks in advance for you comments.

Bernard

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


Re: Multiple broken Tomcat Linux daemon instances with jsvc?

Posted by Bernard <bh...@actrix.gen.nz>.
Thanks Martin,

I am aware of the effect that you are describing.

That's not the case I am describing.

One really gets multiple jsvc instances. THe proof is that for each
additional invocation of the script, another instance is created.

In the meantime bugs were created for this:

[daemon] runs as multiple instances, does not use PID file logic
http://issues.apache.org/bugzilla/show_bug.cgi?id=33580


[daemon] Making jsvc multiple instances enabled
http://issues.apache.org/bugzilla/show_bug.cgi?id=33581


Regards,

Bernard


On Fri, 18 Feb 2005 12:36:02 +0100, you wrote:

>
>
>Bernard wrote:
>> Hi all,
>> 
>> Summary: Using jsvc may result in multiple running instances of the
>> Tomcat servlet engine on the same machine with the same pid file. Is
>> this an intended behavior?
>
>Don't know much atbout jsvc, but based on what you write above I suspect 
>that ps is showing up lots of tomcat threads (which is normal, at least 
>under linux), which of course run under the same pid...
>If you actually have more different pids tomcat could be started twice, 
>but normally would fail because the port is in use...
>
>Hope this helps :)
>
>Mvgr,
>Martin
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-user-help@jakarta.apache.org


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


Re: Multiple broken Tomcat Linux daemon instances with jsvc?

Posted by Martin van den Bemt <ml...@mvdb.net>.

Bernard wrote:
> Hi all,
> 
> Summary: Using jsvc may result in multiple running instances of the
> Tomcat servlet engine on the same machine with the same pid file. Is
> this an intended behavior?

Don't know much atbout jsvc, but based on what you write above I suspect 
that ps is showing up lots of tomcat threads (which is normal, at least 
under linux), which of course run under the same pid...
If you actually have more different pids tomcat could be started twice, 
but normally would fail because the port is in use...

Hope this helps :)

Mvgr,
Martin


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