Most likely, there is a port conflict with another application or service on the server machine.
To resolve this problem, change the Tomcat port numbers.
On Windows:
- In the Tomcat 7.0 directory, open the file server.xml and make two changes:
- Find the port=8080 and change to a new port number such as port=8090
- Find the port=8008 and change to a new port number such as port=8010
- Save the file.
- In the Apache2.2/extra/ root directory, open the file httpd-vhosts.conf.
- In the following line from httpd-vhosts.conf, update the port number with the one you used to replace 8008, which in our example is 8010:
ProxyPass /deployr ajp://localhost:8008/deployr timeout=1800
- Restart Tomcat and then restart Apache HTTPD for the change to take effect.
net stop tomcat7
net start tomcat7
net stop Apache2.2
net start Apache2.2
On Linux:
Note: If you added lines to iptables during installation, you may need to change the port numbers listed there as well.
- Edit the file /usr/share/tomcat6/conf/server.xml and make two changes:
Find the port=8080 in the lines:
Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
and change to a new port number, such as port=8090.
Find the port=8008 in the line:
Connector port="8008" protocol="AJP/1.3" redirectPort="8443" /
and change to a new port number, such as port=8010
Save and exit the file.
- Edit the file /etc/httpd/conf/httpd.conf to update the Connector AJP port number in the following line with the one you used to replace 8008, which in our example is 8010:
ProxyPass /deployr ajp://localhost:8008/deployr timeout=1800
- Restart Tomcat and then restart Apache HTTPD for the changes to take effect.
/etc/init.d/tomcat7 stop
/etc/init.d/tomcat7 start
/etc/init.d/httpd stop
/etc/init.d/httpd start
- Verify that the port changes are working as expected. At the prompt, type:
netstat -p --listening --numeric-ports --numeric-hosts | grep -i java