You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Patricia Swarbrick <pa...@ideaca.com> on 2004/09/12 22:53:43 UTC

Problably a simple problem - two instances of tomcat running at the same time

This is probably a simple question to answer, but as I haven't found very much material on setting up and running two separate instances of tomcat on one machine, I thought I'd put it to the list.  We are running Apache 2.0.48 mod-jk2, and  Tomcat 5.0.28 on Red Hat 9.
 
We'd like to set up two instances of tomcat 5.0 running simultaneously on one computer, so that we have separate environments to work with.  I followed some instructions on setting up tomcat 4.0 so it could run two instances simultaneously, setting the $CATALINA_BASE variable and creating two startup scripts and splitting up the directory tree.  However, when I start up one instance of tomcat and then attempted to start the second instance, it would appear to start and then shut down silently.  This indicates to me that there is something going on, like tomcat is attempting to lock on to a unix socket or port thats already in use by the first tomcat instance, or using files that the first tomcat instance is using.  I've gone throught the server.xml files and the worker2.properties files to make sure that the two tomcat instances are not using the same port to communicate with the apache server.  I don't know if I have everything configured correctly however, especially in the workers2.properties file yet.
 
I'm wondering if anyone else has succesfully set up two simultaneous instances of tomcat 5.0 and if the workers2.properties file would look almost the same as one for tomcat 4.  Any help will be apreciated, and I will post my current configuration files on request.
 
Patricia

Re: Problably a simple problem - two instances of tomcat running at the same time

Posted by Kelly Denehy <kd...@gmail.com>.
On Sun, 12 Sep 2004 14:53:43 -0600, Patricia Swarbrick
<pa...@ideaca.com> wrote:

>I've gone throught the server.xml files and the worker2.properties
files to make sure that the two tomcat instances are not using the
same port to communicate with the apache server.

I think you're on the right track regarding ports.  You need to also
make sure that the 2 server.xml files aren't specifiying duplicate
ports anywhere else - not just for communicating to Apache.  An
out-of-the-box Tomcat server.xml specifies a number of ports besides
the jk2 connector.  Especially make sure all the http connectors are
different (or commented out or deleted, since you shouldn't need
them).

It's very common to run multiple Tomcat instances on 1 server.  An
easy way to tell whether a port conflict is causing your problem is to
shut down the one that's working and then start up the failing one by
itself.  If it now works, you can be pretty sure it's a port conflict.
There should be an error message somewhere - if not in a log file then
in stdout or stderr.

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