美文网首页
address already in use, the sock

address already in use, the sock

作者: 介可能是只乌龟 | 来源:发表于2019-03-29 11:23 被阅读0次

https://stackoverflow.com/questions/14194783/apache-multiple-requests-with-jmeter
https://www.baselogic.com/2011/11/23/solved-java-net-bindexception-address-use-connect-issue-windows/

原因

Windows 只允许使用1024-5000端口来发送TCP/IP请求,回收这些端口需要花费最多4分钟的时间

解决办法

更改TCP请求的的最大端口数

  • 打开注册表编辑器: Win+R打开运行对话框, 输入regedit
  • 找到注册表项:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
  • 在表项上, 点击右键 -> 新建 -> DWORD值, 并输入以下内容, 并重启电脑:
Name Value Base
MaxUserPort 65534 Decimal
image.png

相关文章

网友评论

      本文标题:address already in use, the sock

      本文链接:https://www.haomeiwen.com/subject/iyzkbqtx.html