1. 程式人生 > >Tomcat(8005,8080,8009)端口占用問題常見原因及解決方法

Tomcat(8005,8080,8009)端口占用問題常見原因及解決方法

在企業版Eclipse中,在已經啟動了Tomcat伺服器後,準備執行頁面或Servlet時,有時會出現這樣的關於Tomcat伺服器端口占用的問題:
“Several ports (8005, 8080, 8009) required by Tomcat v6.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).”




錯誤資訊的大意是說Tomcat執行所需的那三個埠被的程式佔用了。

cmd.exe 命令列視窗以管理員身份執行,在控制檯輸入 netstat -abn”命令檢視正在執行的程式所佔用的埠以及相關資訊:


可以看到,是"javaw.exe"這個程式佔用了8009和8080埠,在資源管理器中把它結束掉就可以了。