Tomcat - Resolve "Failed to initialize end point associated with ProtocolHandler"

by
Jeremy Canfield |
Updated: June 02 2020
| Tomcat articles
This error appears when running the configtest.sh command, or in the catalina.out log. Address already in use means the port is already in use by another process. This usually means there is another JVM on the server already using the port.
~]# $CATALINA_HOME/bin/configtest.sh
. . .
SEVERE: Failed to initialize end point associated with ProtocolHandler ["http-nio-8080"]
java.net.BindException: Address already in use
. . .
The lsof command can be used to find the process that is using the port. In this example, port 8080 is being used by Java, on PID 27274.
~]# lsof -i tcp:8080
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 27274 root 48u IPV6 107441 0t0 TCP *:webcache (LISTEN)
Use the ps command to determine the JVM associated with the Java process. This will identify the JVM that is already using the port. The solution is usually to select a different port for the new JVM.
~]# ps -ef | grep 27274
root 27274 1 0 Jun05 ? 00:06:14 . . . myJVM
Did you find this article helpful?
If so, consider buying me a coffee over at