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

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