One of my clients contacted me for quick On-Demand consulting. They were working under close deadlines and delivering the solution on time was critical for their success. They contacted me and explained that they were having trouble creating a listener for their two nodes AlwaysOn Availability Group. The error message which they received from T-SQL is below. Let us learn how we can fix error related to Windows Server Failover Clustering.
Msg 41009, Level 16, State 7, Line 126
The Windows Server Failover Clustering (WSFC) resource control API returned error code 5057. The WSFC service may not be running or may not be accessible in its current state, or the specified arguments are invalid. For information about this error code, see “System Error Codes” in the Windows Development documentation.
Msg 19476, Level 16, State 3, Line 126
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.
If we really see there are three error messages but first one is having more details. In one of my earlier blog I explained that whenever there are any issues related to cluster resource, we should always look at cluster log. If you are not sure how to generate cluster logs, read my earlier blog on the same topic.
We looked at cluster log to see what messages we see there at the same time. I have trimmed the log by removing date time field from the log.
The cluster log has these errors:
- IP Address <PRODAG_126.96.36.199>: IpaValidatePrivateResProperties: IP address 188.8.131.52 was detected on the network.
- Error 5057 from ResourceControl for resource PRODAG_184.108.40.206.
If we do NET HELPMSG for 5057, we get below
From above information, we can conclude that error appears because we are trying to use an IP address for the listener which is already in use. We need to use an unused IP and that should fix the issue.
Reference: Pinal Dave (https://blog.sqlauthority.com)