1. 程式人生 > >Tomcat報錯,程序被佔用

Tomcat報錯,程序被佔用

Tomcat報錯

第一次使用CSDN,介面醜陋勿噴

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).

我在eclipse裡配置了tomcat,用著好好的,突然就報錯了,如上。第一次報錯是這樣的: Server Tomcat v7.0 Server at localhost failed to start. 然後查了一下教程,在server檢視視窗中把tomcat刪除,然後再重新新增tomcat 之後再重新在啟動web專案,就報了標題的錯誤。 解決方案如下:

1.開啟dos,輸入netstat -ano|findstr 8080,檢視佔用8080埠的程序,我這裡的PID是10424 在這裡插入圖片描述 2.輸入taskkill /pid 1952 /f,終止該程序 在這裡插入圖片描述 3.把tomcat重啟一遍,再執行web專案就不會報錯了