XAMPP Tomcat can’t start with exception : Address already in use: NET_Bind (Windows)

Muhammad Tri Wibowo
2 min readNov 12, 2021

--

When i try to start tomcat in XAMPP Control Panel, it can’t be starting.

So, i read the logs of tomcat

i got error message like below :

10-Nov-2021 11:39:21.869 SEVERE [main] org.apache.catalina.core.StandardServer.await StandardServer.await: create[localhost:8005]: 
java.net.BindException: Address already in use: NET_Bind
at java.base/java.net.PlainSocketImpl.bind0(Native Method)
at java.base/java.net.PlainSocketImpl.socketBind(PlainSocketImpl.java:132)
at java.base/java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:436)
at java.base/java.net.ServerSocket.bind(ServerSocket.java:395)
at java.base/java.net.ServerSocket.<init>(ServerSocket.java:257)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:414)

The summary of it is :

[localhost:8005]:Address already in use: NET_Bind

Port 8005 already in use

Then, i open command prompt and check what process have used that port

netstat -ano | findStr 8005

i got PID (Process ID) that used that port, 22104

then, i try to find what program’s name that used that port

tasklist

java.exe with PID 22104 used that port (8005)

port 8005 is used for shutdown process in tomcat, you can see in server.xml

<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
<!-- Security listener. Documentation at /docs/config/listeners.html
<Listener className="org.apache.catalina.security.SecurityListener" />
-->
<!-- APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />

So, i kill that Process (PID) with command like below :

taskkill /f /pid 22104

Then, i try start tomcat again in tomcat

Voila, tomcat can be start

--

--

No responses yet