Thursday, March 26, 2015

Apache Tomcat has this error, "java.net.BindException: Address already in use"

This means that another program has already bind to those ports that Tomcat uses.
Your options are:
  1. Change the ports of your Apache Tomcat by editing the ${TOMCAT_HOME}/conf/server.xml.
  2. Shutting down the other program that has bind those ports.
To find and shutdown the other program do the following:
For windows:
  1. Open a command line.
  2. Then type "netstat -nao".
  3. Look for those port numbers, and remember the PID number.
  4. Open task manager.
  5. Find the corresponding PID and end those task(s).
For Linux:
  1. Open a command line.
  2. Then type "netstat -nap".
  3. Look for those port numbers, and remember the PID number.
  4. In the command line type "kill -9 ${PID}" with the PID number.

No comments:

Post a Comment