Quantcast
Channel: SQL Archives - SQL Authority with Pinal Dave
Viewing all articles
Browse latest Browse all 594

SQL SERVER – SQL Service Not Getting Started Automatically After Server Reboot While Using gMSA Account

$
0
0

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.

SQL SERVER - SQL Service Not Getting Started Automatically After Server Reboot While Using gMSA Account gMSA-auto-err-01

There was no ERRORLOG because SQL didn’t start. Event log showed me a bunch of Errors which I have listed below:

Event ID Source Details
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:

  1. The specified domain either does not exist or could not be contacted.
  2. The service did not start due to a logon failure.

WORKAROUND/SOLUTION

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.

  1. Set SQL Server Service to “Automatic (Delayed Start)” as shown below.
    SQL SERVER - SQL Service Not Getting Started Automatically After Server Reboot While Using gMSA Account gMSA-auto-err-02
  2. Using registry editor, set the dependencies of SQL Server service on Netlogon and W32time service. Here are the steps:
    1. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLSERVER
    2. Look for “DependOnService” on the right pane.
    3. Edit the values and add W32Time and Netlogon as shown below. Note: KEYISO was already there.
      SQL SERVER - SQL Service Not Getting Started Automatically After Server Reboot While Using gMSA Account gMSA-auto-err-03
    4. Close the settings and check via services to make sure dependency is set correctly.
      SQL SERVER - SQL Service Not Getting Started Automatically After Server Reboot While Using gMSA Account gMSA-auto-err-04

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)

First appeared on SQL SERVER – SQL Service Not Getting Started Automatically After Server Reboot While Using gMSA Account


Viewing all articles
Browse latest Browse all 594

Trending Articles