【Microsoft 支援】當您嘗試從大於 5000 的 TCP 埠連線時收到錯誤 WSAENOBUFS (10055)
一、轉載原文
When you try to connect from TCP ports greater than 5000 you receive the error 'WSAENOBUFS (10055)'
Symptoms
If you try to set up TCP connections from ports that are greater than 5000, the local computer responds with the following WSAENOBUFS (10055) error message:
An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full.
Resolution
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
The default maximum number of ephemeral TCP ports is 5000 in the products that are included in the "Applies to" section. A new parameter has been added in these products. To increase the maximum number of ephemeral ports, follow these steps:
- Start Registry Editor.
- Locate the following subkey in the registry, and then click Parameters:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
- On the Edit menu, click New, and then add the following registry entry:Value Name: MaxUserPort
Value Type: DWORD
Value data: 65534
Valid Range: 5000-65534 (decimal)
Default: 0x1388 (5000 decimal)
Description: This parameter controls the maximum port number that is used when a program requests any available user port from the system. Typically, ephemeral (short-lived) ports are allocated between the values of 1024 and 5000 inclusive. After the release of security bulletin MS08-037, the behavior of Windows Server 2003 was changed to more closely match that of Windows Server 2008 and Windows Vista. For more information about Microsoft security bulletin MS08-037, click the following article numbers to view the articles in the Microsoft Knowledge Base:
951746 MS08-037: Description of the security update for DNS in Windows Server 2008, in Windows Server 2003, and in Windows 2000 Server (DNS server-side): July 8, 2008
951748 MS08-037: Description of the security update for DNS in Windows Server 2003, in Windows XP, and in Windows 2000 Server (client side): July 8, 2008
953230 MS08-037: Vulnerabilities in DNS could allow spoofing
- Exit Registry Editor, and then restart the computer.
Note An additional TCPTimedWaitDelay registry parameter determines how long a closed port waits until the closed port can be reused.
二、轉載譯文(譯文可能有誤,請參考轉載原文)
當您嘗試從大於 5000 的 TCP 埠連線時收到錯誤 WSAENOBUFS (10055)
症狀
如果您嘗試從大於 5000 的埠 TCP 連線設定,本地計算機響應以下 WSAENOBUFS (10055) 錯誤訊息:
由於系統緩衝區空間不足,或者因為佇列已滿,不能執行套接字上的操作。
解決方案
重要:此部分、 方法或任務包含一些介紹如何修改登錄檔的步驟。但是,如果不正確地修改了登錄檔,可能會出現嚴重的問題。因此,請確保仔細按照下列步驟操作。為增加保護,對其進行修改之前備份登錄檔。然後,您可以在出現問題時還原登錄檔。有關如何備份和還原登錄檔的詳細資訊,請單擊下面的文章編號,以檢視 Microsoft 知識庫中相應的文章:
322756如何備份和還原在 Windows 登錄檔
預設的臨時 TCP 埠的最大數量是 5000"適用於"一節中包含的產品中。在這些產品中新增一個新引數。若要增加的最大臨時埠數,請執行以下步驟:
- 啟動登錄檔編輯器。
- 在登錄檔中,找到以下注冊表子項,然後單擊引數:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
- 在編輯選單上,單擊新建,然後新增以下注冊表項:值的名稱: MaxUserPort
值型別: 雙位元組
值資料: 65534
有效範圍: 5000-65534 (十進位制)
預設值: 0x1388 (5000 十進位制)
說明: 此引數控制的程式從系統請求任何可用的使用者埠時所使用的最大埠號。通常情況下,臨時 (短暫) 埠 1024年的值和含 5000 之間分配。之後釋出的安全公告 MS08-037,Windows Server 2003 的行為已更改,以便更好地匹配,Windows Server 2008 和 Windows Vista。有關 Microsoft 安全公告 MS08-037 的詳細資訊,請單擊下面的文章編號,以檢視 Microsoft 知識庫中相應的文章:
951746 MS08-037: Windows Server 2008 中,Windows Server 2003 和 Windows 2000 伺服器 (DNS 伺服器端) 中的 DNS 安全更新的說明: 2008 年 7 月 8 日
951748 MS08-037: Windows Server 2003 中,在 Windows XP 和 Windows 2000 伺服器 (客戶端) 中的 DNS 安全更新的說明: 2008 年 7 月 8 日
953230 MS08-037: 在 DNS 中的漏洞可能允許欺騙
- 退出登錄檔編輯器,然後重新啟動計算機。
注意:一個附加的 TCPTimedWaitDelay 登錄檔引數確定多長時間關閉的埠將等待,直到關閉的埠可以重複使用。