Tomcat启动报错:Several ports (8005, 8080, 8009) required by Tomcat v7.0 Server at localhost are already in use

Special note: I have reference to other blogs on the Internet in the blog part, but they are all written and verified by myself. If you find any mistakes in the blog, please submit them in time to avoid misleading others, thank you! Welcome to reprint, but remember to indicate the source of the article: http://www.cnblogs.com/mao2080/

1. Problem description

  Start tomcat through Eclipse and report an error: 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), and it is useless to change the port according to the online solution (the port is not occupied at all through netstat -ano).

2. Solutions

Check the logs in the logs and find that the startup reported an error:

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)

  

3. Operation steps

  Open cmd, enter: netsh winsock reset and press Enter

 Winsock is a Windows network programming interface. Winsock works at the application layer. It provides a high-level data transmission programming interface that is independent of the underlying transmission protocol. Netsh winsock reset is to restore it to the default state

4. Reference website

     https://www.cnblogs.com/kofxxf/p/8001477.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324895887&siteId=291194637