且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

响应代码:非HTTP响应代码:java.net.ConnectException响应消息:非HTTP响应消息:连接超时:connect

更新时间:2021-11-03 15:43:11

问题可能是由于服务器挂起,因此请检查服务器组件的运行状况.

Issue might be due to server hanging, so check the server components health.

否则,您可能会消耗所有临时端口,可以通过调整tcp堆栈来扩展这些临时端口.

Otherwise you could be consuming all ephemeral ports which you can extend by tuning the tcp stacks.

按照Kiril S.的回答,在Windows上是:

As per Kiril S. answer, on windows it would be:

在Windows上:

请按照本指南检查端口是否可能是一个问题:

Follow this guide to check if ports might be an issue:

检查2个参数:

  • MaxUserPort:将其增加到最大65534.
  • TcpTimedWaitDelay,它定义端口在使用后保持TIME_WAIT状态的时间.将该值更改为30

在Linux上:

在sysctl.conf中设置:

Set in sysctl.conf:

net.ipv4.ip_local_port_range = 1025 65000

net.ipv4.ip_local_port_range=1025 65000