While setting up a SQL AlwaysOn Availability Group I ran into a very interesting problem.
I had created the AG while preparing for an upcoming speaking engagement so I'd setup two VMs (Node A and Node B) and checkpointed them immediately before creating the AG. This way I could just go back to the checkpoint and start the demo during my presentation.
This turned out to be very helpful because for the very first time I ran into an issue setting up a SQL AlwaysOn Availability Group. All previous configurations had gone flawlessly.
After a lot of head scratching and reverting the VMs to try again; the only error I could get from the AG Dashboard is: "This secondary replica is not connected to the primary replica. The connected state is DISCONNECTED." Node B would simply NOT connect to the AG.
Not very helpful.
While searching around for possible solutions I stumbled upon this article discussing troubleshooting SQL AlwaysOn Availability Group joining issues. The author provided a very handy SQL statement to get some additional details about the Availability Group:
select r.replica_server_name, r.endpoint_url,
from sys.dm_hadr_availability_replica_states rs join sys.availability_replicas r
I reverted to my checkpoint and changed the service account to a domain account PRIOR to configuring the AG. The AG configuration completed successfully and the AG shows no issues.