Configuring Tomcat port

By default the tomcat binding ports are 8005, 8080 and 8009.

If you have another tomcat instance running on same server or other application like JBoss Application Server, these ports are likely already used. In this case you should change the default ports.

Change tomcat ports

The port change must be done with the tomcat application stopped.

Edit $TOMCAT_HOME/confg/server.xml and look for all Tomcat port properties.

ServiceDefault portExample of new port

Shut-down Port

 

8005

8105

Change

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

to

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

Tomcat Connector Port

 

8080

8180

Change

<Connector address="0.0.0.0" connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>

to

<Connector address="0.0.0.0" connectionTimeout="20000" port="8180" protocol="HTTP/1.1" redirectPort="8443"/>

AJP Connector Port

 

8009

8109

Change

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

to

<Connector address="127.0.0.1" port="8109" protocol="AJP/1.3" redirectPort="8443"/>

To shut-down the different instances execute the shutdown.sh script from each $TOMCAT_HOME/bin.