There are no more endpoints available from the endpoint mapper

這個問題太多的人見過,無論是不是IT人員。

要解釋這個問題,要從Endpoint Mapper 說起。

要解釋Endpoint Mapper,就要從RPC服務說起哦。

So,How RPC works?

See it in MSDN : http://msdn.microsoft.com/en-us/library/aa373935

And,RPC Components includs:

  • MIDL compiler (Microsoft Interface Definition Language)
  • Run-time libraries and header files
  • Name service provider (sometimes referred to as the Locator)
  • Endpoint mapper (sometimes referred to as the port mapper)

    See it in MSDN:http://msdn.microsoft.com/en-us/library/aa374169

    大致瞭解了RPC的工作原理:Client程序調用Client stub 發起、接收、翻譯向Server程序傳遞的數據,Server程序同樣用Stub反方向傳遞結果集。那麼MIDL compiler就是用來創建這個stub的。Unix的port mapper監聽111端口,微軟對自己的RPC Endpoint做了改動,使用135端口監聽。Portmapper 把 RPC UUID轉換成TCP/IP端口號。

    每項 RPC 服務都會在註冊表中爲自己配置一個通用的唯一標識符 (UUID)(類似於全局唯一標識符 GUID)。UUID 是一種常用標識符,各項服務都有一個唯一的 UUID,且在所有平臺上通用。當一項 RPC 服務啓動時,它會獲得一個可用的高端口,並以其 UUID 在該端口註冊。有些服務隨機使用高端口;而有些服務卻每次都儘量使用相同的高端口(如果這些高端口可用)。在服務的生存期內,端口的分配是靜態的。
    當一個客戶端要與某特定 RPC 服務通訊時,它無法事先確定該服務在哪個端口上運行。該客戶端會先建立一個到服務器端口映射器服務(在 135 上)的連接,並利用該服務的 UUID 請求所需服務。端口映射器會將相應的端口號返回給客戶端,然後關閉連接。最後,客戶端利用端口映射器提供的端口號,新建一個到該服務器的連接。
    由於事先無法獲悉 RPC 服務將使用哪個端口,因此防火牆不得不允許所有高端口通過。

    默認情況下,通過 RPC(遠程過程調用)的 Active Directory 複製與 Microsoft Exchange 相同,都是經由使用端口 135 的 RPC 終結點映射器 (RPCSS),通過可用端口動態進行的。與 Microsoft Exchange 一樣,管理員可以覆蓋此功能,並指定所有複製流量通過的端口,從而鎖定此端口。

    The RPC based service registers its tcp/udp service port under a RPC program number with a portmapper running on the same machine. The standard portmapper runs on the well-known service port 111/(udp/tcp).

    The remote RPC client queries the portmapper for a certain RPC program number (along with procedure number and version) and the portmapper returns the previously registered service port to the client.

    MSDN

    Error Message :There are no more endpoints available from the endpoint mapper.

    Explanation : In a distributed (RPC) application, the client called a server endpoint but no server had registered that endpoint.

    所以,在限制防火牆僅允許個別端口後,AD複製失敗並報此錯,就說明FRS每次儘量使用相同的高端口,但是這些應經被註冊了的端口卻在防火牆上被阻止了。Internet Assigned Numbers Authority (IANA) 規定將 49152 - 65535 之間的數字用於專用和動態分配。可以使用下面這些命令來判斷RPC註冊了哪些端口,然後檢查這些端口的狀態:

    portqry -n problem_server -e 135

    如果端口 135 被阻止,將顯示以下內容:

      TCP port 135 (epmap service):NOT LISTENING

    但是,對於這些 RPC 終結點映射程序錯誤,可能是大於 1024 的端口而非端口 135 被阻止。( 從輸出中,您瞭解到 DC 將端口 1094 用於 FRS,將端口 1025、1029 和 6004 用於 Active Directory 複製)。可以再次使用 Portqry 工具檢查這些端口。例如,可以帶 -o 開關使用 Portqry 工具以同時測試所有端口。例如,鍵入 portqry -n problem_server -o 1094,1025,1029,6004

    如果端口均響應爲“LISTENING”,則此問題可能不是由被阻止的端口引起的。如果所有端口均響應爲“NOT LISTENING”,則端口可能被阻止。

    WIKI

    The RPC portmapper (portmap(8)) is a server that converts RPC program numbers into TCP/IP (or UDP/IP) protocol port numbers. It must be running in order to make RPC calls (which is what the NIS/NIS+ client software does) to RPC servers (like a NIS or NIS+ server) on that machine. When an RPC server is started, it will tell portmap what port number it is listening to, and what RPC program numbers it is prepared to serve. When a client wishes to make an RPC call to a given program number, it will first contact portmap on the server machine to determine the port number where RPC packets should be sent.

    http://msdn.microsoft.com/en-us/library/ms838982.aspx

    http://blogs.technet.com/b/networking/archive/2009/02/03/rpc-endpoint-mapper-in-a-network-trace.aspx

    發表評論
    所有評論
    還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
    相關文章