Here is another blog based on client’s interaction via Skype. They informed me that they are trying to execute the command ALTER DATABASE SET PARTNER while attempting to set up mirroring between two servers, we see the following mirroring error recorded in the secondary error log:
2017-03-20 14:44:32.49 spid52 Starting up database ‘PROD’.
2017-03-20 14:44:32.51 spid52 The database ‘PROD’ is marked RESTORING and is in a state that does not allow recovery to be run.
2017-03-20 14:46:13.53 Logon Database Mirroring login attempt by user ‘ASIA\SQL_SERVICE.’ failed with error: ‘Connection handshake failed. Could not send a handshake message because the connection was closed by peer. State 26.’. [CLIENT: 126.96.36.199]
At the same time when we checked on the primary server, we were seeing following messages
2017-03-20 14:45:07.05 spid30s Error: 1443, Severity: 16, State: 2.
2017-03-20 14:45:07.05 spid30s Database mirroring has been terminated for database ‘PROD’. This is an informational message only. No user action is required.
2017-03-20 14:45:50.01 spid47s Error: 1474, Severity: 16, State: 1.
2017-03-20 14:45:50.01 spid47s Database mirroring connection error 4 ‘An error occurred while receiving data: ‘10054(An existing connection was forcibly closed by the remote host.)’.’ for ‘TCP://188.8.131.52:5022’.
Later, we identified that this was caused due to authentication issues of service account from the domain controller.
Before I could do much troubleshooting, their networking team informed that ports were blocked in Active directory so they opened them. I didn’t get much detail from them, but they said networking team easily figured it out.
If you know how to verify it, please share via comments.
Reference: Pinal Dave (http://blog.SQLAuthority.com)
Did anyone figure out how to resolve this before reaching out to networking team?