RE: Multiple tomcat instances
yes, just modify the server.xml on the 2nd instance so it runs on different ports. Ta Matt -Original Message- From: Kelly, Steve [mailto:[EMAIL PROTECTED] Sent: 15 April 2005 10:33 To: tomcat-user@jakarta.apache.org Subject: Multiple tomcat instances Hi, Is it possible to run multiple instances of tomcat on the same server, for example to support production and test environments ? Thanks in advance, Steve. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple tomcat instances
From: Kelly, Steve [mailto:[EMAIL PROTECTED] Is it possible to run multiple instances of tomcat on the same server, for example to support production and test environments ? Yes. I run up to four on this machine - two (one 4.1, one 5.0) are running as I type this. Here's a Windows script that works (give or take the HOME path) for Tomcat 4 and 5.0 - untested on 5.5, but I can't see why it should fail. The UNIX equivalent is pretty obvious. Check out CATALINA_HOME - where Tomcat is installed - versus CATALINA_BASE - where this instance stores its files. Note the JAVA_OPTS for increased stack and heap sizes, too; this line is optional. C:\cattery is where I store the data for the four instances. -- snip -- set CATALINA_HOME=C:\Program Files\Apache Group\Tomcat 4.1 set CATALINA_BASE=c:\cattery\instance1 set JAVA_OPTS=-Xms64m -Xmx256m cd %CATALINA_HOME%\bin startup -- snip -- Under CATALINA_BASE for each instance, you'll need conf, logs, temp, webapps, and work directories. The easiest way to create these is to copy them from CATALINA_HOME. You'll then need to modify conf/server.xml to make sure each instance is running on its own ports - don't forget to change the shutdown port! Good luck, yell if you have any problems getting this to work. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple tomcat instances
On 4/15/05, Peter Crowther [EMAIL PROTECTED] wrote: From: Kelly, Steve [mailto:[EMAIL PROTECTED] Is it possible to run multiple instances of tomcat on the same server, for example to support production and test environments ? Yes. I run up to four on this machine - two (one 4.1, one 5.0) are running as I type this. Here's a Windows script that works (give or take the HOME path) for Tomcat 4 and 5.0 - untested on 5.5, but I can't see why it should fail. The UNIX equivalent is pretty obvious. Check out CATALINA_HOME - where Tomcat is installed - versus CATALINA_BASE - where this instance stores its files. Note the JAVA_OPTS for increased stack and heap sizes, too; this line is optional. C:\cattery is where I store the data for the four instances. -- snip -- set CATALINA_HOME=C:\Program Files\Apache Group\Tomcat 4.1 set CATALINA_BASE=c:\cattery\instance1 set JAVA_OPTS=-Xms64m -Xmx256m cd %CATALINA_HOME%\bin startup -- snip -- Under CATALINA_BASE for each instance, you'll need conf, logs, temp, webapps, and work directories. The easiest way to create these is to copy them from CATALINA_HOME. You'll then need to modify conf/server.xml to make sure each instance is running on its own ports - don't forget to change the shutdown port! Good luck, yell if you have any problems getting this to work. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] If you have more than one IP address you can run more than one instances on same machine on same port but different IP addresses. You have to specify the IP address in the address attribute of Connector/ element. -- Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple tomcat instances
Another option which uses fewer resources but doesn't provide quite the same degree of isolation is to run two hosts in the same Catalina service. If your DNS maps www.mydomain.com and test.mydomain.com to the same IP address, they can share the same ports. Each one can have its own logs, Servlet mappings, and set of apps. Fritz -Original Message- From: Peter Crowther [mailto:[EMAIL PROTECTED] Sent: Friday, April 15, 2005 2:55 AM To: Tomcat Users List Subject: RE: Multiple tomcat instances From: Kelly, Steve [mailto:[EMAIL PROTECTED] Is it possible to run multiple instances of tomcat on the same server, for example to support production and test environments ? Yes. I run up to four on this machine - two (one 4.1, one 5.0) are running as I type this. Here's a Windows script that works (give or take the HOME path) for Tomcat 4 and 5.0 - untested on 5.5, but I can't see why it should fail. The UNIX equivalent is pretty obvious. Check out CATALINA_HOME - where Tomcat is installed - versus CATALINA_BASE - where this instance stores its files. Note the JAVA_OPTS for increased stack and heap sizes, too; this line is optional. C:\cattery is where I store the data for the four instances. -- snip -- set CATALINA_HOME=C:\Program Files\Apache Group\Tomcat 4.1 set CATALINA_BASE=c:\cattery\instance1 set JAVA_OPTS=-Xms64m -Xmx256m cd %CATALINA_HOME%\bin startup -- snip -- Under CATALINA_BASE for each instance, you'll need conf, logs, temp, webapps, and work directories. The easiest way to create these is to copy them from CATALINA_HOME. You'll then need to modify conf/server.xml to make sure each instance is running on its own ports - don't forget to change the shutdown port! Good luck, yell if you have any problems getting this to work. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple tomcat instances
Can you expand a bit more how this would work. I understand how you can have two domains pointing to the same ip address but how do I split my logs, servlet mapping and web apps. Steve. -Original Message- From: Fritz Schneider [mailto:[EMAIL PROTECTED] Sent: 15 April 2005 12:10 To: 'Tomcat Users List' Subject: RE: Multiple tomcat instances Another option which uses fewer resources but doesn't provide quite the same degree of isolation is to run two hosts in the same Catalina service. If your DNS maps www.mydomain.com and test.mydomain.com to the same IP address, they can share the same ports. Each one can have its own logs, Servlet mappings, and set of apps. Fritz -Original Message- From: Peter Crowther [mailto:[EMAIL PROTECTED] Sent: Friday, April 15, 2005 2:55 AM To: Tomcat Users List Subject: RE: Multiple tomcat instances From: Kelly, Steve [mailto:[EMAIL PROTECTED] Is it possible to run multiple instances of tomcat on the same server, for example to support production and test environments ? Yes. I run up to four on this machine - two (one 4.1, one 5.0) are running as I type this. Here's a Windows script that works (give or take the HOME path) for Tomcat 4 and 5.0 - untested on 5.5, but I can't see why it should fail. The UNIX equivalent is pretty obvious. Check out CATALINA_HOME - where Tomcat is installed - versus CATALINA_BASE - where this instance stores its files. Note the JAVA_OPTS for increased stack and heap sizes, too; this line is optional. C:\cattery is where I store the data for the four instances. -- snip -- set CATALINA_HOME=C:\Program Files\Apache Group\Tomcat 4.1 set CATALINA_BASE=c:\cattery\instance1 set JAVA_OPTS=-Xms64m -Xmx256m cd %CATALINA_HOME%\bin startup -- snip -- Under CATALINA_BASE for each instance, you'll need conf, logs, temp, webapps, and work directories. The easiest way to create these is to copy them from CATALINA_HOME. You'll then need to modify conf/server.xml to make sure each instance is running on its own ports - don't forget to change the shutdown port! Good luck, yell if you have any problems getting this to work. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple tomcat instances
Steve, In the Host definition you specify an appBase for the applications directory (which will have a new ROOT under it), a Valve for the AccessLog, and whatever else you want to split off. The applications in the appBase directory will have their own WEB-INFO where you specify Servlet mappings, etc. The only restriction that I can think of is that the servlets in WEB-INF/web.xml must have different Servlet-names from those in conf/web.xml Fritz -Original Message- From: Kelly, Steve [mailto:[EMAIL PROTECTED] Sent: Friday, April 15, 2005 7:41 AM To: Tomcat Users List Subject: RE: Multiple tomcat instances Can you expand a bit more how this would work. I understand how you can have two domains pointing to the same ip address but how do I split my logs, servlet mapping and web apps. Steve. -Original Message- From: Fritz Schneider [mailto:[EMAIL PROTECTED] Sent: 15 April 2005 12:10 To: 'Tomcat Users List' Subject: RE: Multiple tomcat instances Another option which uses fewer resources but doesn't provide quite the same degree of isolation is to run two hosts in the same Catalina service. If your DNS maps www.mydomain.com and test.mydomain.com to the same IP address, they can share the same ports. Each one can have its own logs, Servlet mappings, and set of apps. Fritz -Original Message- From: Peter Crowther [mailto:[EMAIL PROTECTED] Sent: Friday, April 15, 2005 2:55 AM To: Tomcat Users List Subject: RE: Multiple tomcat instances From: Kelly, Steve [mailto:[EMAIL PROTECTED] Is it possible to run multiple instances of tomcat on the same server, for example to support production and test environments ? Yes. I run up to four on this machine - two (one 4.1, one 5.0) are running as I type this. Here's a Windows script that works (give or take the HOME path) for Tomcat 4 and 5.0 - untested on 5.5, but I can't see why it should fail. The UNIX equivalent is pretty obvious. Check out CATALINA_HOME - where Tomcat is installed - versus CATALINA_BASE - where this instance stores its files. Note the JAVA_OPTS for increased stack and heap sizes, too; this line is optional. C:\cattery is where I store the data for the four instances. -- snip -- set CATALINA_HOME=C:\Program Files\Apache Group\Tomcat 4.1 set CATALINA_BASE=c:\cattery\instance1 set JAVA_OPTS=-Xms64m -Xmx256m cd %CATALINA_HOME%\bin startup -- snip -- Under CATALINA_BASE for each instance, you'll need conf, logs, temp, webapps, and work directories. The easiest way to create these is to copy them from CATALINA_HOME. You'll then need to modify conf/server.xml to make sure each instance is running on its own ports - don't forget to change the shutdown port! Good luck, yell if you have any problems getting this to work. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple Tomcat Instances with Linux
start the server,after that change the port# in conf file and start the server again,i think this may helpful for u Dan Barron [EMAIL PROTECTED] wrote:Jon, I have used the CATALINA_HOME/common/lib to share jar files among different instances. Not sure if that answers your question though. Dan At 10:54 AM 6/21/2004, you wrote: Dan, Thanks for the post, good ideas I'm going to try them. One thing I'm still not clear on. My application is configured to deploy shared modules (jar files) under CATALINA_HOME/shared/lib. If I create multiple instances, how do I configure the apps to share the correct version of CATALINA_HOME/shared/lib? Do you create a separate document root that contains a shared/lib for each entry in the server.xml configuration? Jon --- Dan Barron wrote: Jon, I run multiple tomcat services on a Linux box with Apache for various development and distributions. The way I went about it is to setup multiple configurations within the server.xml file. Each service has it own port for connectivity and its own worker for mod_jk. I create a virtual host entry in mod_jk.conf file which mounts the assigned worker which in turn points to the specific tomcat service. Here's the three files I touch to make it work and an example entry. My environment is Tomcat 4.1.29, mod_jk, and Apache 1.3.27. Hope this helps. Dan *FILE:mod_jk.conf #~~~ # domain.com Virtual Host Definition #~~~ ServerName www.domain.com DocumentRoot /usr/www/domain.com ErrorLog logs/domain.com/error_log CustomLog logs/domain.com/access_log common ScriptAlias /cgi-bin/ /usr/www/domain.com/cgi-bin/ AllowOverride None Options None Order allow,deny Allow from all JkMount /servlet/* domain_worker JkMount /alpha/*.jsp domain_worker JkMount /*.jsp domain_worker **FILE: workers.properties worker.list=ajp13, domain_worker worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=20 worker.ajp13.cachesize=20 worker.domain_worker.port=8010 worker.domain_worker.host=localhost worker.domain_worker.type=ajp13 worker.domain_worker.lbfactor=20 worker.domain_worker.cachesize=20 *FILE:server.xml ... port 8081 -- className=org.apache.catalina.connector.http.HttpConnector port=8081 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=6/ -- className=org.apache.ajp.tomcat4.Ajp13Connector port=8010 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/ container hierarchy -- defaultHost=www.domain.com debug=0 levels -- className=org.apache.catalina.logger.FileLogger prefix=catalina_domain_log. suffix=.txt timestamp=true/ will be shared globally -- className=org.apache.catalina.realm.MemoryRealm / appBase=webapps/domain.com unpackWARs=true autoDeploy=true className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=domain_access_log. suffix=.txt pattern=common/ className=org.apache.catalina.logger.FileLogger directory=logs prefix=domain_log. suffix=.txt timestamp=true/ At 05:26 PM 6/18/2004, Jon Feauto wrote: I see this question posted quite often, but rarely answers abound. Is it because this is too complex a topic to explain in a user group? I would think it is fairly common, anyone have ideas? Jon --- Jon Feauto wrote: Hello, I'm certain I am behind the curve on this one, but I've been looking around for several days now and haven't found the answers I need. I'm looking to setup multiple environments for Tomcat 4x on a single linux server. One for each developer and several others for different versions of test. From the mail list archives I've come to understand that CATALINA_BASE can be used to configure multiple instances. However, most examples I've seen use this in coordination with multiple server.xml files. I'm hoping there is a trick to this that I'm missing. I don't mind the extra configuration as long as that is the recommended approach. For an installation supporting a linux service, does the /etc/init.d/tomcat4 script need to be modified to set the CATALINA_BASE for each instance started? Do I need to use different port numbers to access those instances? Is the CATALINA_HOME/shared/lib actually shared across instances or can it be unique to an instance according to CATALINA_BASE? === message truncated === __ Do you Yahoo!? Yahoo! Mail - 50x more storage than
Re: Multiple Tomcat Instances with Linux
Dan, Thanks for the post, good ideas I'm going to try them. One thing I'm still not clear on. My application is configured to deploy shared modules (jar files) under CATALINA_HOME/shared/lib. If I create multiple instances, how do I configure the apps to share the correct version of CATALINA_HOME/shared/lib? Do you create a separate document root that contains a shared/lib for each Service entry in the server.xml configuration? Jon --- Dan Barron [EMAIL PROTECTED] wrote: Jon, I run multiple tomcat services on a Linux box with Apache for various development and distributions. The way I went about it is to setup multiple Service configurations within the server.xml file. Each service has it own port for connectivity and its own worker for mod_jk. I create a virtual host entry in mod_jk.conf file which mounts the assigned worker which in turn points to the specific tomcat service. Here's the three files I touch to make it work and an example entry. My environment is Tomcat 4.1.29, mod_jk, and Apache 1.3.27. Hope this helps. Dan *FILE:mod_jk.conf #~~~ # domain.com Virtual Host Definition #~~~ VirtualHost 10.10.1.10 ServerName www.domain.com DocumentRoot /usr/www/domain.com ErrorLog logs/domain.com/error_log CustomLog logs/domain.com/access_log common ScriptAlias /cgi-bin/ /usr/www/domain.com/cgi-bin/ Directory /usr/www/domain.com/cgi-bin AllowOverride None Options None Order allow,deny Allow from all /Directory JkMount /servlet/* domain_worker JkMount /alpha/*.jsp domain_worker JkMount /*.jsp domain_worker /VirtualHost **FILE: workers.properties worker.list=ajp13, domain_worker worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=20 worker.ajp13.cachesize=20 worker.domain_worker.port=8010 worker.domain_worker.host=localhost worker.domain_worker.type=ajp13 worker.domain_worker.lbfactor=20 worker.domain_worker.cachesize=20 *FILE:server.xml Server... ... Service name=domain !-- Define a non-SSL HTTP/1.1 Connector on port 8081 -- Connector className=org.apache.catalina.connector.http.HttpConnector port=8081 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=6/ !-- Define an AJP 1.3 Connector on port 8010 -- Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8010 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/ !-- Define the top level container in our container hierarchy -- Engine name=domain defaultHost=www.domain.com debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_domain_log. suffix=.txt timestamp=true/ !-- Because this Realm is here, an instance will be shared globally -- Realm className=org.apache.catalina.realm.MemoryRealm / !-- Define the default virtual host -- Host name=www.domain.com debug=0 appBase=webapps/domain.com unpackWARs=true autoDeploy=true Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=domain_access_log. suffix=.txt pattern=common/ Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=domain_log. suffix=.txt timestamp=true/ !-- domain Root Context -- Context path= docBase= debug=0/ /Host /Engine /Service /Server At 05:26 PM 6/18/2004, Jon Feauto wrote: I see this question posted quite often, but rarely answers abound. Is it because this is too complex a topic to explain in a user group? I would think it is fairly common, anyone have ideas? Jon --- Jon Feauto [EMAIL PROTECTED] wrote: Hello, I'm certain I am behind the curve on this one, but I've been looking around for several days now and haven't found the answers I need. I'm looking to setup multiple environments for Tomcat 4x on a single linux server. One for each developer and several others for different versions of test. From the mail list archives I've come to understand that CATALINA_BASE can be used to configure multiple instances. However, most examples I've seen use this in coordination with multiple server.xml files. I'm hoping there is a trick to this that I'm missing. I don't mind the extra configuration as long as that is the recommended
Re: Multiple Tomcat Instances with Linux
Jon, I have used the CATALINA_HOME/common/lib to share jar files among different Service instances. Not sure if that answers your question though. Dan At 10:54 AM 6/21/2004, you wrote: Dan, Thanks for the post, good ideas I'm going to try them. One thing I'm still not clear on. My application is configured to deploy shared modules (jar files) under CATALINA_HOME/shared/lib. If I create multiple instances, how do I configure the apps to share the correct version of CATALINA_HOME/shared/lib? Do you create a separate document root that contains a shared/lib for each Service entry in the server.xml configuration? Jon --- Dan Barron [EMAIL PROTECTED] wrote: Jon, I run multiple tomcat services on a Linux box with Apache for various development and distributions. The way I went about it is to setup multiple Service configurations within the server.xml file. Each service has it own port for connectivity and its own worker for mod_jk. I create a virtual host entry in mod_jk.conf file which mounts the assigned worker which in turn points to the specific tomcat service. Here's the three files I touch to make it work and an example entry. My environment is Tomcat 4.1.29, mod_jk, and Apache 1.3.27. Hope this helps. Dan *FILE:mod_jk.conf #~~~ # domain.com Virtual Host Definition #~~~ VirtualHost 10.10.1.10 ServerName www.domain.com DocumentRoot /usr/www/domain.com ErrorLog logs/domain.com/error_log CustomLog logs/domain.com/access_log common ScriptAlias /cgi-bin/ /usr/www/domain.com/cgi-bin/ Directory /usr/www/domain.com/cgi-bin AllowOverride None Options None Order allow,deny Allow from all /Directory JkMount /servlet/* domain_worker JkMount /alpha/*.jsp domain_worker JkMount /*.jsp domain_worker /VirtualHost **FILE: workers.properties worker.list=ajp13, domain_worker worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=20 worker.ajp13.cachesize=20 worker.domain_worker.port=8010 worker.domain_worker.host=localhost worker.domain_worker.type=ajp13 worker.domain_worker.lbfactor=20 worker.domain_worker.cachesize=20 *FILE:server.xml Server... ... Service name=domain !-- Define a non-SSL HTTP/1.1 Connector on port 8081 -- Connector className=org.apache.catalina.connector.http.HttpConnector port=8081 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=6/ !-- Define an AJP 1.3 Connector on port 8010 -- Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8010 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/ !-- Define the top level container in our container hierarchy -- Engine name=domain defaultHost=www.domain.com debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_domain_log. suffix=.txt timestamp=true/ !-- Because this Realm is here, an instance will be shared globally -- Realm className=org.apache.catalina.realm.MemoryRealm / !-- Define the default virtual host -- Host name=www.domain.com debug=0 appBase=webapps/domain.com unpackWARs=true autoDeploy=true Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=domain_access_log. suffix=.txt pattern=common/ Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=domain_log. suffix=.txt timestamp=true/ !-- domain Root Context -- Context path= docBase= debug=0/ /Host /Engine /Service /Server At 05:26 PM 6/18/2004, Jon Feauto wrote: I see this question posted quite often, but rarely answers abound. Is it because this is too complex a topic to explain in a user group? I would think it is fairly common, anyone have ideas? Jon --- Jon Feauto [EMAIL PROTECTED] wrote: Hello, I'm certain I am behind the curve on this one, but I've been looking around for several days now and haven't found the answers I need. I'm looking to setup multiple environments for Tomcat 4x on a single linux server. One for each developer and several others for different versions of test. From the mail list archives I've come to understand that CATALINA_BASE can be used to configure multiple instances. However, most examples I've seen use this in coordination with multiple server.xml files. I'm
Re: Multiple Tomcat Instances with Linux
Dan, That is essentially the situation I am trying to avoid. There are several applications within an instance of Tomcat that share resources from shared/lib, but those shared/lib resources should not be shared between instances. My goal is to have the separate instances represent independent environments. Jon --- Dan Barron [EMAIL PROTECTED] wrote: Jon, I have used the CATALINA_HOME/common/lib to share jar files among different Service instances. Not sure if that answers your question though. Dan At 10:54 AM 6/21/2004, you wrote: Dan, Thanks for the post, good ideas I'm going to try them. One thing I'm still not clear on. My application is configured to deploy shared modules (jar files) under CATALINA_HOME/shared/lib. If I create multiple instances, how do I configure the apps to share the correct version of CATALINA_HOME/shared/lib? Do you create a separate document root that contains a shared/lib for each Service entry in the server.xml configuration? Jon --- Dan Barron [EMAIL PROTECTED] wrote: Jon, I run multiple tomcat services on a Linux box with Apache for various development and distributions. The way I went about it is to setup multiple Service configurations within the server.xml file. Each service has it own port for connectivity and its own worker for mod_jk. I create a virtual host entry in mod_jk.conf file which mounts the assigned worker which in turn points to the specific tomcat service. Here's the three files I touch to make it work and an example entry. My environment is Tomcat 4.1.29, mod_jk, and Apache 1.3.27. Hope this helps. Dan *FILE:mod_jk.conf #~~~ # domain.com Virtual Host Definition #~~~ VirtualHost 10.10.1.10 ServerName www.domain.com DocumentRoot /usr/www/domain.com ErrorLog logs/domain.com/error_log CustomLog logs/domain.com/access_log common ScriptAlias /cgi-bin/ /usr/www/domain.com/cgi-bin/ Directory /usr/www/domain.com/cgi-bin AllowOverride None Options None Order allow,deny Allow from all /Directory JkMount /servlet/* domain_worker JkMount /alpha/*.jsp domain_worker JkMount /*.jsp domain_worker /VirtualHost **FILE: workers.properties worker.list=ajp13, domain_worker worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=20 worker.ajp13.cachesize=20 worker.domain_worker.port=8010 worker.domain_worker.host=localhost worker.domain_worker.type=ajp13 worker.domain_worker.lbfactor=20 worker.domain_worker.cachesize=20 *FILE:server.xml Server... ... Service name=domain !-- Define a non-SSL HTTP/1.1 Connector on port 8081 -- Connector className=org.apache.catalina.connector.http.HttpConnector port=8081 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=6/ !-- Define an AJP 1.3 Connector on port 8010 -- Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8010 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/ !-- Define the top level container in our container hierarchy -- Engine name=domain defaultHost=www.domain.com debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_domain_log. suffix=.txt timestamp=true/ !-- Because this Realm is here, an instance will be shared globally -- Realm className=org.apache.catalina.realm.MemoryRealm / !-- Define the default virtual host -- Host name=www.domain.com debug=0 appBase=webapps/domain.com unpackWARs=true autoDeploy=true Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=domain_access_log. suffix=.txt pattern=common/ Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=domain_log. suffix=.txt timestamp=true/ !-- domain Root Context -- Context path= docBase= debug=0/ /Host /Engine /Service /Server At 05:26 PM 6/18/2004, Jon Feauto wrote: I see this question posted quite often, but rarely answers abound. Is it because this is too complex a
Re: Multiple Tomcat Instances with Linux
I see this question posted quite often, but rarely answers abound. Is it because this is too complex a topic to explain in a user group? I would think it is fairly common, anyone have ideas? Jon --- Jon Feauto [EMAIL PROTECTED] wrote: Hello, I'm certain I am behind the curve on this one, but I've been looking around for several days now and haven't found the answers I need. I'm looking to setup multiple environments for Tomcat 4x on a single linux server. One for each developer and several others for different versions of test. From the mail list archives I've come to understand that CATALINA_BASE can be used to configure multiple instances. However, most examples I've seen use this in coordination with multiple server.xml files. I'm hoping there is a trick to this that I'm missing. I don't mind the extra configuration as long as that is the recommended approach. For an installation supporting a linux service, does the /etc/init.d/tomcat4 script need to be modified to set the CATALINA_BASE for each instance started? Do I need to use different port numbers to access those instances? Is the CATALINA_HOME/shared/lib actually shared across instances or can it be unique to an instance according to CATALINA_BASE? Is virtual hosting required to support this type of environment? Any help is appreciated. Thanks, Jon __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple Tomcat Instances with Linux
Jon, I run multiple tomcat services on a Linux box with Apache for various development and distributions. The way I went about it is to setup multiple Service configurations within the server.xml file. Each service has it own port for connectivity and its own worker for mod_jk. I create a virtual host entry in mod_jk.conf file which mounts the assigned worker which in turn points to the specific tomcat service. Here's the three files I touch to make it work and an example entry. My environment is Tomcat 4.1.29, mod_jk, and Apache 1.3.27. Hope this helps. Dan *FILE:mod_jk.conf #~~~ # domain.com Virtual Host Definition #~~~ VirtualHost 10.10.1.10 ServerName www.domain.com DocumentRoot /usr/www/domain.com ErrorLog logs/domain.com/error_log CustomLog logs/domain.com/access_log common ScriptAlias /cgi-bin/ /usr/www/domain.com/cgi-bin/ Directory /usr/www/domain.com/cgi-bin AllowOverride None Options None Order allow,deny Allow from all /Directory JkMount /servlet/* domain_worker JkMount /alpha/*.jsp domain_worker JkMount /*.jsp domain_worker /VirtualHost **FILE: workers.properties worker.list=ajp13, domain_worker worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=20 worker.ajp13.cachesize=20 worker.domain_worker.port=8010 worker.domain_worker.host=localhost worker.domain_worker.type=ajp13 worker.domain_worker.lbfactor=20 worker.domain_worker.cachesize=20 *FILE:server.xml Server... ... Service name=domain !-- Define a non-SSL HTTP/1.1 Connector on port 8081 -- Connector className=org.apache.catalina.connector.http.HttpConnector port=8081 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=6/ !-- Define an AJP 1.3 Connector on port 8010 -- Connector className=org.apache.ajp.tomcat4.Ajp13Connector port=8010 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0/ !-- Define the top level container in our container hierarchy -- Engine name=domain defaultHost=www.domain.com debug=0 !-- Global logger unless overridden at lower levels -- Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_domain_log. suffix=.txt timestamp=true/ !-- Because this Realm is here, an instance will be shared globally -- Realm className=org.apache.catalina.realm.MemoryRealm / !-- Define the default virtual host -- Host name=www.domain.com debug=0 appBase=webapps/domain.com unpackWARs=true autoDeploy=true Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=domain_access_log. suffix=.txt pattern=common/ Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=domain_log. suffix=.txt timestamp=true/ !-- domain Root Context -- Context path= docBase= debug=0/ /Host /Engine /Service /Server At 05:26 PM 6/18/2004, Jon Feauto wrote: I see this question posted quite often, but rarely answers abound. Is it because this is too complex a topic to explain in a user group? I would think it is fairly common, anyone have ideas? Jon --- Jon Feauto [EMAIL PROTECTED] wrote: Hello, I'm certain I am behind the curve on this one, but I've been looking around for several days now and haven't found the answers I need. I'm looking to setup multiple environments for Tomcat 4x on a single linux server. One for each developer and several others for different versions of test. From the mail list archives I've come to understand that CATALINA_BASE can be used to configure multiple instances. However, most examples I've seen use this in coordination with multiple server.xml files. I'm hoping there is a trick to this that I'm missing. I don't mind the extra configuration as long as that is the recommended approach. For an installation supporting a linux service, does the /etc/init.d/tomcat4 script need to be modified to set the CATALINA_BASE for each instance started? Do I need to use different port numbers to access those instances? Is the CATALINA_HOME/shared/lib actually shared across instances or can it be unique to an instance according to CATALINA_BASE? Is virtual hosting required to support this type of environment? Any help is appreciated. Thanks, Jon __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
Re: multiple tomcat instances cause user logout
Carlton Lo wrote: I have installed 2 instances of tomcat on my machine. I've user 1 login to tomcat 1, when user 2 login to tomcat 2, it automatically logout user 1 in tomcat 1??? tomcat 4.0.6 on win 2000 Using the same working directory for both? --Avoid it. Other than that, no idea. Antonio Fiol - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: multiple tomcat instances cause user logout
They are installed int different directories ... -Original Message- From: Antonio Fiol Bonnín [mailto:[EMAIL PROTECTED] Sent: Friday, March 26, 2004 3:48 PM To: Tomcat Users List Subject: Re: multiple tomcat instances cause user logout Carlton Lo wrote: I have installed 2 instances of tomcat on my machine. I've user 1 login to tomcat 1, when user 2 login to tomcat 2, it automatically logout user 1 in tomcat 1??? tomcat 4.0.6 on win 2000 Using the same working directory for both? --Avoid it. Other than that, no idea. Antonio Fiol - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple Tomcat instances for virtual hosts
This doesn't really answer your question, but we've found Tomcat to be quite robust. You may also want to find out (if you don't already know) what's bringing the server down. -d --- Thomas Eichberger [EMAIL PROTECTED] wrote: Hi, I have Apache 1.3 and Tomcat 4.1.8 on a Red Hat 9 machine. Apache serves several virutal hosts. We have one Tomcat instance running with several web contexts, one context for each virtual host. Now I would like to change this to have one Tomcat instance for each virtual host (this is necessary because Tomcat sometimes crashes, and I don't want all virtual hosts to be down then). I read a book about Tomcat and searched the Web, but could not find out how to do this. What I assume is: In Apache's httpd.conf I have something (after the import of mod_jk): NameVirtualHost 200.200.200.200 (or whatever) VirtualHost 200.200.200.200 ServerName www.xxx.com DocumentRoot /tomcat1/webapps/xxx JkMount /servlet/* worker1 JkMount /*.jsp worker1 JkMount /*.do worker1 /VirtualHost VirtualHost 200.200.200.200 ServerName www.yyy.com DocumentRoot /tomcat2/webapps/yyy JkMount /servlet/* worker2 JkMount /*.jsp worker2 JkMount /*.do worker2 /VirtualHost Then I will install Tomcat two times, in /tomcat1 and /tomcat2. The server.xml of each Tomcat contains different ports (for shutdown and for the connector for ajp13). The workers.properties should look like: worker.list=worker1,worker2 ... worker.worker1.port=8009 worker.worker1.host=localhost worker.worker1.type=ajp13 ... worker.worker1.port=8010 worker.worker1.host=localhost worker.worker1.type=ajp13 Is this all correct? Should that work? Thomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple Tomcat instances for virtual hosts
Your plan should work pretty well. I do something similar myself. The major difference is that I use one installation of Tomcat for all the sites. I have a script to start tomcat for each site, that points CATALINA_HOME to the shared Tomcat binaries, and CATALINA_BASE to the conf/, logs/, temp/, work/, and webapps/ directories for the site: file /home/site1/tomcat/catalina: #!/bin/sh CATALINA_BASE = /home/site1/tomcat CATALINA_HOME = /usr/share/tomcat4 (or whatever) CATALINA_OPTS = -server (maybe others) export CATALINA_BASE CATALINA_HOME CATALINA_OPTS $CATALINA_BASE/bin/catalina.sh $* I can do ./catalina start, ./catalina stop,etc to control each site. It works pretty well, especially if you're developing one site while others are in production. Two things to watch for: 1) You are correct that you have to use different ports for each server.xml file. I declared that site one could have ports between 8100-8199, site 2 between 8200-8299, etc. Each project can use whatever they want in their range. 2) Since these Tomcat instances listen on ports above 1024, they don't need to be started by the root user. If they did, I'd be very wary of putting the server.xml file (and other config files and scripts) where the user could modify them. Also, your system boot procedures need to take some steps to start them using the correct username. 3) I use Apache as a front end for all these Tomcat instances, using a proxy instead of JK or JK2. In each virtual host, there's something like this: ProxyPass /examples/ http://localhost:8181/examples/ ProxyPassReverse /examples/ http://localhost:8181/examples/ There are two nice things about this: Apache logs everything, making it easier to do usage reports. And, all the connections to Tomcat come from Apache and localhost, so I can block outside connections to all ports except the ones Apache listens to. However, it's still possible for user A to change his server.xml file to listen to a port that's being sent traffic for user B. For my purposes, that's not an issue; for others, it may be. Good luck! ...Bob Langford... At 02:12 PM 9/6/2003, you wrote: Hi, I have Apache 1.3 and Tomcat 4.1.8 on a Red Hat 9 machine. Apache serves several virutal hosts. We have one Tomcat instance running with several web contexts, one context for each virtual host. Now I would like to change this to have one Tomcat instance for each virtual host (this is necessary because Tomcat sometimes crashes, and I don't want all virtual hosts to be down then). I read a book about Tomcat and searched the Web, but could not find out how to do this. What I assume is: In Apache's httpd.conf I have something (after the import of mod_jk): NameVirtualHost 200.200.200.200 (or whatever) VirtualHost 200.200.200.200 ServerName www.xxx.com DocumentRoot /tomcat1/webapps/xxx JkMount /servlet/* worker1 JkMount /*.jsp worker1 JkMount /*.do worker1 /VirtualHost VirtualHost 200.200.200.200 ServerName www.yyy.com DocumentRoot /tomcat2/webapps/yyy JkMount /servlet/* worker2 JkMount /*.jsp worker2 JkMount /*.do worker2 /VirtualHost Then I will install Tomcat two times, in /tomcat1 and /tomcat2. The server.xml of each Tomcat contains different ports (for shutdown and for the connector for ajp13). The workers.properties should look like: worker.list=worker1,worker2 ... worker.worker1.port=8009 worker.worker1.host=localhost worker.worker1.type=ajp13 ... worker.worker1.port=8010 worker.worker1.host=localhost worker.worker1.type=ajp13 Is this all correct? Should that work? Thomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Bob Langford Silicon Masters Consulting, Inc.8207 Stone River Court, Richmond, VA 23235 phone: 804-674-1253 fax: 804-745-6650 http://www.silicon-masters.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple Tomcat instances for virtual hosts
I really like the idea of setting up multiple instances of Tomcat per virtual site - i have 2 questions: 1) How does it affect memory usage, i.e. if we are on a server with X ammount of ram and there are 20 sites, does each site end up needing a minimum of ~21 MB RAM for tomcat so we have a basic need of 420MB ram being used just to keep tomcat up / site? 2) If one site gets busier then will it slow down the other sites more so than using mod_jk / mod_webapp? sai On Sat, 06 Sep 2003 21:05:38 -0400, Bob Langford wrote Your plan should work pretty well. I do something similar myself. The major difference is that I use one installation of Tomcat for all the sites. I have a script to start tomcat for each site, that points CATALINA_HOME to the shared Tomcat binaries, and CATALINA_BASE to the conf/, logs/, temp/, work/, and webapps/ directories for the site: file /home/site1/tomcat/catalina: #!/bin/sh CATALINA_BASE = /home/site1/tomcat CATALINA_HOME = /usr/share/tomcat4 (or whatever) CATALINA_OPTS = -server (maybe others) export CATALINA_BASE CATALINA_HOME CATALINA_OPTS $CATALINA_BASE/bin/catalina.sh $* I can do ./catalina start, ./catalina stop,etc to control each site. It works pretty well, especially if you're developing one site while others are in production. Two things to watch for: 1) You are correct that you have to use different ports for each server.xml file. I declared that site one could have ports between 8100-8199, site 2 between 8200-8299, etc. Each project can use whatever they want in their range. 2) Since these Tomcat instances listen on ports above 1024, they don't need to be started by the root user. If they did, I'd be very wary of putting the server.xml file (and other config files and scripts) where the user could modify them. Also, your system boot procedures need to take some steps to start them using the correct username. 3) I use Apache as a front end for all these Tomcat instances, using a proxy instead of JK or JK2. In each virtual host, there's something like this: ProxyPass /examples/ http://localhost:8181/examples/ ProxyPassReverse /examples/ http://localhost:8181/examples/ There are two nice things about this: Apache logs everything, making it easier to do usage reports. And, all the connections to Tomcat come from Apache and localhost, so I can block outside connections to all ports except the ones Apache listens to. However, it's still possible for user A to change his server.xml file to listen to a port that's being sent traffic for user B. For my purposes, that's not an issue; for others, it may be. Good luck! ...Bob Langford... At 02:12 PM 9/6/2003, you wrote: Hi, I have Apache 1.3 and Tomcat 4.1.8 on a Red Hat 9 machine. Apache serves several virutal hosts. We have one Tomcat instance running with several web contexts, one context for each virtual host. Now I would like to change this to have one Tomcat instance for each virtual host (this is necessary because Tomcat sometimes crashes, and I don't want all virtual hosts to be down then). I read a book about Tomcat and searched the Web, but could not find out how to do this. What I assume is: In Apache's httpd.conf I have something (after the import of mod_jk): NameVirtualHost 200.200.200.200 (or whatever) VirtualHost 200.200.200.200 ServerName www.xxx.com DocumentRoot /tomcat1/webapps/xxx JkMount /servlet/* worker1 JkMount /*.jsp worker1 JkMount /*.do worker1 /VirtualHost VirtualHost 200.200.200.200 ServerName www.yyy.com DocumentRoot /tomcat2/webapps/yyy JkMount /servlet/* worker2 JkMount /*.jsp worker2 JkMount /*.do worker2 /VirtualHost Then I will install Tomcat two times, in /tomcat1 and /tomcat2. The server.xml of each Tomcat contains different ports (for shutdown and for the connector for ajp13). The workers.properties should look like: worker.list=worker1,worker2 ... worker.worker1.port=8009 worker.worker1.host=localhost worker.worker1.type=ajp13 ... worker.worker1.port=8010 worker.worker1.host=localhost worker.worker1.type=ajp13 Is this all correct? Should that work? Thomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Bob Langford Silicon Masters Consulting, Inc.8207 Stone River Court, Richmond, VA 23235 phone: 804-674-1253 fax: 804-745-6650 http://www.silicon-masters.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Open WebMail Project (http://openwebmail.org) - To unsubscribe, e-mail: [EMAIL PROTECTED] For
RE: Multiple Tomcat instances
- Each port that is in use must be unique across the instances of tomcat. So you have to change all ports that are used. (So the first task, is to throw out every thing you don't need) To be more precise each combination of port and IP must be unique. It's possible to setup differenzt IP's on one maschine and use the same port on each of them) - What's the problem ? In my installation startup.sh etc. are readable and executable by anybody. If you don't like that, you can make local copies that are owned by the owner of the site. -Original Message- From: Christian Hauser [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 3:57 PM To: Tomcat Users List Subject: Multiple Tomcat instances I'm new to Tomcat administration and would like to switch from ServletExec to Tomcat 4.1. However, I have some difficulty understanding how to set up different Tomcat instances. I'd like to have different Tomcat instances for each developer (to test web applications) and for each application. Tomcat is installed into /usr/local/tomcat-4.1.24 (CATALINA_HOME). Every developer and web application should now have its own instance somewhere (CATALINA_BASE). For example: /home/chauser/tomcat in my case (CATALINA_BASE). This directory contains some folders: logs, conf, work, webapps, bin. Which port to change? In the conf directory I'd like to put a tailored versions of web.xml and server.xml, but I don't know which Port I have to change. How to deal with user/root problems? When I have a start, stop or restart script in CATALINA_BASE/bin, I cannot startup or shutdown tomcat, because the startup.sh and shutdown.sh (in CATALINA_HOME/bin) belong to root. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple Tomcat instances
Angus Mezick wrote: Can the developers have a tomcat instance running inside of eclipse on their desktops? This will allow them do use the debugger. --Angus I haven't yet thought about that. I guess it should be possible, in fact it would be great if that works. Do you know how simple that would be to set up? Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple Tomcat instances
Can the developers have a tomcat instance running inside of eclipse on their desktops? This will allow them do use the debugger. --Angus -Original Message- From: Christian Hauser [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 05, 2003 9:57 AM To: Tomcat Users List Subject: Multiple Tomcat instances Hello Tomcat cracks I'm new to Tomcat administration and would like to switch from ServletExec to Tomcat 4.1. However, I have some difficulty understanding how to set up different Tomcat instances. I'd like to have different Tomcat instances for each developer (to test web applications) and for each application. Tomcat is installed into /usr/local/tomcat-4.1.24 (CATALINA_HOME). Every developer and web application should now have its own instance somewhere (CATALINA_BASE). For example: /home/chauser/tomcat in my case (CATALINA_BASE). This directory contains some folders: logs, conf, work, webapps, bin. Which port to change? In the conf directory I'd like to put a tailored versions of web.xml and server.xml, but I don't know which Port I have to change. How to deal with user/root problems? When I have a start, stop or restart script in CATALINA_BASE/bin, I cannot startup or shutdown tomcat, because the startup.sh and shutdown.sh (in CATALINA_HOME/bin) belong to root. Is there a good Tomcat 4.1 administration reference available online (apart from the Tomcat documentation)? In about 2-3 weeks I'll get the book Tomcat: The Definitive Guide (O'Reilly), however, I'd like to progress until then. Thank you in advance for all your help. Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multiple Tomcat Instances
Hello dwightHugget, Tuesday, April 1, 2003, 11:43:12 PM, you wrote: d Can anyone point me to how to get this type of setup. d I want to have multiple instance of tomcat running on the same machine under d different ports, say 80, 8080, . d Would I achieve this if I setup an env variable called CATALINA_BASE as d described in the RUNNING.txt file ? d I have only one server box and want to have a production, development, and d experiment capability. d Finally, how can I run 2 different release of Tomcat ? d Say, I want to run 4.1.24 and 5 on the same machine. I think you could just add connectors on other ports in your server.xml file. I didn't try to run Tomcat 5 with tomcat 4, but I had Tomcat 3.3 and Tomcat 4.0.3 running this way. I've just configured instances so that they used different TCP ports. -- Best regards, Sergesmailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multiple tomcat instances...
CREATE U'R OWN SHELL SCRIPTS TO CHECK THE STATUS OF TOMCAT IF ANY ONE THEM FAIL IT WILL AUTOMATICALY MAIL U REGARDS SONAM SINGH [EMAIL PROTECTED] --- Raj Mettai [EMAIL PROTECTED] wrote: Hi, I am running multiple tomcat instances with load balancing worker on solaris 8. How would you know, when one of the tomcat instances crashes other than doing ps -ef|grep tomcat or prstat quite often. Is there any automatic process to find that one of the tomcat process crashed. (I am running tomcat4.1.12 and apache2.0.39 on solaris 8 using jdk1.3.1). thanks -Raj __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos More http://faith.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Multiple Tomcat Instances on Linux Box : Binding exceptions galore : No ideas left
does tomcat bind to a particular port which is hardcoded in? Has anyone run multiple instances of tomcat on one machine or is it assumed that tomcat is run from client machines and not on a central server? If so,it seems to be a bit strange. Appreciate any help. Bert. Hi folks. I'm trying to setup tomcat on one of our servers so that multiple developers can have their own tomcat instance, but keep running into bind exceptions. I've been fiddling with it for quite a few days but have come to a stage where I can't figure out what more to do. ___ Here is the setup: We use redhat linux 7.2, tomcat rpm 4.0.3-1, j2sdk-1.4.0. Tomcat has been installed in /var/tomcat4 on the server. For each developer I have set CATALINA_BASE to point to their own tomcat directory ( /home/www/user/tomcat ) which contains the conf/webapps/temp/logs directories. I have modified the server.xml file in each users directory to use unassigned ports ( eg ports 9620 to 9629 for user1, 9630 to 9639 for user2 etc...). There are no other services running using any of these ports. The server is assigned a whole heap of IP addresses, so IPs 192.168.1.253-240, for instance, all point to the same physical machine. All ip addesses resolve to a name. ie 192.168.1.253=user1.domain.cxm, 192.168.1.252=user2.domain.cxm etc... DNS works fine. These names are used in each users server.xml file (for engine and hosts). No two server.xml files share the same hostname. Tomcat is started by calling '/usr/bin/tomcat4 start' This script has been modified to run the '/usr/bin/dtomcat4' script as the user making the call. Now, to start each instance, each user telnets into the server and executes the command '/usr/bin/tomcat4 start'. The directories tomcat uses are all correct (it does use the correct CATALINA_BASE). _ The problem is this: Tomcat runs for each user if no other tomcat instance is running (I ensure that by running gtop on the server and killing instances run by other users). However, if one other instance of tomcat is running (by another user), we get the error message below. I have tried commenting out all the connectors except for non-SSL HTTP/1.1. I have turned them all on and generated keystore files for SSL. I have replaced the hostnames with the IP addresses. Nothing seems to work. I am at a complete loss at what to do. If anybody has ANY idea where to go from here, I am open to suggestions. _ error message is: Catalina.start: LifecycleException: Error creating server socket (java.net.BindException): java.net.BindException: Address already in use LifecycleException: Error creating server socket (java.net.BindException): java.net.BindException: Address already in use at org.apache.catalina.connector.warp.WarpConnector.initialize(WarpCo nnector.ja va:491) at org.apache.catalina.core.StandardService.initialize(StandardServic e.java:454 ) at org.apache.catalina.core.StandardServer.initialize(StandardServer. java:553) at org.apache.catalina.startup.Catalina.start(Catalina.java:780) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm pl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc cessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) - Root Cause - java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:321) at java.net.ServerSocket.bind(ServerSocket.java:308) at java.net.ServerSocket.bind(ServerSocket.java:266) at java.net.ServerSocket.init(ServerSocket.java:182) at java.net.ServerSocket.init(ServerSocket.java:138) at org.apache.catalina.net.DefaultServerSocketFactory.createSocket(De faultServe rSocketFactory.java:118) at org.apache.catalina.connector.warp.WarpConnector.initialize(WarpCo nnector.ja va:485) at org.apache.catalina.core.StandardService.initialize(StandardServic e.java:454 ) at org.apache.catalina.core.StandardServer.initialize(StandardServer. java:553) at org.apache.catalina.startup.Catalina.start(Catalina.java:780) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm pl.java:39 ) at
RE: Multiple Tomcat Instances on Linux Box : Binding exceptions galore : - fixed. My error
Not to worry. After a relaxing weekend I found the problem this morning. I'd just forgotton to set a port right at the bottom of the server.xml files. What a dofus. My apologies for adding unnessescary traffic to the list Bert. -Original Message- From: Webdesign [mailto:[EMAIL PROTECTED]] Sent: Monday, 20 May 2002 9:36 a.m. To: Tomcat Users List Subject: RE: Multiple Tomcat Instances on Linux Box : Binding exceptions galore : No ideas left does tomcat bind to a particular port which is hardcoded in? Has anyone run multiple instances of tomcat on one machine or is it assumed that tomcat is run from client machines and not on a central server? If so,it seems to be a bit strange. Appreciate any help. Bert. Hi folks. I'm trying to setup tomcat on one of our servers so that multiple developers can have their own tomcat instance, but keep running into bind exceptions. I've been fiddling with it for quite a few days but have come to a stage where I can't figure out what more to do. ___ Here is the setup: We use redhat linux 7.2, tomcat rpm 4.0.3-1, j2sdk-1.4.0. Tomcat has been installed in /var/tomcat4 on the server. For each developer I have set CATALINA_BASE to point to their own tomcat directory ( /home/www/user/tomcat ) which contains the conf/webapps/temp/logs directories. I have modified the server.xml file in each users directory to use unassigned ports ( eg ports 9620 to 9629 for user1, 9630 to 9639 for user2 etc...). There are no other services running using any of these ports. The server is assigned a whole heap of IP addresses, so IPs 192.168.1.253-240, for instance, all point to the same physical machine. All ip addesses resolve to a name. ie 192.168.1.253=user1.domain.cxm, 192.168.1.252=user2.domain.cxm etc... DNS works fine. These names are used in each users server.xml file (for engine and hosts). No two server.xml files share the same hostname. Tomcat is started by calling '/usr/bin/tomcat4 start' This script has been modified to run the '/usr/bin/dtomcat4' script as the user making the call. Now, to start each instance, each user telnets into the server and executes the command '/usr/bin/tomcat4 start'. The directories tomcat uses are all correct (it does use the correct CATALINA_BASE). _ The problem is this: Tomcat runs for each user if no other tomcat instance is running (I ensure that by running gtop on the server and killing instances run by other users). However, if one other instance of tomcat is running (by another user), we get the error message below. I have tried commenting out all the connectors except for non-SSL HTTP/1.1. I have turned them all on and generated keystore files for SSL. I have replaced the hostnames with the IP addresses. Nothing seems to work. I am at a complete loss at what to do. If anybody has ANY idea where to go from here, I am open to suggestions. _ error message is: Catalina.start: LifecycleException: Error creating server socket (java.net.BindException): java.net.BindException: Address already in use LifecycleException: Error creating server socket (java.net.BindException): java.net.BindException: Address already in use at org.apache.catalina.connector.warp.WarpConnector.initialize(WarpCo nnector.ja va:491) at org.apache.catalina.core.StandardService.initialize(StandardServic e.java:454 ) at org.apache.catalina.core.StandardServer.initialize(StandardServer. java:553) at org.apache.catalina.startup.Catalina.start(Catalina.java:780) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm pl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc cessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) - Root Cause - java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:321) at java.net.ServerSocket.bind(ServerSocket.java:308) at java.net.ServerSocket.bind(ServerSocket.java:266) at java.net.ServerSocket.init(ServerSocket.java:182) at java.net.ServerSocket.init(ServerSocket.java:138) at org.apache.catalina.net.DefaultServerSocketFactory.createSocket(De faultServe rSocketFactory.java:118) at org.apache.catalina.connector.warp.WarpConnector.initialize(WarpCo nnector.ja va:485) at org.apache.catalina.core.StandardService.initialize(StandardServic e.java
RE: multiple Tomcat-instances and a confused servlet...
In server.xml, ContextInterceptor className=...AutoSetup will automatically add subdirectories of TOMCAT_HOME/webapps as contexts, using the subdirectory name as the context name. Context declarations in server.xml can override the settings for the auto-added contexts. If you don't want a web application automatically served, move it outside of the TOMCAT_HOME/webapps or remove the interceptor so no contexts are automatically served. Cheers, Larry -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 25, 2002 6:06 AM To: [EMAIL PROTECTED] Subject: multiple Tomcat-instances and a confused servlet... Hi, I'm using multiple instances of Tomcat 3.2.4. The problem is, that I can access servlets of one instance even if the servlets is in the webapps-directory of another instance. This is very confusing during the development of the servlet, because it still lives in the other instances although I shut down the right instance. The main instance of Tomcat lsitens on Port 8087: http://www.mydomain.com:8087/Community/Poll The servlet Poll ist configured to run this instance: server.xml: Context path=/Community docBase=webapps/Community crossContext=false debug=0 reloadable=true /Context web.xml: servlet-mapping servlet-name Poll /servlet-name url-pattern /Poll /url-pattern /servlet-mapping and it is loaded correct during the startup of this TC-instance: tomcat.log: 2002-04-25 11:25:04 - Ctx( /Community ): Mapping with unregistered servlet Poll start-script of this instance: TOMCATLOG=/usr/local/jakarta-tomcat-3.2.4/logs/tomcat_start.log TOMCATLOG2=/usr/local/jakarta-tomcat-3.2.4/logs/tomcat_err.log export JAVA_HOME=/usr/local/jdk1.3.1_02 export TOMCAT_HOME=/usr/local/jakarta-tomcat-3.2.4 cd $TOMCAT_HOME /usr/local/jakarta-tomcat-3.2.4/bin/startup.sh -f /usr/local/jakarta-tomcat-3.2.4/conf/server.xml $TOMCATLOG 2$TOMCATLOG2 so far, so good. BUT: I can access this servlet with an other TC-instance, which listens on Port 9015: http://www.mydomain.com:9015/Community/Poll in this instance, there is NO entry in server.xml which points on the servlet Poll. Even the directory webapps/Community does not exist in this instance! ...and it is loaded during the startup :(( 2002-04-25 11:24:16 - Ctx( /Community ): Mapping with unregistered servlet Poll start-script of this instance, which uses the same binaries but an other server.xml: TOMCATLOG=/usr/local/tc-324-i2125/logs/i2125tomcat_start.log TOMCATLOG2=/usr/local/tc-324-i2125/logs/i2125tomcat_err.log export JAVA_HOME=/usr/local/jdk1.3.1_02 export TOMCAT_HOME=/usr/local/jakarta-tomcat-3.2.4 /usr/local/jakarta-tomcat-3.2.4/bin/startup.sh -f /usr/local/tc-324-i2125/conf/server.xml $TOMCATLOG 2$TOMCATLOG2 Any ideas how I can stop this behaviour ? Many thanks ! Kay -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Multiple Tomcat Instances
I have 1 machine with two tomcat instance. tomcat_worker.properties worker.list=ajp12_1, ajp12_2 worker.ajp12_1.port=8007 worker.ajp12_1.host=localhost worker.ajp12_1.type=ajp12 worker.ajp12_1.lbfactor=1 worker.ajp12_2.port=8009 worker.ajp12_2.host=localhost worker.ajp12_2.type=ajp13 worker.ajp12_2.lbfactor=1 server1.xml -- Connector className=org.apache.tomcat.service.PoolTcpConnector Parameter name=handler value=org.apache.tomcat.service.connector.Ajp12ConnectionHandler/ Parameter name=port value=8007/ /Connector server2.xml -- Connector className=org.apache.tomcat.service.PoolTcpConnector Parameter name=handler value=org.apache.tomcat.service.connector.Ajp12ConnectionHandler/ Parameter name=port value=8009/ /Connector httpd.conf JkMount /*.jsp ajp12_1 JkMount /tomcat_context_name/*.jsp ajp12_1 JkMount /*.jsp ajp12_2 JkMount /tomcat_context_name/*.jsp ajp12_2 that's all. Maybe this example help you. PD: I'm working on shutdown tomcat problem, always shutdown the instance on 8007. - Original Message - From: Abhijat Thakur [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 14, 2001 4:59 PM Subject: Multiple Tomcat Instances Hi, I am using apache and Tomcat 3.2.1. I am trying to have two instances of tomcat running. I have different server.xml for each tomcat instance. server1.xml AJP on Port 8007 server2.xml AJP on port 8009 I have no problem starting tomcat using the two server.xml files. Every time i start tomcat with one of server.xml files i rename the mod_jk.conf-auto and then included the two static files in httpd.conf.I have context test in server1.xml and context myapp in server2.xml. When i do http://xxx.com/test or http://xxx.com/myapp i can see the index.html page for that context but when i try to run the servlet or the jsp for those context then it does work. How do i tell apache as to which context is to be serverd by which port or tomcat instance. I checked the archives and somebody was mentioning about adding new workers in worker.properties file to direct requests to the different tomcats/jvms.I think i am missing this or some other step but do not know how to do it? Please advise. Thanks a lot Abhijat Thakur bDNA Corporation
RE: Multiple Tomcat Instances
Hello, You need a single mod_jk.conf and a single worker.properties. You need to write it yourself: you declare your two tomcats into workers.properties, and for getting your mod_jk.conf, you merge your 2 mod_jk.conf.auto, but when you make the mapping for the dynamic part of a webapp (servlets or jsps) you have to specify on which tomcat to sent the request. For example, if you have a foo webapp in a tomcat1, and a bar webapp in a tomcat2: in workers.properties, you need something like: worker.list=ajp_tomcat1,ajp_tomcat2 worker.ajp_tomcat1.port=8007 worker.ajp_tomcat1.host=localhost worker.ajp_tomcat1.type=ajp12 worker.ajp_tomcat2.port=8009 worker.ajp_tomcat2.host=localhost worker.ajp_tomcat2.type=ajp12 and in mod_jk.conf, something like: JkMount /foo/servlet/* ajp_tomcat1 JkMount /foo/*.jsp ajp_tomcat1 JkMount /bar/servlet/* ajp_tomcat2 JkMount /bar/*.jsp ajp_tomcat2 Xavier Marjou -Original Message- From: Abhijat Thakur [SMTP:[EMAIL PROTECTED]] Sent: Friday, September 07, 2001 7:16 PM To: [EMAIL PROTECTED] Subject: RE: Multiple Tomcat Instances I am using two tomcats server1.xml AJP on Port 8007 server2.xml AJP on port 8009 I am using Http via Apache.Every time i start tomcat with one of server.xml files i rename the mod_jk.conf-auto and the included the two static files in httpd.conf. Even after doing this i can only go to the contexts served by server1.xml file and not by server2.xml. How do i tell apache as to which context is to be serverd by which port. I think i am missing this step but do not know how to do it? Thanks Abhijat Thakur -Original Message- From: Marjou Xavier [mailto:[EMAIL PROTECTED]] Sent: Friday, September 07, 2001 4:37 AM To: '[EMAIL PROTECTED]' Subject: RE: Multiple Tomcat Instances Hello, Each Tomcat can be interfaced with a HTTP client with 2 different ways (defined in server.xml) - either with regular HTTP (eg: on port 8080) - or/and indirectly via Apache (AJP protocol is used, eg port 8007) If you use HTTP via Apache, Apache will need mod_jk.conf and worker.properties to know how to dialogue with Tomcat If you use only one instance of Tomcat, then the default files (server.xml, mod_jk.conf-auto and worker.properties) work well. Now if you use 2 Tomcats, you can do: - in server1.xml - HTTP on port 8080) - AJP on port 8007) -in server2.xml - HTTP on port 8081) - AJP on port 8009) Each Tomcat will have its own socket for serving HTTP. It is not possible to share a socket (eg: 8080) between to Tomcats as you are trying to do. If you use HTTP via Apache, Apache will need to write your own mod_jk.conf and worker.properties. (It is important to realize that the default ones are working only when there is the default configuration of Tomcat (ie: only one Tomcat)). I hope this help, Xavier Marjou
RE: Multiple Tomcat Instances
Hello, Each Tomcat can be interfaced with a HTTP client with 2 different ways (defined in server.xml) - either with regular HTTP (eg: on port 8080) - or/and indirectly via Apache (AJP protocol is used, eg port 8007) If you use HTTP via Apache, Apache will need mod_jk.conf and worker.properties to know how to dialogue with Tomcat If you use only one instance of Tomcat, then the default files (server.xml, mod_jk.conf-auto and worker.properties) work well. Now if you use 2 Tomcats, you can do: - in server1.xml - HTTP on port 8080) - AJP on port 8007) -in server2.xml - HTTP on port 8081) - AJP on port 8009) Each Tomcat will have its own socket for serving HTTP. It is not possible to share a socket (eg: 8080) between to Tomcats as you are trying to do. If you use HTTP via Apache, Apache will need to write your own mod_jk.conf and worker.properties. (It is important to realize that the default ones are working only when there is the default configuration of Tomcat (ie: only one Tomcat)). I hope this help, Xavier Marjou
RE: Multiple Tomcat Instances
If you use HTTP via Apache, Apache will need to write your own mod_jk.conf and worker.properties I wanted to say : If you use HTTP via Apache, YOU will need to write your own mod_jk.conf and worker.properties Sorry about it
RE: Multiple Tomcat Instances
I am using two tomcats server1.xml AJP on Port 8007 server2.xml AJP on port 8009 I am using Http via Apache.Every time i start tomcat with one of server.xml files i rename the mod_jk.conf-auto and the included the two static files in httpd.conf. Even after doing this i can only go to the contexts served by server1.xml file and not by server2.xml. How do i tell apache as to which context is to be serverd by which port. I think i am missing this step but do not know how to do it? Thanks Abhijat Thakur -Original Message- From: Marjou Xavier [mailto:[EMAIL PROTECTED]] Sent: Friday, September 07, 2001 4:37 AM To: '[EMAIL PROTECTED]' Subject: RE: Multiple Tomcat Instances Hello, Each Tomcat can be interfaced with a HTTP client with 2 different ways (defined in server.xml) - either with regular HTTP (eg: on port 8080) - or/and indirectly via Apache (AJP protocol is used, eg port 8007) If you use HTTP via Apache, Apache will need mod_jk.conf and worker.properties to know how to dialogue with Tomcat If you use only one instance of Tomcat, then the default files (server.xml, mod_jk.conf-auto and worker.properties) work well. Now if you use 2 Tomcats, you can do: - in server1.xml - HTTP on port 8080) - AJP on port 8007) -in server2.xml - HTTP on port 8081) - AJP on port 8009) Each Tomcat will have its own socket for serving HTTP. It is not possible to share a socket (eg: 8080) between to Tomcats as you are trying to do. If you use HTTP via Apache, Apache will need to write your own mod_jk.conf and worker.properties. (It is important to realize that the default ones are working only when there is the default configuration of Tomcat (ie: only one Tomcat)). I hope this help, Xavier Marjou
RE: Multiple Tomcat Instances
What you are trying to do isn't quite supported by Tomcat 3.2.x. The name of the auto-generated config file is not configurable, so the second Tomcat instance steps on the first's. I would recommend renaming the config file after starting each instance of Tomcat. Whenever a context is added or removed, repeat this process. Running multiple instances is better supported in Tomcat 3.3. The auto-generated file is written by a module (a.k.a interceptor) in the server.xml. Parameters may be specified, which include the name of the config file to write and where to write it. Your two server.xml files could specify different file names to avoid overwriting each other. Cheers, Larry P.S. There are many other configuration enhancements besides this one in Tomcat 3.3. -Original Message- From: Abhijat Thakur [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 05, 2001 7:42 PM To: [EMAIL PROTECTED] Subject: Multiple Tomcat Instances Hi, I need to run multiple instances of Tomcat on Apache. As mentioned in documentation i have the two server.xml files specifying two different ports. Tomcat starts fine with the two server.xml files. I might be wrong when it comes to changes in Apache configuration that need to be done when multiple instances of tomcat need to be run.In Apache changes need to be made to mod_jk.conf.auto (since this is included in apaches httpd.conf) so that we can tell mod_jk module which instance will handle which request. Now mod_jk.conf.auto is an auto generated file everytime tomcat starts up so if i make any changes they will be overridden. How can this be handled? Just to see if multiple instances of tomcat work i addded the contexts in the mod_jk.conf.auto. It still did not work. Are there any steps that are missing. Thanks Abhijat Thakur bDNA Corporation
Re: Multiple Tomcat Instances
Abhijat Thakur wrote: I need to run multiple instances of Tomcat on Apache. As mentioned in documentation i have the two server.xml files specifying two different ports. Tomcat starts fine with the two server.xml files. I might be wrong when it comes to changes in Apache configuration that need to be done when multiple instances of tomcat need to be run.In Apache changes need to be made to mod_jk.conf.auto (since this is included in apaches httpd.conf) Don't use the auto-generated config file; use static ones instead. Then Tomcat won't overwrite your changes. I frequently start with the auto-gen'd file, copy it to mod_jk.conf, and then I can tweak it as necessary. In your case, you might have mod_jk.conf.tomcat1 and mod_jk.conf.tomcat2, and include both of those in httpd.conf (instead of mod_jk.conf.auto). dwh
Re: Multiple Tomcat instances on one machine
Besides server.xml, how do I setup Tomcat so that each instance has its own copy of the other configuration files (tomcat-users.xml, workers.properties, etc) in conf? I don't see anyway of setting the path to the conf directory. Is that always based on $TOMCAT_HOME? Bill --- Hi William, Tomcat *can* share binaries across multiple running instances. However, as I found the docs a bit confusing when I tried to get this working, here's how to do it: create the following directory structure for each instance (eg under each user's home directory if you want an instance per user): somedirname + conf + server.xml + work Start tomcat with the -f option, specifying the appropriate server.xml: $TOMCAT_HOME/bin/tomcat.sh start -f /somedirname/conf/server.xml I use a single context tag with an absolute docBase in the server.xml to indicate where the webapp's files are, but I guess you could create a webapps directory as a sibling to the "conf" directory to hold webapps. I guess that you can also point multiple instances to the same docBase - but haven't tried it. Cheers, Simon -Original Message- From: William Au [SMTP:[EMAIL PROTECTED]] Sent: Thursday, January 11, 2001 3:10 PM To: [EMAIL PROTECTED] Subject: Multiple Tomcat instances on one machine I would like to run multiple Tomcat instances on one machine, each using a different port number. Do I need to have a seperate, full copy ofTOMCAT_HOME for each instance? Or can I just have one common set of binaries with multiple server.xml and other configuration files? Bill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Multiple Tomcat instances on one machine
This is not the case for me. I have verified which work directory is being used by removing everything in the work directory at both the top level and the instance level before starting Tomcat. After starting Tomcat, I noticed that the top level work directory is being used. I can get around that by setting the workDir attribute for the ContextManager in server.xml. But now I need to customize the other configuration files in conf for each instance. By the way, I am running Tomcat 3.2.1 on Solaris 7. Bill Kitching Simon wrote: -Original Message- From: William Au [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 3:42 PM To: [EMAIL PROTECTED] Cc: Kitching Simon Subject: Re: Multiple Tomcat instances on one machine Besides server.xml, how do I setup Tomcat so that each instance has its own copy of the other configuration files (tomcat-users.xml, workers.properties, etc) in conf? I don't see anyway of setting the path to the conf directory. Is that always based on $TOMCAT_HOME? Bill [Kitching Simon] I have noticed that merely by specifying the -f flag for the server.xml, the work directory is assumed to be at location ../work relative to the server.xml file. As I don't use any other config files (though the work directory location is significant for me), this does the job. I presume that all the other config files are looked for in the same directory as the server.xml file. Is this not the case?? --- Hi William, Tomcat *can* share binaries across multiple running instances. However, as I found the docs a bit confusing when I tried to get this working, here's how to do it: create the following directory structure for each instance (eg under each user's home directory if you want an instance per user): somedirname + conf + server.xml + work Start tomcat with the -f option, specifying the appropriate server.xml: $TOMCAT_HOME/bin/tomcat.sh start -f /somedirname/conf/server.xml I use a single context tag with an absolute docBase in the server.xml to indicate where the webapp's files are, but I guess you could create a webapps directory as a sibling to the "conf" directory to hold webapps. I guess that you can also point multiple instances to the same docBase - but haven't tried it. Cheers, Simon -Original Message- From: William Au [SMTP:[EMAIL PROTECTED]] Sent: Thursday, January 11, 2001 3:10 PM To: [EMAIL PROTECTED] Subject: Multiple Tomcat instances on one machine I would like to run multiple Tomcat instances on one machine, each using a different port number. Do I need to have a seperate, full copy ofTOMCAT_HOME for each instance? Or can I just have one common set of binaries with multiple server.xml and other configuration files? Bill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Multiple Tomcat instances on one machine
Hi William, Tomcat *can* share binaries across multiple running instances. However, as I found the docs a bit confusing when I tried to get this working, here's how to do it: create the following directory structure for each instance (eg under each user's home directory if you want an instance per user): somedirname + conf + server.xml + work Start tomcat with the -f option, specifying the appropriate server.xml: $TOMCAT_HOME/bin/tomcat.sh start -f /somedirname/conf/server.xml I use a single context tag with an absolute docBase in the server.xml to indicate where the webapp's files are, but I guess you could create a webapps directory as a sibling to the "conf" directory to hold webapps. I guess that you can also point multiple instances to the same docBase - but haven't tried it. Cheers, Simon -Original Message- From: William Au [SMTP:[EMAIL PROTECTED]] Sent: Thursday, January 11, 2001 3:10 PM To: [EMAIL PROTECTED] Subject: Multiple Tomcat instances on one machine I would like to run multiple Tomcat instances on one machine, each using a different port number. Do I need to have a seperate, full copy ofTOMCAT_HOME for each instance? Or can I just have one common set of binaries with multiple server.xml and other configuration files? Bill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Multiple Tomcat instances on one machine
can I just have one common set of binaries with multiple server.xml and other configuration files? Bill Yes. I have the same config and it works fine. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Multiple Tomcat instances on one machine
Thanks for the info. I was able to get things to work. I also setup seperate logs and webapps directories. Bill Kitching Simon wrote: Hi William, Tomcat *can* share binaries across multiple running instances. However, as I found the docs a bit confusing when I tried to get this working, here's how to do it: create the following directory structure for each instance (eg under each user's home directory if you want an instance per user): somedirname + conf + server.xml + work Start tomcat with the -f option, specifying the appropriate server.xml: $TOMCAT_HOME/bin/tomcat.sh start -f /somedirname/conf/server.xml I use a single context tag with an absolute docBase in the server.xml to indicate where the webapp's files are, but I guess you could create a webapps directory as a sibling to the "conf" directory to hold webapps. I guess that you can also point multiple instances to the same docBase - but haven't tried it. Cheers, Simon -Original Message- From: William Au [SMTP:[EMAIL PROTECTED]] Sent: Thursday, January 11, 2001 3:10 PM To: [EMAIL PROTECTED] Subject: Multiple Tomcat instances on one machine I would like to run multiple Tomcat instances on one machine, each using a different port number. Do I need to have a seperate, full copy ofTOMCAT_HOME for each instance? Or can I just have one common set of binaries with multiple server.xml and other configuration files? Bill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]