2 laogao01200 laogao01200 于 2017.09.11 10:49 提问

tomcat:Connection refused: connect什么原因

我的tomcat.startup.bat后,客户端同时启动1000个以上线程去请求它时,开始运行会有

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.(Unknown Source)

at java.net.Socket.(Unknown Source)

抛出,大家帮分析下是什么原因呢?

我的server.xml中设置maxThreads="500"

acceptCount="500"

1个回答

oyljerry
oyljerry   Ds   Rxr 2017.09.11 11:00
已采纳

1000超过了你的acceptCount等,tomcat拒绝了多的连接请求

Csdn user default icon
上传中...
上传图片
插入图片