top of page

How to kill the process currently using a port on localhost in windows


We everyone worked on Tomcat server and sometimes we are facing one common issue

"java.net.BindException: Address already in use: bind"

How to resolve this

Steps to follow

Step 1

Run command-line as an Administrator. Then run the below mention command. type your port number in yourPortNumber

netstat -ano | findstr :yourPortNumber

Red colored circled area shows the PID (process identifier)

Step 2

Then you execute this command after identify the PID.

taskkill /PID typeyourPIDhere /F

Run the first command again to check if process is still available or not. You'll get empty line if process is successfully ended

Learn more about spring boot and microservices concept from my YouTube channel

Regards,

Basant Hota


bottom of page