Sql-server – SQL Service Using Group Managed Service Account does not start after reboot

service-accountssql serverstartup

We are using group managed service accounts for our SQL Server 2016 servers. For some reason, when we reboot the server, the service does not start and we see this in the event viewer:

The MSSQLSERVER service was unable to log on as ds\gsaNQSQLRSNSVC$ with the currently configured password due to the following error:
The specified domain either does not exist or could not be contacted.

I then go to SSCM and start up the service and it starts up just fine. The workaround for this is to start it with Automatic (Delayed Start). I can't figure out why it won't just start up on reboot. Does anyone know why this is happening?

The DCs are Win 2016 servers. The servers are in AWS and they are in the same VPC, the SQL Server and DC.

Best Answer

The information in Using a gMSA with SQL Server by Wayne Sheffield worked for me with the service issue.

The pitfalls of using a gMSA with SQL Server

As with almost all things, there is inevitably something that doesn’t work correctly. One thing that I found is that when the server is rebooted, the SQL Server services are not restarted. And I’m not the only person that has had this problem. After digging through the Windows event logs, we were able to figure out the issues. The service was not restarting because it was trying to do things before those services had been started. We were able to overcome this issue by creating service dependencies. A service dependency prevents the service (SQL Server) from starting up before other specified services are running.

See the linked article for full details.