I'm seeing this Always On Availability Group behavior around every 5 minutes. And it is not like the AG is moving back and forth - it is always saying it failed over the BARDB02.
The AG group FOOAG01 failed over to BARDB02.
In the SQL error log, I see this error, which I think is related:
messageDatabase Mirroring login attempt by user 'MYAD\BARDB03$.' failed with error:
'Connection handshake failed.
The login 'MYAD\BARDB03$' does not have CONNECT permission on the endpoint. State 84.'. [CLIENT: XXX.XX.XXX.XX]
Thing is, I can't find a SQL login matching the one in the error. I can't even find a Windows account on the host matching the name.
I Googled the error and found the following suggested fix:
GRANT CONNECT ON ENDPOINT::hadr_endpoint TO [MYAD\BARDB03$]
But I get this error on both the primary and the secondary:
Msg 15151, Level 16, State 1, Line 1
Cannot find the login 'MYAD\BARDB03$', because it does not exist or you do not have permission.
Does anyone know how to track down where this account is, and (if necessary) how to replace it with another account? At the moment, I don't know where else to look.
Thanks for any help.