CMS Mirror installation fails after relocation due to old SQL witness reference

Hey all I ran into an interesting one and I’d figure I’d put it up here to hopefully help someone else
At a recent deployment I’ve moved the CMS from an old Skype4B Enterprise Edition Pool to my freshly built Skype4B Enterprise Pool successfully.
However when attempting to install the mirrored DB using either Topology Builder (Install Databases) or PowerShell (Install-CsMirrorDatabase) the operation would fail with the error message
1
2
3
4
5
6
7
WARNING: Install-CsMirrorDatabase failed.
WARNING: Detailed results can be found at
"C:\Users\(username)\AppData\Local\Temp\2\Install-CsMirrorDatabase-273bc470-904f-4056-a29c-06c77174572a.html".
Install-CsMirrorDatabase : Command execution failed: Cannot setup mirroring because there is an error validating the
version of the SQL Server instances. Verify that the SQL Server instances are available. Exception:
Microsoft.SqlServer.Management.Common.ConnectionFailureException: Failed to connect to server
SFBSQLW.contoso.com. ---> System.Data.SqlClient.SqlException: Login failed for user '(username)'.

Looking into it I see that Install-CsMirrorDatabase is trying to connect to the OLD witness server (SFBSQLW.contoso.com) which no-one has access too (it was setup by a previous contractor and misconfigured)
I double checked the Pool configuration in topo builder and there is no reference to the old SQL Witness in the new pool at all. Yet when I look at the SQL Witness it lists the new Pool as a dependent pool
New Pool Config showing SFB-SQL-PR03 as defined witness server

Old SQL Witness showing the new pool (SFBFEPool01.Contoso.com) depends on SFBSQLW.contoso.com

(Skypepool01 is the old pool)
I’ve also checked the CMS moved sucsessfully by looking at Get-CsManagementConnection and it is as expected the new pool
Replication is returning true for all frontends as expected
Reading through the Install-CsMirrorDatabase output. I can see it believes the witness is SFBSQLW and not SFB-SQL-PR03

Solution

In the end to fix this one was actually quite simple.
  • Remove the SQL Witness from the new pool in topology builder and publish the topology.

  • Once the topology is published, the database should install automatically

  • Re-enable Mirroring and publish the Topology
  • Check the Mirroring state with Get-CsDatabaseMirrorState

  •  Using Sql Management Studio, Confirm the witness is present on LIS and XDS

Thats it. You’re up and running!
Hope this helps!

2 thoughts on “CMS Mirror installation fails after relocation due to old SQL witness reference

  1. Steve B

    Just a heads up your last screen shot has missed a single bit of identifying info blurring – under Server Network Address – Principle.

    Reply
    1. James "UcMadScientist" ArberJames Arber Post author

      Thanks for the heads up. I’m usually pretty good at filtering that out.. Might have to start running OCR on all the images 😀

      Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.