We Are Going To Discuss About 8080 port already taken issue when trying to redeploy project from Spring Tool Suite IDE. So lets Start this Java Article.
8080 port already taken issue when trying to redeploy project from Spring Tool Suite IDE
- 8080 port already taken issue when trying to redeploy project from Spring Tool Suite IDE
It was resolved with following steps,
Check what processes are running at available portsnetstat -ao |find /i "listening"
We get followingTCP 0.0.0.0:7981 machinename:0 LISTENING 2428
- 8080 port already taken issue when trying to redeploy project from Spring Tool Suite IDE
It was resolved with following steps,
Check what processes are running at available portsnetstat -ao |find /i "listening"
We get followingTCP 0.0.0.0:7981 machinename:0 LISTENING 2428
Solution 1
It sometimes happen even when we stop running processes in IDE with help of Red button , we continue to get same error.
It was resolved with following steps,
-
Check what processes are running at available ports
netstat -ao |find /i "listening"
We get following
TCP 0.0.0.0:7981 machinename:0 LISTENING 2428
TCP 0.0.0.0:7982 machinename:0 LISTENING 2428
TCP 0.0.0.0:8080 machinename:0 LISTENING 12704
TCP 0.0.0.0:8500 machinename:0 LISTENING 2428i.e. Port Numbers and what Process Id they are listening to
-
Stop process running at your port number(In this case it is 8080 & Process Id is 12704)
Taskkill /F /IM 12704
(Note: Mention correct Process Id)
For more information follow these links Link1 and Link2.
My Issue was resolved with this, Hope this helps !
Original Author rdj7 Of This Content
Solution 2
For Mac users(OS X El Capitan
):
You need to kill the port that localhost:8080
is running on.
To do this, you need to do two commands in the terminal :N
sudo lsof -i tcp:8080
kill -15 PID
NB! PID
IS A NUMBER PROVIDED BY THE FIRST COMMAND.
The first command gives you the PID
for the localhost:8080
.
Replace the PID
in the second command with the PID
that the first command gives you to kill the process running on localhost:8080
.
Original Author jsog Of This Content
Solution 3
The reason is one servlet container is already running on port 8080 and you are trying to run another one on port 8080.
-
-
Check what processes are running at available ports.
-
For Windows :
-
netstat -ao |find /i "listening"
OR
netstat -ano | find "8080"
(Note: 8080 is port fail to start)
-
-
-
-
Now try to reLaunch or stop your application.
- To relaunch: you can press this button
- To stop in windows:
Taskkill /F /IM 6592
Note: Mention correct Process Idright click on the console and select terminate/disconnect all
- Go to
Task Manager
and end Java(tm) platform se binary
-
Another option is :
Go to application.properties
file set server.port=0
. This will cause Spring Boot to use a random free port every time it starts.
Original Author Thimira Pathirana Of This Content
Solution 4
Create application.properties
file under src/main/resources
folder and write content as
server.port=8084
Its runs fine.
But every time before run need to stop application first by click on red button upper on the IDE
or try
RightClick on console>click terminate/Disconnect All
Original Author MangduYogii Of This Content
Conclusion
So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.