java.net.SocketException: Software caused connection abort: socket write error
java.net.ConnectException--这个错误使TOMCAT昏厥!困惑中!
错误如下:
java.net.SocketException: Software caused connection abort: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:508)
at org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:112)
at org.apache.jk.core.MsgContext.action(MsgContext.java:293)
at org.apache.coyote.Response.action(Response.java:182)
at org.apache.coyote.Response.finish(Response.java:304)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:204)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:744)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:674)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:866)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
2006-10-15 16:21:49 org.apache.jk.common.ChannelSocket processConnection
警告: processCallbacks status 2
2006-10-15 16:52:18 org.apache.coyote.http11.Http11BaseProtocol pause
信息: Pausing Coyote HTTP/1.1 on http-8080
2006-10-15 16:52:20 org.apache.catalina.connector.Connector pause
严重: Protocol handler pause failed
java.net.ConnectException: Connection refused: connect
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:463)
at org.apache.jk.common.ChannelSocket.pause(ChannelSocket.java:270)
at org.apache.jk.server.JkMain.pause(JkMain.java:679)
at org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:162)
at org.apache.catalina.connector.Connector.pause(Connector.java:1031)
at org.apache.catalina.core.StandardService.stop(StandardService.java:491)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:714)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:586)
at org.apache.catalina.startup.Catalina.start(Catalina.java:561)
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.start(Bootstrap.java:275)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
问题:
tomcat是5.5.12 jdk是1.5 采用了连接池,maxwait是10000 maxactive是50
服务器过几天就因为如上错误导致用户无法登陆,页面也无法访问。需要重启才行,但只能维持几天而已。
日志中先是报了很多的 java.net.SocketException 警告,虽然数量巨大,但是不影响程序运行,到最后来了个java.net.ConnectException: Connection refused: connect 从此便一蹶不振,挂了。
[解决办法]
问题可能在这里
java.net.ConnectException: Connection refused: connect
连接被拒绝了, 帮楼主想一下, 为什么?
可能服务器没有办法分配更多的连接, 或是服务器负载过重
需要检查下, 在应用中打开的连接, 用完后是否都关闭了?
长时间不活动的连接或异常后都是怎么管理的?
个人认为处理这个问题的关键在于认真执行代码规范,合理管理资源
[解决办法]
好像挺麻烦的,没有做过,帮顶!