>From the RUNNING.txt you will need tomcat-juli.jar in $CATALINA_BASE/bin.
That being said, I start up and shut down 4 Tomcat instances when I'm working on
cluster issues. Here's a typical directory structure I use for each Tomcat
that's a part of the cluster:
deimos-host/
├── bin
│ ├── setenv.sh
│ ├── shutdown.sh
│ ├── startup.sh
│ └── tomcat-juli.jar
├── conf
│ ├── Catalina
│ │ └── localhost
│ │ ├── host-manager.xml
│ │ ├── manager.xml
│ ├── catalina.policy
│ ├── catalina.properties
│ ├── context.xml
│ ├── logging.properties
│ ├── server.xml
│ ├── tomcat-users.xml
│ └── web.xml
├── lib
├── logs
├── temp
├── temp-dir
├── watch-dir
├── webapps
│ ├── docs
│ ├── manager
│ ├── ROOT
└── work
I've left out the actual web applications and permissions.
Here's my startup.sh script for the above host.
#!/bin/bash
export CATALINA_BASE=/someplace/deimos-host
export CATALINA_HOME=/reference-place/apache-tomcat-6.0.29
$CATALINA_HOME/bin/startup.sh
The shutdown.sh script is similar.
I have a bunch of environment variables in setenv.sh. They reference where log4j
logs should go and enables JMX. Those aren't really important.
Finally, I start the entire cluster with the following script.
#!/bin/bash
( phobos-host/bin/startup.sh )
sleep 5
( deimos-host/bin/startup.sh )
sleep 5
( mars-host/bin/startup.sh )
sleep 5
( xerxes-host/bin/startup.sh )
The cluster shutdown script is similar.
There are a few things to note in the above script. The parentheses are
necessary around each startup script. If you take a look at the stock startup.sh
script in $CATALINA_HOME/bin, you'll find that the last line is:
exec "$PRGDIR"/"$EXECUTABLE" start "$@"
exec replaces the current shell. So if you write a script that tries to start
multiple Tomcats, the first time you run the stock startup.sh script, your shell
gets replaced.
I have sleep statements in my script since this is for a cluster and I don't
define a port in the Receiver element of the cluster. This allows Tomcat to find
open ports for cluster communication.
. . . . just my two cents
/mde/
----- Original Message ----
From: Ari King <ari.brandeis.king@gmail.com>
To: Tomcat Users List <users@tomcat.apache.org>
Sent: Thu, November 4, 2010 11:21:58 AM
Subject: Re: Secondary instance of Tomcat on single server does not process
requests
On Thu, Nov 4, 2010 at 1:09 PM, Konstantin Kolinko
<knst.kolinko@gmail.com>wrote:
> 2010/11/4 Ari King <ari.brandeis.king@gmail.com>:
> > |-- conf
> > |-- server.xml
> > |-- web.xml
>
> Those two files are not sufficient.
>
> Note, that the conf folder is read only from the second instance.
> (The files in CATALINA_HOME\conf are never read).
>
>
Which other files are needed? I tried copying all the files from the conf
directory of the base configuration, but that didn't resolve the issue
either.
Also, I have changed the shutdown port from 8005 to 8006. Any other
ideas/suggestions? Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
|