Msg 21892, Level 16, State 1, Procedure sp_hadr_validate_replica_hosts_as_publishers, Line 70 Unable to query sys.availability_replicas at the availability group primary associated with virtual network name 'AG2Listener' for the server names of the member replicas: error = 18456, error message = Error 18456, Level 14, State 1, Message: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'..',

Recently i have configured Transactional replication on Always on availability group databases. And i came across below errors . My configuration is like below

NODE1-->Orginal Pubisher and Primary replica
NODE2-->Secondary replica
NODE3-->Distributor server and not part of any replica
NODE4--> Subscriber server.

I got this error when i am running the below query after remotely login in into NODE1 server which is primary replica server and from there i connected to NODE3 server which is a distributor and i have ran the query and got the below error.




So this time i have logged into the NODE3 which is a distributor server remotely and ran the below query and again i got the below error.


So again i ran the sp_adddistpublisher command from the distributor server which is NODE3 and i got the below error
After that i have observed one thing on the environment, if you connect to the NODE2(Original Secondary replica) right click on replication tab, you will not find Publisher properties tab, where as you can see the same under NODE1(OriginalPublisher)  that means NODE2 secondary replica is  really promoted as a Publisher but we have not specified distributor server name 
to NODE2. To do this i went to NODE2 secondary replica and right click on Replication folder and click on Configure distribution and choose NODE3 as distributor server,dont chose "This will act as its own distributor". And click on below and next buttons, because of this action what happend is you have cofigured NODE3 as distributor server in NODE2(Secondary replica)



 Once this done you can successfully configure subscription without any problem.

Comments

Popular posts from this blog

System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out

Pre login Handshake or Connection Timeout Period

Transparent Data Encryption(TDE) with Master Key and Certificate in SQL Server