啟動Tomcat服務器報錯:
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).
原因:端口8005, 8080, 8009被占用了。可能是在打開Tomcat的情況下關閉了Eclipse,或是Eclipse非正常關閉,導致先前的Tomcat沒有被關閉,端口占用。或是其他軟件占用了tomcat的端口號。
解決方法:
方法1:殺掉占用端口的軟件。
打開任務管理器,找到java虛擬機相關的進程javaw.exe,干掉他。如果問題沒有解決,下面方法2
方法2:修改tomcat默認端口號。
修改Tomcat的配置文件。找到tomcat配置文件里的server.xml修改端口號
例如:D:\itek\apache-tomcat-7.0.67\conf\server.xml
<Connector port="8080" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
Connector 節點,將port="8080"中的端口改為一個沒有被占用的端口。