In this post, I’m going to talk an issue that I found when creating an Availability Group (AG) listener by using SQL Server Management Studio's Add Listener dialog box, you may receive below error message that includes information about the cause of the error, which can help you to resolve the issue.
The WSFC cluster could not bring the Network Name resource with DNS name '<DNS name>' online. The DNS name may have been taken or have a conflict with existing name services, or the WSFC cluster service may not be running or may be inaccessible. Use a different DNS name to resolve name conflicts, or check the WSFC cluster log for more information.
The attempt to create the network name and IP address for the listener failed. The WSFC service may not be running or may be inaccessible in its current state, or the values provided for the network name and IP address may be incorrect. Check the state of the WSFC cluster and validate the network name and IP address with the network administrator.
In the below screenshot, when creating an availability group listener “AONLIS” by using SQL Server Management Studio's Add Listener dialog box, I received the error shown.
First, review the data from the Cluster event log. Click on "Start," "All Programs," "Administrative Tools," "Cluster Administrator" to open the Cluster Administrator. Click "File," "Open Connection," enter a cluster name and click "OK" to connect the cluster. Click the clustered events in the console tree on the left-hand side of the Cluster Administrator tool.
In the below screenshot, we see the cause of the problem is attributed to an Active Directory policy that is in effect in my environment. We have reached maximum limit for creating computer accounts allowed to create in this domain.
Next, log into your Active Directory server and perform these steps.
- Click “Start”, select “Run” and enter adsiedit.msc.
- Expand the Domain node and locate the object that begins with “DC=” and contains the domain name of the domain your interested in.
- Right on the “DC=” object and click Properties.
- Locate the ms-DS-MachineAccountQuota attribute on the Attribute Editor tab and click Edit.
In the below screenshot, we see the Machine Account Quota was set to 10.
In the below screenshot, we edit the Machine Account Quota and set the value.
On the Integer Attribute Editor dialog, enter the number of compuer accounts you want users to be able to add. You can enter 0 to prevent users from joining any computer accounts to the domain or clear the value to remove the limit.
Once you’ve entered the appropriate value, click OK to close the Integer Attribute Editor dialog box and OK again to close the Properties box.
In the below screenshot, the Machine Account Quota is set to 15.
Now you can start creating an availability group listener “AONLIS” using SSMS successfully. In below screenshot, created an availability group listener “AONLIS” by using SQL Server Management Studio.
In Active Directory Users and Computers, you can now see AONLIS computer account created.
Connect the SQL Server using the listener name or IP. You will now able to connect SQL Server successfully.
Hopefully this will help some of you resolve the errors you get when creating an AG Listener.
Ganapathi varma Chekuri
Lead SQL DBA, MCP