-
問題描述:
mac下的Eclipse中內置的Tomcat,啟動時報一下錯誤:
Several ports (8080, 8009) required by Tomcat v7.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).
- 解決辦法:
- 打開終端,輸入以下命令
lsof -i :8080
- 如果你被占用的端口不是8080,請修改命令中的參數。 該命令輸出以下內容:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 27132 kaige 41u IPv6 0x9d80e4a27fc1081b 0t0 TCP *:http-alt (LIS
- 我的Mac上占用8080端口的進程ID是27132,所以我再將這個進程殺死
kill -9 27132
請根據你的進程ID來修改次kill命令的最后一個參數
然后再次啟動Eclipse中的Tomcat,可以正常啟動了!