Tomcat啓動報錯:Several ports (8005, 8080, 8009) required by Tomcat v7.0 Server at localhost are already

特別提示:本人博客部分有參考網絡其餘博客,但均是本人親手編寫過並驗證經過。如發現博客有錯誤,請及時提出以避免誤導其餘人,謝謝!歡迎轉載,但記得標明文章出處: http://www.cnblogs.com/mao2080/

一、問題描述

  經過Eclipse啓動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),按照網上的解決辦法改端口也沒有用(經過netstat -ano根本就沒有發現端口被佔用)。html

二、解決辦法

查看logs裏的日誌發現啓動報錯了:java

java.net.SocketException: Unrecognized Windows Sockets error: 10106: create
	at java.net.ServerSocket.createImpl(ServerSocket.java:308)
	at java.net.ServerSocket.getImpl(ServerSocket.java:257)
	at java.net.ServerSocket.bind(ServerSocket.java:376)
	at java.net.ServerSocket.<init>(ServerSocket.java:237)
	at org.apache.catalina.core.StandardServer.await(StandardServer.java:440)
	at org.apache.catalina.startup.Catalina.await(Catalina.java:769)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:715)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:353)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)

  

三、操做步驟

  打開cmd,輸入:netsh winsock reset  而後回車apache

 winsock是Windows網絡編程接口,winsock工做在應用層,它提供與底層傳輸協議無關的高層數據傳輸編程接口 netsh winsock reset 是把它恢復到默認狀態

四、參考網站

     http://www.javashuo.com/article/p-vltlnmjm-z.html編程

相關文章
相關標籤/搜索