Unable To Add Additional DDC(s) To SQL AlwaysOn Setup with an Empty, Unconfigured Site with manually created database using Scripts - Error: The Replica Server Could Not Be Contacted

Unable To Add Additional DDC(s) To SQL AlwaysOn Setup with an Empty, Unconfigured Site with manually created database using Scripts - Error: The Replica Server Could Not Be Contacted

book

Article ID: CTX221547

calendar_today

Updated On:

Description

Adding Additonal XenApp/XenDesktop 7.9 Delivery Controllers into a SQL Always On Setup with an Empty, Unconfigured Site with manually created database using Scripts will fail with error: "The replica server <servername> could not be contacted. Check the database status on the SQL server. Ensure database server allows remote connections and the firewall is not blocking connections"

Resolution

We recommend upgrading to XenApp/XenDesktop 7.11 or Latest Current Release as this issue has been fixed in XenApp/XenDesktop 7.11 and above.

Other Workarounds:
  1. Disable AlwaysOn
  2. Remove your XenApp/XenDesktop Database(s) from the SQL Always On Group. Leave the Database(s) on the primary server and extend your Delivery controllers. After you have extended your site, put the Database(s) back in the Always On Availability Group.

Problem Cause

In this case, since we were creating an empty site and the database was getting created manually using scripts, so replica validation was not done. When the second Delivery Controller is added, it tries to update the replicas, and seems to get the wrong connection string (Derived from the 1st DDC which was used to Create an Empty, Unconfigured Site). 

Studio tries to connect to the replica with just the server name, but needs instance name to be successful. The instance name is being stripped off from the data source and uses the Server Name instead leading to the issue. 

In future relases instance name is added to the servername so that when Studio connects to the replica servers (the AG listeners), it will do so using the correct connection string.

Issue/Introduction

Unable To Add Additional DDC(s) To SQL AlwaysOn Setup with an Empty, Unconfigured with manually created database using Scripts - Error: The Replica Server Could Not Be Contacted