8080 port already taken issue when trying to redeploy project from Spring Tool Suite IDE

前端 未结 22 2514
梦毁少年i
梦毁少年i 2020-12-07 10:49

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

相关标签:
22条回答
  • 2020-12-07 11:04

    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.

    0 讨论(0)
  • 2020-12-07 11:04

    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.

    0 讨论(0)
  • 2020-12-07 11:04

    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

    0 讨论(0)
  • 2020-12-07 11:04

    One simple solution for me that worked was to : - Restart the IDE, since the stop Button was no longer visible.

    0 讨论(0)
  • 2020-12-07 11:05

    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

    0 讨论(0)
  • 2020-12-07 11:05

    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

    0 讨论(0)
提交回复
热议问题