Windows Services promise 24/7 operation and it can be very frustrating when they don’t start as expected! Here are the top five reasons why a service may fail to launch when your server boots:
Your Windows Service isn’t set to Start Automatically
A window service can be configured NOT to start when your computer reboots. Indeed, a service can be set to startup only on demand, or entirely disabled so it cannot run at all.
To check that your service is properly configured:
Start the Services Control Panel application.
Find your service in the list and double-click it to show its properties.
Ensure that the Startup type field is set to Automatic.
Note that Automatic (Delayed Start), where your service starts 1-2 minutes after all Automatic services have been launched, may also be acceptable.
A Dependent Service Failed to Start
Some windows services depend on other services to support their work. Windows enforces these dependencies when booting. For example, suppose there are two services, A and B, both set to start automatically at boot. If A depends on B, then Windows will launch service B before starting service A. If service B fails to start, Windows will not start service A.
Open your service in services.msc and switch to the Dependencies tab to see if your service relies on others. If so, the problem may be with one of those dependent services.
The Service Account’s Password has Changed
If your service runs in a specific user account, was the password for that account changed recently? If so, you should edit your service and enter the new password (on the Log On tab):
There is a Problem with the Domain Account’s Group Policy
If your service is running in a domain account, ensure that the domain account’s group policy has the “Log on as a service” right. As described in this article, the service may run fine at first but suddenly stop working when the local policy (which has the right) is overwritten by the global policy (which does NOT have the right).
Look for the telltale “The service did not start due to a login failure” message in the Event Logs to identify this situation.
There is another problem, reported in the Event Logs
Your service may be shutting down because it has encountered a fatal error. The devil will be in the details so be sure to scour the Event Logs for any helpful messages from your service.
Your service may also maintain its own log files, separate from what is available in the Event Viewer. Please be sure to consult those as well!
As I understand, it may be caused by my service’s dependency aren’t started when the services tries to start. I don’t know what my service depends on. I tried the workaround by adding windows print spooler as one of my service’s dependencies, since print spooler is one of the services start quite late during the boot-up. Well, the work around doesn’t work neither.
Non of this alternatives worked for me. After many hours, the solution for my case was to turn off “Fast Start” in the “Power and Sleep” advanced settings.