当您尝试从大于 5000 的 TCP 端口连接时您会收到错误 WSAENOBUFS (10055)

来源:互联网 发布:淘宝免单活动 编辑:程序博客网 时间:2024/06/05 10:49

         如果您尝试设置大于 5000 的端口的 TCP 连接,本地计算机的响应与下面的 WSAENOBUFS (10055) 错误消息:由于系统缓冲区空间不足或列队已满,不能执行套接字上的操作。

      解决方案
  
     此部分、 方法或任务包含一些介绍如何修改注册表的步骤。但是,如果不正确地修改了注册表,可能会出现严重的问题。因此,请确保仔细按照下列步骤操作。为增加保护,对其进行修改之前备份注册表。然后,您可以在出现问题时还原注册表。有关如何备份和还原注册表的详细信息,请单击下面的文章编号,以查看 Microsoft 知识库中相应的文章:
322756

如何在 Windows 中备份和还原注册表

默认的临时 TCP 端口的最大数目是 5000"适用于"一节中包含的产品中。已在这些产品中添加新参数。若要增加临时端口的最大数目,请按照下列步骤操作:1.启动注册表编辑器。
2.在注册表中,找到以下注册表子项,然后单击参数:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

3.在编辑菜单上,单击新建,然后添加以下注册表项:
值名称: MaxUserPort
值类型: 双字节
数值数据: 65534
有效范围: 5000-65534 (十进制)
默认值: 0x1388 (5000 十进制)
说明: 该参数控制的程序从系统请求任何可用的用户端口时所使用的最大端口号。通常情况下,暂时的 (短期) 端口 1024年的值包括 5000 之间分配。之后发布的安全公告 MS08-037 中,Windows Server 2003 的行为已更改,以便更好地匹配,Windows Server 2008 和 Windows Vista。Microsoft 安全公告 MS08-037 的详细信息,请单击下面的文章编号,以查看 Microsoft 知识库中相应的文章:
951746

对于 Windows Server 2008 中,Windows Server 2003 中,并在 Windows 2000 服务器 (DNS 服务器端) 的 DNS 安全更新的 MS08-037: 说明: 2008 年 7 月 8 日
951748

 对于 Windows Server 2003 中,在 Windows XP 中,并在 Windows 2000 服务器 (客户端) 的 DNS 安全更新的 MS08-037: 说明: 2008 年 7 月 8 日
953230

 MS08-037: 在 DNS 中的漏洞可能允许欺骗


Change the timeout on the connections from 240 seconds (the default) to any length from 30 seconds to 300 seconds. Use theTcpTimedWaitDelay registry parameter to change this value. To do this, start Registry Editor (Regedt32.exe), locate the following key in the registry, and then modify the value:

HKEY_LOCAL_MACHINE\System\CurrectControlSet\services\Tcpip\Parameters

TcpTimedWaitDelay

Key: Tcpip\Parameters
Value Type: REG_DWORD-time in seconds
Valid Range: 30-300 (decimal)
Default: 0xF0 (240 decimal)

Description
:This parameter determines the length of time that a connection stays in the TIME_WAIT state when the connection is being closed. While a connection is in the TIME_WAIT state, the socket pair cannot be reused. For more information, see RFC 793.


4.退出注册表编辑器,然后重新启动计算机。
注意其他的 TCPTimedWaitDelay 注册表参数确定多长时间关闭的端口将等待,直到可以重复使用已关闭的端口。

 

    转自:http://support.microsoft.com/kb/Q196271

               http://support.microsoft.com/kb/319502

              http://www.cnblogs.com/tianzhiliang/articles/2400176.html

 


原创粉丝点击