Reputation: 86727
I'm trying to run multiple tomcat
instances in parallel in the same machine.
Therefore trying to change the default port, but it does not work.
server.xml:
<Connector port="8090" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
compression="on"
/>
<Connector port="8019" protocol="AJP/1.3" redirectPort="8443" />
On startup, I get the error: JAVA_BIND<null>:8080 already in use
What might be missing? Which steps have to be taken to run in parallel?
UPDATE: The problem is that the machine defines the environment variable as follows:
CATALINA_HOME = d:\apache\
Thus any tomcat installation points to the same directory on launch.
How could I change this?
Upvotes: 0
Views: 2382
Reputation: 333
While running multiple tomcat instances change below port
<Server port="8005" shutdown="SHUTDOWN">
also
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
Edited: remove CALALINE_HOME from environmental variables. If CALALINE_HOME is not present tomcat will take parent directory as CALALINE_HOME.
Upvotes: 0
Reputation: 200148
CATALINA_HOME
is an environment variable which, if not set in advance, will resolve to the parent directory of the startup script you are executing. Therefore I recommend you delete that variable from your environment and let Tomcat's startup procedure resolve it.
Upvotes: 1
Reputation: 5264
The errors means that this port 8080
is already in use by your running Tomcat instance.
If you want to run another tomcat instance, you just need to run it on another port 9090
for example, just take a copy of the tomcat folder in another place, and in your server.xml
file change that 8080
to 9090
.
Upvotes: 0