Spring Boot application in eclipse, the Tomcat connector configured to listen on port XXXX failed to start

前端 未结 17 1520
不知归路
不知归路 2021-01-30 02:12

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

相关标签:
17条回答
  • 2021-01-30 03:09

    this issue can be resolved using 2 ways:

    1. Kill application running on 8080
    netstat -ao | find "8080"
    
    Taskkill /PID 1342 /F
    
    1. change spring server port in application.properties file

    server.port=8081

    0 讨论(0)
  • 2021-01-30 03:10

    Issue: It's because either you are not stopping your application or the application is already somehow running on the same port somehow.

    Solution, Before starting it another time, the earlier application needs to be killed and the port needs to be freed up.

    Depending on your platform you can run the below commands to stop the application,

    on windows

    netstat -anp | find "your application port number"` --> find PID

    taskkill /F /PID

    on Linux,

    netstat -ntpl | grep "your application port number"

    kill pid // pid you will get from previous command

    on Mac OS

    lsof -n -iTCP:"port number"

    kill pid //pid you will get from previous command

    0 讨论(0)
  • 2021-01-30 03:11

    We have had the same issue in eclipse or intellij. After trying many alternative solutions, I found simple solution - add this config to your application.properties: spring.main.web-application-type=none

    0 讨论(0)
  • 2021-01-30 03:13
    1. check the port which is busy: netstat -ntlp
    2. kill that port : kill -9 xxxx
    0 讨论(0)
  • 2021-01-30 03:15

    There are two options to handle/avoid this situation.

    1. Before re-running the application just terminate the previous connection.
    • Open the console --> right click --> terminate all.
    1. If you forgot to perform action mention on step 1 then
    • Figure out the port used by your application, you could see it the stack trace in the console window
    • Figure out the process id associated to port by executing netstat -aon command in cmd
    • Kill that process and re-run the application.
    0 讨论(0)
提交回复
热议问题