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

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

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

Image for post

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.

netstat -ano | findstr : port number

Image for post

Red colored circled area shows the PID (process identifier)

Step 2

Then you execute this command after identify the PID.

taskkill /PID typeyourPIDhere /F

Image for post

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

Image for post

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

Java Techie

Java Techie is a channel where we create and publish videos on ‘how to’ about latest technology trends like spring ?

www.youtube.com

No Responses

Write a response