I must admit, that I was facing this issue since a while. I was trying to setup a lab to have a hands on with AlwaysOn feature; however the Availability Group Listeners creation was failing. As I started looking into the SQL Server error log & observed the below error message.
Error: 19476, Severity: 16, State: 4.
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.
From the System event log, below error was reported:
Log Name: System
Event ID: 1194
Task Category: Network Name Resource
Cluster network name resource ‘AGDemoTest_AGDemoTest’ failed to create its associated computer object in domain ‘SKGLAB.LOCAL’ during: Resource online.
The text for the associated error code is: A constraint violation occurred.
Please work with your domain administrator to ensure that:
– The cluster identity ‘WINCLUSTER01$’ has Create Computer Objects permissions. By default all computer objects are created in the same container as the cluster identity ‘WINCLUSTER01$’.
– The quota for computer objects has not been reached.
– If there is an existing computer object, verify the Cluster Identity ‘WINCLUSTER01$’ has ‘Full Control’ permission to that computer object using the Active Directory Users and Computers tool.
While I was reading the above error message, the highlighted text (in blue) caught my eyes. I remembered that, if the virtual computer object was not prestaged, by default, it used to create the computer object in the default Computers container in AD (till Windows Server 2008 R2). A little search over internet points me to a post on the PFE Platform blog, which states that starting Windows server 2012 (& onwards), all the virtual computer objects are created in the same OU, where the cluster computer object resides. So in my case, the cluster computer object was unable to create the virtual computer object in the same OU due to lack of permission, which in turns failing the Availability Group Listener creation . As suggested in the above reference post, after providing the necessary permission, I was able to create the availability group listener.
Hope, this may help someone. Happy Learning !!!