Tag Archives: Idea service startup error

[Solved] Idea service startup error: no buffer space available (maximum connections reached): the solution of connect.

Error message.
Severe : Error starting endpoint
java.io.IOException: Unable to establish loopback connection
at sun.nio.ch.PipeImplInitializer.run(PipeImpl.java:106)atjava.security.AccessController.doPrivileged(NativeMethod)atsun.nio.ch.PipeImpl.&lt;init>(PipeImpl.java:122)atsun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:27)atjava.nio.channels.Pipe.open(Pipe.java:133)atsun.nio.ch.WindowsSelectorImpl.&lt;init>(WindowsSelectorImpl.java:104)atsun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:26)atjava.nio.channels.Selector.open(Selector.java:209)atorg.apache.tomcat.util.net.NioEndpoint Initializer.run(PipeImpl.java:106) at java.security.AccessController.doPrivileged(Native Method) at sun.nio.ch.PipeImpl.&lt;init&>(PipeImpl.java:122) at sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:27) at java.nio.channels.Pipe.open(Pipe.java:133) at sun.nio.ch.WindowsSelectorImpl.&lt;init&>(WindowsSelectorImpl.java:104) at sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:26) at java.nio.channels.Selector.open(Selector.java:209) at org.apache.tomcat.util.net.NioEndpointInitializer.run(PipeImpl.java:106)atjava.security.AccessController.doPrivileged(NativeMethod)atsun.nio.ch.PipeImpl.<init>(PipeImpl.java:122)atsun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:27)atjava.nio.channels.Pipe.open(Pipe.java:133)atsun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:104)atsun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:26)atjava.nio.channels.Selector.open(Selector.java:209)atorg.apache.tomcat.util.net.NioEndpointPoller.(NioEndpoint.java:1472)
at org.apache.tomcat.util.net.NioEndpoint.start(NioEndpoint.java:929)
at org.apache.coyote.http11.Http11NioProtocol.start(Http11NioProtocol.java:168)
at org.apache.catalina.connector.Connector.start(Connector.java:1220)
at org.apache.catalina.core.StandardService.start(StandardService.java:540)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:759)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.net.SocketException: No buffer space available (maximum connections reached?): connect
at sun.nio.ch.Net.connect(Native Method)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:532)
at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:78)
… 20 more
2018-8-20 10:00:21 org.apache.catalina.core.Sta

This is part of the error message, and there is a large string in front of it that is omitted here.

Solution.
This problem has been bothering me for a long time. As soon as tomcat starts, it starts reporting this error. The site could not be accessed. Many people on the Internet said to close the firewall or something, reinstall jdk what have tried, useless. In fact, a careful look at the error log, said: No buffer space available Think about what should be the window in the large link is not closed to cause a lack of space. Check, sure enough, the process is over, but still after a lot of TIME_WAIT state connections are not released, and then check all the time_wait connections.

Solution process.
1. cmd->regedit Enter the registry

2. Go to HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters

3. Create a new DWORD type of registry entry, named: MaxUserPort

4. value data (double-click MaxUserPort prompt to enter the value): 60000 (entered in decimal format, the valid range of this value is 5000-65534)

5. Create a new DWORD type registry entry named: TCPTimedWaitDelay

6. value data: 30 (automatic disconnection time of TIME_WAIT, the default is 4 minutes).

Through the above steps, restart tomcat. problem does not recur, happy !!!!

Conclusion.
Due to a large number of TIME_WAIT connections not being released, the occupied port resources have not been reclaimed and the problem of insufficient buffer space has arisen, and the application is always automatically disconnected.