I\'m developing a REST API using Spring Framework.
First I wasn\'t able to run my application because of the same problem. The port 8080 on my computer is busy. Then I
Find the process and terminate it. On Windows do a Control+Alt+Delete and then find the "Java(TM) Platform SE Binary" process under the Processes Tab. For example:
On Ubuntu, you can use "ps aux | grep java" to find the process and "kill -9 PID_NUMBER" to kill the process.
OR
If you're using a Spring boot application, go to application.properties and add this:
server.port = 8081
Another easy way of solving this error is right clicking in the console and click on Terminate/Disconnect All. Afterwards run the application it should work fine.
if it's convenient for you, and you don't want to use the command line, you can reboot your computer, it helps!
For those who are experiencing same problem after controlling there is no suspicious java process which allocate the port, there is no red square on eclipse to terminate any process and also there is no change even you try different port for your spring boot application.
might sound stupid but; restarting eclipse works. :)
Find the process ID (PID) for the port (e.g.: 8080)
On Windows:
netstat -ao | find "8080"
Other Platforms other than windows :
lsof -i:8080
Kill the process ID you found (e.g.: 20712)
On Windows:
Taskkill /PID 20712 /F
Other Platforms other than windows :
kill -9 20712 or kill 20712
right click on your console and terminate. or click on stop