Is it possible to install multiple instances of Tomcat on one server to create a development, test and production version?

JIA Java Italian Association

Additional info:
I am trying to create a seperate development, test and production environment on one windows NT-server. To ensure that each environment is completely seperated from all others, I tried installing 3 seperate versions of Jakarta-Tomcat making sure to assign different ports to each in the seperate server.xml files.
When one environment is up and running, starting a new environment will result in the following message in the "tomcat command box":
FATAL: java.net.BindExeption: Address in use: JVM_Bind
java.net.BindExeption: Address in use: JVM_Bind
  at java.net.PlainSocketImpl.socketBind<Native Method>
  at java.net.PlainSocketImpl.bind<PlainSocketImpl.java:452>
  at java.net.ServerSocket.<init><ServerSocket.java:170>
  at java.net.ServerSocket.<init><ServerSocket.java:121>
You need to be sure to change every port that Tomcat uses.

The default installation, for example, uses 3 different ports:

  • one for the http connector (default 8080)
  • one for the ajp connector (8009)
  • one for the shutdown port (8005)
The ajp connector part is normally useless when Tomcat runs as a Standalone server, while the http connector is useless when Tomcat is used behind a web server.

That error message is displayed when you haven't changed all ports, and two, or more, instances are trying to access to the same port.
Please check the config files again.

By the way, with Tomcat 4.x.x, you don't need to install 3 times Tomcat. You can install the codebase once, and then having 3 difference indipendent instances by using the CATALINA_BASE ebvironment variable. Check out (4) Advanced Configuration - Multiple Tomcat 4 Instances from the Install and Run document.

Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact