Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I run two tomcat instances on the same machine?

Tags:

java

tomcat

Can I run two Tomcat servers with two different ports on the same machine? Will it create any problem? When I run a tomcat it will create the javaw.exe file in the task manager.

like image 795
krishna Avatar asked Jan 13 '11 08:01

krishna


People also ask

Can I have two Tomcats on the same machine?

Yes its possible. I had installed tomcat 7 and tomcat 8 on my linux VM. You just need to make sure that the port numbers for the two tomcat instances are different. Change the Connector port=”8080″ port to any other port number.

How many JVM instances does a Tomcat server have?

In a section that shortly explains the architecture of the container he says: "Only one tomcat instance can live in a single Java Virtual Machine(JVM)..." later, the author states: "You can still run multiple instances on same physical box, but as separated Java processes..." What is actually the meaning of running the ...

Can I run two web apps in same Tomcat if so how?

Simply drop both war files into Tomcat's webapps folder. That is all you need to do. By default, Tomcat expands ("explodes" some say) each war (technically a zip file) into a folder and automatically deploys the app for you. This happens on the fly if Tomcat is already running, or on startup when you launch Tomcat.


1 Answers

Apart from changing Connector port for protocol="HTTP/1.1" described in one of the answers below.

I think it requires to change Server port for 'Shutdown'

<Server port="8005" shutdown="SHUTDOWN"> 

and also AJP port no.

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> 

If you want to run multiple tomcat instances in parallel.

like image 71
Hardik Mishra Avatar answered Oct 11 '22 10:10

Hardik Mishra