tomcat在eclipse中使用,啟動出現錯誤
阿新 • • 發佈:2019-01-08
tomcat在eclipse中使用,啟動出現如下錯誤:
Several ports (8005, 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)
原因是:
是說這幾個埠已經有某個應用程式佔用了,所以Tomcat就沒法啟動了。
所以你要檢查下究竟是什麼應用程式佔用這幾個埠,不過大多數情況下是因為你之前已經啟動過一個Tomcat,而你沒注意到,所以埠是被佔用狀態。
tomcat最少需要2個空閒埠來啟動
1個是web訪問埠,例如80,8080,8000
第2個是tomcat控制埠,用於tomcat本身的功能控制等等,預設的是8005
解決辦法:
進入tomcat的安裝目錄中進入其中的bin目錄中。執行命令sudo ./shutdown.sh,重新在eclipse中啟動即可。
其中shutdown.sh已經配置過,參考http://blog.csdn.net/chushoutaizhong/article/details/51941688