Tomcat-java.net.SocketException: No buffer spac...

问题描述:

      当运行org.apache.catalina.startup.Catalina stopServer,停止tomcat程序时,

      严重: Catalina.stop: java.net.SocketException: No buffer space available (maximum connections reached?): connect

      异常栈:

·········10········20········30········40········50········60········70········80········90········100·······110·······120·······130·······140·······150
  1. at java.net.PlainSocketImpl.socketConnect(Native Method)  
  2. at java.net.PlainSocketImpl.doConnect(Unknown Source)  
  3. at java.net.PlainSocketImpl.connectToAddress(Unknown Source)  
  4. at java.net.PlainSocketImpl.connect(Unknown Source)  
  5. at java.net.SocksSocketImpl.connect(Unknown Source)  
  6. at java.net.Socket.connect(Unknown Source)  
  7. at java.net.Socket.connect(Unknown Source)  
  8. at java.net.Socket.<init>(Unknown Source)  
  9. at java.net.Socket.<init>(Unknown Source)  
  10. at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:421)  
  11. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
  12. at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  
  13. at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
  14. at java.lang.reflect.Method.invoke(Unknown Source)  
  15. at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:337)  
  16. at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:415)  

 

      然后,org.apache.catalina.connector.Connector pause

      严重: Protocol handler pause failed java.net.SocketException: No buffer space available (maximum connections reached?): connect

  1.        at java.net.PlainSocketImpl.socketConnect(Native Method)  
  2. at java.net.PlainSocketImpl.doConnect(Unknown Source)  
  3. at java.net.PlainSocketImpl.connectToAddress(Unknown Source)  
  4. at java.net.PlainSocketImpl.connect(Unknown Source)  
  5. at java.net.SocksSocketImpl.connect(Unknown Source)  
  6. at java.net.Socket.connect(Unknown Source)  
  7. at java.net.Socket.connect(Unknown Source)  
  8. at java.net.Socket.<init>(Unknown Source)  
  9. at java.net.Socket.<init>(Unknown Source)  
  10. at org.apache.jk.common.ChannelSocket.unLockSocket(ChannelSocket.java:486)  
  11. at org.apache.jk.common.ChannelSocket.pause(ChannelSocket.java:283)  
  12. at org.apache.jk.server.JkMain.pause(JkMain.java:681)  
  13. at org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:153)  
  14. at org.apache.catalina.connector.Connector.pause(Connector.java:1073)  
  15. at org.apache.catalina.core.StandardService.stop(StandardService.java:563)  
  16. at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)  
  17. at org.apache.catalina.startup.Catalina.stop(Catalina.java:628)  
  18. at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:671)  

 

重启Tomcat也没用。网上搜了一大圈,大概意思就是Socket没有释放、一些TCP出于TIME_WAIT状态。于是,我重启服务器,然后正常运行下,使用netstat观察,果然没有TIME_WAIT:

 Tomcat-java.net.SocketException: No buffer spac..._第1张图片

于是,将继续观察,假如出了问题,备查出问题端口,再行分析。

你可能感兴趣的:(tomcat,日志,异常)