問題描述: java
當運行org.apache.catalina.startup.Catalina stopServer,中止tomcat程序時, apache
嚴重: Catalina.stop: java.net.SocketException: No buffer space available (maximum connections reached?): connect tomcat
異常棧: 服務器
·········10········20········30········40········50········60········70········80········90········100·······110·······120·······130·······140·······150
- at java.net.PlainSocketImpl.socketConnect(Native Method)
- at java.net.PlainSocketImpl.doConnect(Unknown Source)
- at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
- at java.net.PlainSocketImpl.connect(Unknown Source)
- at java.net.SocksSocketImpl.connect(Unknown Source)
- at java.net.Socket.connect(Unknown Source)
- at java.net.Socket.connect(Unknown Source)
- at java.net.Socket.<init>(Unknown Source)
- at java.net.Socket.<init>(Unknown Source)
- at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:421)
- at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
- at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
- at java.lang.reflect.Method.invoke(Unknown Source)
- at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:337)
- at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)
而後,org.apache.catalina.connector.Connector pause socket
嚴重: Protocol handler pause failed java.net.SocketException: No buffer space available (maximum connections reached?): connect spa
- at java.net.PlainSocketImpl.socketConnect(Native Method)
- at java.net.PlainSocketImpl.doConnect(Unknown Source)
- at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
- at java.net.PlainSocketImpl.connect(Unknown Source)
- at java.net.SocksSocketImpl.connect(Unknown Source)
- at java.net.Socket.connect(Unknown Source)
- at java.net.Socket.connect(Unknown Source)
- at java.net.Socket.<init>(Unknown Source)
- at java.net.Socket.<init>(Unknown Source)
- at org.apache.jk.common.ChannelSocket.unLockSocket(ChannelSocket.java:486)
- at org.apache.jk.common.ChannelSocket.pause(ChannelSocket.java:283)
- at org.apache.jk.server.JkMain.pause(JkMain.java:681)
- at org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:153)
- at org.apache.catalina.connector.Connector.pause(Connector.java:1073)
- at org.apache.catalina.core.StandardService.stop(StandardService.java:563)
- at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
- at org.apache.catalina.startup.Catalina.stop(Catalina.java:628)
- at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:671)
重啓Tomcat也沒用。網上搜了一大圈,大概意思就是Socket沒有釋放、一些TCP出於TIME_WAIT狀態。因而,我重啓服務器,而後正常運行下,使用netstat觀察,果真沒有TIME_WAIT: .net
因而,將繼續觀察,假如出了問題,備查出問題端口,再行分析。 server