Recently, I was installing a SQL Server Availability Group on two VMs to verify some open questions I had. And I am surprised that the installation went pretty smoothly. But when I tried to create the availability group I got the following error message.
Failed to bring availability group ‘<availability group name>’ online. The operation timed out. Verify that the local Windows Server Failover Clustering (WSFC) node is online. Then verify that the availability group resource exists in the WSFC cluster. If the problem persists, you might need to drop the availability group and create it again.
The message seemed to be pretty precise and I started verifying my WSFC configuration but unfortunately I couldn’t find any mistakes there. After searching for a while I found the following support post: http://support.microsoft.com/kb/2847723 It describes exactly my problem and the only thing I had to do was executing the following script:
CREATE LOGIN [NT AUTHORITY\SYSTEM] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
GRANT ALTER ANY AVAILABILITY GROUP TO [NT AUTHORITY\SYSTEM]
GRANT CONNECT SQL TO [NT AUTHORITY\SYSTEM]
GRANT VIEW SERVER STATE TO [NT AUTHORITY\SYSTEM]
It fixed the problem and I was able to create my availability group without any problems.