Share via


AzurePack: Unable to create database when using SQL High Availability group (AlwaysOn)- Part 1

 

Recently I came across this issue and thought of sharing it.

We have setup WAP environment and configured a SQL resource provider.
When a tenant is created a new database, it fails with following message logged in tenant portal event logs:

Log Name: Microsoft-WindowsAzurePack-MgmtSvc-TenantSite/Operational
Source: Microsoft-WindowsAzurePack-MgmtSvc-TenantSite
Date: xxxx
Event ID: 12
Task Category: (65522)
Level: Error
Keywords: None
User: IIS APPPOOL\MgmtSvc-TenantSite
Computer: xxxx
Description:
Error:JsonException: Unable to create the database 'test'. Please try again later. If the problem persists, please contact support.

Assessment:

The reason for this issue was Continuous availability option that is introduced in file cluster on Windows Server 2012 R2.

Due to this option, client will keep retrying to connect to file share for 60 sec and in the meanwhile tenant portal will timeout (timeout value is 30 sec).

We could verify this behavior looking at network traces on file share server.

Solution:

Please check the properties of the file share that has been configured for SQL High availability group.

Make sure that “Continuous Availability” option is disabled for the file share.

image

Also verify that following registry key is added on both the nodes of SQL cluster:

Registry Key:

- Path: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanWorkStation\Parameters

- Key: DisableCARetryOnInitialConnect

- Value: 1