June 11, 2018 at 9:22 am
Hi All,
Im trying to join a secondary database to ALWAYS on AG but its getting failure with message The Connection to the Primary Replica is not Active. Upon checking i found " An error occurred while receiving data: '10054(An existing connection was forcibly closed by the remote host.)'."
TEST\SRVR1 TCP://TEST.servers.xyz.com:5022 DISCONNECTED An error occurred while receiving data: '10054(An existing connection was forcibly closed by the remote host.)'.
I tried the below steps and it didnt resolve.
1) Enabled Inbound and outbound with 5022
2) Checked the SQL services is running under domain account and executed the grant query.
Regards,
NM
June 12, 2018 at 1:51 am
Need a bit more information. Is this a new database you are trying to join or an existing? What does FCM say about the cluster/listener? If new, did you restore with no recovery and have you taken a log backup and restore from the primary? In your AD, have you given correct rights to the containers so that the listener can mange the nodes? Is the quorum up and running? etc..
June 12, 2018 at 4:22 am
Its an existing database Im trying to join. The cluster and listener is up. Yes the database was restored with no recovery and quorom is up and running.
June 12, 2018 at 4:34 am
Was the latest log restored? You could try to set hadr to resume and see if that helps.
https://www.brentozar.com/archive/2016/06/availability-group-direct-seeding-fix-database-wont-sync/
June 12, 2018 at 8:58 am
check if you can reach other primary node from secondary, check endpoint config on all nodes. , check firewall/ports
June 12, 2018 at 9:05 am
The firewalls and ports are open. I tried HADR resume and got the below error message
Msg 35242, Level 16, State 16, Line 10
Cannot complete this ALTER DATABASE <database-name> SET HADR operation on database 'XXX'. The database is not joined to an availability group. After the database has joined the availability group, retry the command.
I tried ALTER DATABASE [XXX SET HADR AVAILABILITY GROUP = [AG]; and got the below error message.
Msg 35250, Level 16, State 7, Line 12
The connection to the primary replica is not active. The command cannot be processed.
June 13, 2018 at 1:01 am
Have you checked the primary is up and running correctly and that FCM can see both nodes?
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply