File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Trouble with running multiple Tomcat instances Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Trouble with running multiple Tomcat instances" Watch "Trouble with running multiple Tomcat instances" New topic
Author

Trouble with running multiple Tomcat instances

Joseph Clarm
Greenhorn

Joined: Aug 20, 2010
Posts: 2
Hello, I have what I think is a probably an easy problem to fix, I just don't have the knowledge.

I am running Java 1.6.0_03, Tomcat 6.0.13, on Linux
I'm trying to get multiple instances of tomcat working but am unable to connect to the new instance I've set up. I've tried many different guides online as well as searching here on coderanch, to no avail. I think I am missing something very simple however, as I'll explain:

I have the following set up:

/usr/app/tomcat (original installation)
/usr/app/tomcatdev (second instance I would like to run)

I copied over the necessary directories/files from the first installation into the new directory and made the necessary changes to various ports specified in server.xml, the main listener being on 8081 now instead of the default 8080.
I've set $CATALINA_BASE to /usr/app/tomcatdev.
The second instance seems to start and run correctly with startup.sh, according to ps aux.
netstat -anp shows me that the correct process is in fact listening on 8081 - yet all of my attempts to reach the server at its address:8081 fail. There are no error messages(that I know of), other than my browser being unable to connect.

What am I missing?

Note: The original tomcat installation /usr/app/tomcat still works fine, listening on 8080.
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
Probably you have something already running on 8081. It could be firewall issue. Try another port.
Joseph Clarm
Greenhorn

Joined: Aug 20, 2010
Posts: 2
To much surprise here, that actually worked. I really doubt a process was stealing 8081, however, as I checked to make sure nothing was using it beforehand. I changed the port to 8085, and boom it works. Perhaps it was a firewall issue, but that seems unlikely now that 8085 works and seeing as I'm on the same local network as the server.

Thanks a lot for the help, Misha Ver.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Trouble with running multiple Tomcat instances
 
Similar Threads
multiple jvm for tomcat
Tomcat does not start in Browser
http://localhost:8081/ not working
problem using manager application for each tomcat instance
Environment set up for SCBCD self study