Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating Multiple Tomcat Instances on a Server

 
Arnold Angel
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know everyone very busy. I need some help and was wondering if a guru could send me instructions or explain how to create multiple instances of Tomcat on one server.
Each Tomcat would have Dedicated Ports for Tomcat01 DEV 8080, Tomcat 02 QA 8083, and BETA. 8089
When I attempted to start two Tomcats I get the following:
Catalina.start: LifecycleException: Error creating server socket: java.net.Bin dException: Address in use: JVM_Bind LifecycleException: Error creating server socket: java.net.BindException: Addr ess in use: JVM_Bind at org.apache.catalina.connector.warp.WarpConnector.initialize(WarpConne ctor.java:483) at org.apache.catalina.core.StandardService.initialize(StandardService.j ava:454) at org.apache.catalina.core.StandardServer.initialize(StandardServer.jav a:552) at org.apache.catalina.startup.Catalina.start(Catalina.java:775) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) ----- Root Cause ----- java.net.BindException: Address in use: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.(Unknown Source) at java.net.ServerSocket.(Unknown Source) at org.apache.catalina.net.DefaultServerSocketFactory.createSocket(Defau ltServerSocketFactory.java:118) at org.apache.catalina.connector.warp.WarpConnector.initialize(WarpConne ctor.java:477) at org.apache.catalina.core.StandardService.initialize(StandardService.j ava:454) at org.apache.catalina.core.StandardServer.initialize(StandardServer.jav a:552) at org.apache.catalina.startup.Catalina.start(Catalina.java:775) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at java.lang.reflect.Method.invoke(Native Method) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) and many others.
Thanks in advance. I just need simple step-by-step checklist of how to do this. It must be a simple configuration file setting
Arnold Angel
 
Bhagvan Kommadi
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

There is something close to what you are trying:
check this out:
http://jakarta.apache.org/tomcat/tomcat-3.3-doc/Tomcat-Workers-HowTo.html
Bhagvan K
SCJP, SCJA part I , IBM 483
 
Arnold Angel
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the great reply!

I need separate environments using multiple Tomcat Instances for Tomcat01 DEVELOPMENT Port 7080, Tomcat02 QA 8080, and Tomcat03 BETA. 9080 on a single appl
I don't need to cluster or share between Instances.
Any more ideas would be appreciated.
Originally posted by Bhagvan Kommadi:

There is something close to what you are trying:
check this out:
http://jakarta.apache.org/tomcat/tomcat-3.3-doc/Tomcat-Workers-HowTo.html
Bhagvan K
SCJP, SCJA part I , IBM 483

 
Joe Gilvary
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat configuration documents are available
online at http://jakarta.apache.org/tomcat/tomcat-4.0-doc/
From the RUNNING.txt file that comes with
the Tomcat 4 distribution (the version I'm
running):
(4) Advanced Configuration - Multiple
Tomcat 4 Instances
In many circumstances, it is desirable to have
a single copy of a Tomcat 4 binary distribution
shared among multiple users on the same server.
To make this possible, you must configure a
CATALINA_BASE environment variable (in addition
to CATALINA_HOME as described above) that points
to a directory that is unique to your instance.
When you do this, Tomcat 4 will calculate all
relative references for files in the following
directories based on the value for CATALINA_BASE
instead of CATALINA_HOME:
* conf - Server configuration files
(including server.xml)
* logs - Log and output files
* webapps - Automatically loaded web
applications
* work - Temporary working directories for
web applications
If you do not set CATALINA_BASE to an explicit
value, it will be initialized to the same value
as is set for CATALINA_HOME (which means that
the same directory is used for all relative
path resolutions).
 
Arnold Angel
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another excellent reply!
Are these environmental variables similar to JAVA_HOME or are they in a configuration file?
JAVA_HOME = C:\JDK1.3...
C:\Tomcat01DEV
C:\Tomcat02QA
C:\Tomcat03BETA
If environmenatl variables, TOMCAT_HOME = ?
CATALINA_BASE = C:\Tomcat01DEV; C:\Tomcat02QA ??
instead of CATALINA_HOME:

Originally posted by Joe Gilvary:
Tomcat configuration documents are available
online at http://jakarta.apache.org/tomcat/tomcat-4.0-doc/
From the RUNNING.txt file that comes with
the Tomcat 4 distribution (the version I'm
running):
(4) Advanced Configuration - Multiple
Tomcat 4 Instances
In many circumstances, it is desirable to have
a single copy of a Tomcat 4 binary distribution
shared among multiple users on the same server.
To make this possible, you must configure a
CATALINA_BASE environment variable (in addition
to CATALINA_HOME as described above) that points
to a directory that is unique to your instance.
When you do this, Tomcat 4 will calculate all
relative references for files in the following
directories based on the value for CATALINA_BASE
instead of CATALINA_HOME:
* conf - Server configuration files
(including server.xml)
* logs - Log and output files
* webapps - Automatically loaded web
applications
* work - Temporary working directories for
web applications
If you do not set CATALINA_BASE to an explicit
value, it will be initialized to the same value
as is set for CATALINA_HOME (which means that
the same directory is used for all relative
path resolutions).

 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm moving this to the Tomcat forum.
------------------
Tom
Sun Certified Programmer for the Java� 2 Platform
Moderator of the forums:
J2EE and EJB
Other Java APIs
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic