0

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?

Marko Topolnik
  • 195,646
  • 29
  • 319
  • 436
membersound
  • 81,582
  • 193
  • 585
  • 1,120

3 Answers3

1

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.

Marko Topolnik
  • 195,646
  • 29
  • 319
  • 436
0

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.

fujy
  • 5,168
  • 5
  • 31
  • 50
0

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.

Mahendra
  • 323
  • 1
  • 7
  • Tomcat does not complain about `8005`, but `8080` which was already changed to `8090` and `8009` to `8019` above. – membersound Feb 23 '15 at 12:50
  • Tomcat uses Shutdown port as well and if you change, hopefully it will work.. Please try once, if not then we can check further. But i am sure it will work after changing Shutdown port as well. – Mahendra Feb 23 '15 at 12:52
  • Please have a look at my update, I found the cause is an environment variable `CALALINE_HOME` – membersound Feb 23 '15 at 12:59
  • 1
    remove CALALINE_HOME from env variables. If CALALINE_HOME is not present tomcat will take current location. – Mahendra Feb 23 '15 at 13:02