I have strange thing when I try to modify Spring project inside my Spring Tool Suite. On the first load (deploy) everything is fine, application compiles and runs on localho
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
.
In my case, the error occurred as the application was unable to access the keystore for ssl.
Starting the application as root user fixed the issue.
If you are using linux system, use the below command.
fuser -k some_port_number/tcp
- that will kill that process.
Sample:-
fuser -k 8080/tcp
Second Option: Configure the tomcat to use a new port
One simple solution for me that worked was to : - Restart the IDE, since the stop Button was no longer visible.
Am I doing something wrong here?
Yes, you are. One servlet container is already running on port 8080 and you are trying to run another one on port 8080 again.
Either restart the server (If there is button for that in STS) or stop and start it
In Spring Boot Application (Using Spring Starter Project) We Have Update Port in Server.xml using Tomcat server and Add this port in application.property( insrc/main/resources) the code is server.port=8085
And update Maven Project then run application