This was the first experiment with gMSA account in my lab and I faced an interesting issue. In my lab environment, I have a complete domain server and member servers. Once I configured gMSA for SQL Server service and restarted the machine, SQL Service didn’t start automatically even though it was set for an automatic startup as shown below.
There was no ERRORLOG because SQL didn’t start. Event log showed me a bunch of Errors which I have listed below:
|7038||Service Control Manager||The MSSQL$SQL_XFBIZ service was unable to log on as SQLAuthority\gmsaQUICK$ with the currently configured password due to the following error:|
The specified domain either does not exist or could not be contacted.
To ensure that the service is configured properly, use the Services snap-in in Microsoft Management Console (MMC).
|7034||Service Control Manager||The SQL Server (MSSQLSERVER) service terminated unexpectedly. It has done this 1 time(s).|
|700||Service Control Manager||The MSSQLSERVER service failed to start due to the following error:|
The service did not start due to a logon failure.
The interesting messages out of all are:
- The specified domain either does not exist or could not be contacted.
- The service did not start due to a logon failure.
From the messages its clear that server was not able to contact the domain controller when it was getting started along with server startup. There are few things, which I am aware of, which would help.
- Set SQL Server Service to “Automatic (Delayed Start)” as shown below.
- Using registry editor, set the dependencies of SQL Server service on Netlogon and W32time service. Here are the steps:
- Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLSERVER
- Look for “DependOnService” on the right pane.
- Edit the values and add W32Time and Netlogon as shown below. Note: KEYISO was already there.
- Close the settings and check via services to make sure dependency is set correctly.
After doing above, I never faced the same issue on this server.
Have you ever faced the same issue? Is there any other solution which you found? Please share via comments and I would write a blog with due credit.
Reference: Pinal Dave (https://blog.sqlauthority.com)