LISTENER_IP = ALL not working

Posted on

Question :

I try to create an endpoint specifying to listen on any IP:

CREATE ENDPOINT [Hadr_endpoint] 
    AS TCP (
    LISTENER_PORT = 5022,
    LISTENER_IP = ALL
    )
FOR DATABASE_MIRRORING (
    AUTHENTICATION = CERTIFICATE certificateNameNode1,
    ROLE = ALL,
    ENCRYPTION = REQUIRED ALGORITHM AES
)

But as soon as it is created, I can read on error logs that server is listening on a specific IP, that is the primary replica IP and on port 5022.

Why can’t it listen on any IP? (on other standalone instances it works, but on this Failover Cluster Instance it doesn’t)

I suspect this is preventing my distributed availability group to work, cause I can’t join the secondary AG to it. It says that:

A connection timeout has occurred while attempting to establish a connection to availability replica ‘AG1’ with id [xxxxxxxxx]. Either a networking or firewall issue exists, or the endpoint address provided for the replica is not the database mirroring endpoint of the host server instance.

The connectivity to the primary AG listener from secondary AG is ok, but the listener has a different IP than the primary Replica, and I guess that since the endpoint is listening on a fixed IP it can’t be reached using the listener.

Regards

Answer :

Why can’t it listen on any IP?

Probably the same reason that an FCI is not allowed to listen for client connections on all IPs, only IPs that are dependencies of the instance’s virtual network name.

It creates isolation between FCIs and allows multiple FCIs to use the same ports on their own IP addresses. So each FCI can use 1433 for clients and 5022 for AG replication.

Leave a Reply

Your email address will not be published.