Home  >  Q&A  >  body text

[Tomcat]在Eclipse中端口被占用的问题

不知道什么原因,每次运行程序都端口都会被占用,改过端口之后运行又被占用,真是哔——————了。之前还能用终端来kill的,现在连终端都不好使了。有高人能指条明路吗?在线等,谢谢。

伊谢尔伦伊谢尔伦2713 days ago699

reply all(2)I'll reply

  • 高洛峰

    高洛峰2017-04-22 09:02:10

    Did you start tomcat yourself first, and then automatically start it again when eclipse is running? Then the port will definitely be occupied. The solution is not to open tomcat manually

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-22 09:02:10

    I will answer it again after many months. This is actually a problem caused by improper shutdown of tomcat.
    The first method is relatively gentle and is to clean the project.
    The second method is that I have tried it all, and used the command line to forcefully close the pid of tomcat. I only write about the mac system here:

    ps -e | grep java
    

    Find out the id of tomcat thread

    kill -9 <tomcatID>

    The third method is the most violent, just restart the computer = =.

    reply
    0
  • Cancelreply