laogao01200
laogao01200
采纳率80%
2017-09-11 02:49

tomcat:Connection refused: connect什么原因

1
已采纳

我的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 4年前

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

    点赞 评论 复制链接分享

相关推荐