I am trying to run a spring boot application by clicking on Run as -> Spring Boot App. I am getting the error as :
Caused by: java.net.BindException: Address already in use: bind
When I use netstat command, I see the below without process Ids:
netstat -na | find "8080"
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING
TCP [::]:8080 [::]:0 LISTENING
Notice - I am running my code on windows machine
How do I kill these processes?
BindException: Address already in use: JVM_Bind is a common exception in Java with applications trying to connect on a particular port and some other processes either Java or non Java is already connected on that port.
The java. net. BindException is an exception that is thrown when there is an error caused in binding when an application tries to bind a socket to a local address and port.
it means that you are trying to use a port that is already open. check to see whether the port that you want to open is already open or not. also it may cause that your fireWall do not allows the application to listen on the port.
You can change your application's port number by providing something like server.port=4567
in your application.properties
.
OR
You can follow the steps as mentioned in http://www.codeman.in/blog/windows-kill-process-by-port-number-157 to kill process running on a port number:-
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With