Eclipse/MyEclipse 啟動 Tomcat v8.0 時彈窗報錯:
Port 8080 required by Tomcat v8.0 Server at localhost is already in use. The server may already be running in another process, or a system process may be using the port.
端口 8080 被其他進程佔用。常見佔用者:
netstat -ano | findstr :8080
輸出示例:
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 4208
最後一列 4208 即為進程 PID。
tasklist | findstr "4208"
輸出示例:
ApplicationWebServer.exe 4208 Services 0 10,392 K
services.msc 找到 NI Application Web Server${CATALINA_HOME}/conf/server.xml<Connector port="8080" .../> 為其他端口(如 8081、8888)taskkill /PID 4208 /F
適用於無法通過服務管理器停止的頑固進程。
Server startup in xxx mshttps://localhost:8080/(或新端口)顯示 Tomcat 首頁Ctrl+Alt+R 刷新確認