I am configuring AlwaysOn in my test environment but getting the following error.

Msg 35250, Level 16, State 7, Line 1
The connection to the primary replica is not active.  The command cannot be processed.

I followed the below link to solve the issue but no luck


I checked the SQL LOG for error in node1 appears as

The Service Broker endpoint is in disabled or stopped state.

checked the same at node2 for error appears as below:

Database Mirroring login attempt failed with error: 'Connection handshake failed. An OS call failed: (80090350) 0x80090350(The system cannot contact a domain controller to service the authentication request. Please try again later.). State 66.'. [CLIENT: my server IP address(node1)].

Kindly check and suggest to move forward.

  • SB error happens a lot and is generally innocuous. As it says it seems to have an issue talking to AD. What happens when you run NETDOM VERIFY (computer_name) from a command prompt? Commented May 23, 2016 at 13:48
  • It says The secure channel from MYMachine to the domain DOM has been verified. The connection is with the machine \\DOMPC.DOM.MYNET.COM. Commented May 24, 2016 at 5:43

1 Answer 1


This is login and permission related error. What kind of account are you using to connect when you build the AOA features? If you are using a domain account you can fix this error it in two ways.

  1. Use the same domain account on all of the participating replicas. If you can't (allowed) change the account you could use the second option
  2. Add the service accounts that you are using on participating servers into the primary replica.

N.B. make sure those accounts have at least a connect permission to the instances

  • We did all the activities which you had mentioned above. But no luck, Getting the same error. FYI - We did Windows Clustering without shared disks and have installed SQL Server 2012 (Standalone Installation) and enabled AlwaysOn from primary replica to secondary replica and getting the error as PRIMARY REPLICA IS NOT ACTIVE. And also it takes more time to join the database to the secondary replica. Commented May 26, 2016 at 4:09
  • 1
    The steps you mentioned looks right. Did you enable Alwayson High Availability features on all participating servers? and also for which account did you grant the connect on endpoint permission? Make sure to do it for the service account. GRANT CONNECT ON ENDPOINT::[HADR_ENDPOINT] TO [ use fully qualified domain name of the service account ] Commented May 26, 2016 at 13:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.