Service with startup type automatic doesn't start after reboot

3

1

We have a custom service that runs on Windows Server 2008 R2 64 bit. It has startup type of "Automatic". However, after a reboot, the service does not start automatically. It does start if we manually start it from the service control panel. What are some possible causes of this, and how can I debug it? I examined the even log and didn't see anything special.

laconicdev

Posted 2012-06-08T15:25:13.770

Reputation: 152

Could be a dependency problem, the service does not declare it and is therefore started too early and fail. There should be error messages for that case in the event log. Besides declaring the dependency marking:http://stackoverflow.com/questions/11015189/automatic-vs-automatic-delayed-start it as auto (delayed) may help.

– eckes – 2017-05-11T04:46:00.410

1Are there system event log entries related to your service? Are you sure that your service is not started? Are you sure that it is not the case that the service starts, has an error and exits immediately? Does your service depend on something (like networking)? Do you know about ServiceGroupOrder/GroupOrderList? – Werner Henze – 2013-08-07T11:43:55.607

Answers

1

Have you tried setting the Startup Type to "Automatic (Delayed Startup)"? Does the service have dependencies?

Logman

Posted 2012-06-08T15:25:13.770

Reputation: 3 452

1Why the downvote, looks like the most likely answer to me – eckes – 2017-05-11T05:36:16.430

0

Have you checked the user account assigned to the service has sufficient privileges to run the service?

A good explanation of user accounts and privileges for Windows services can be found here

Steve

Posted 2012-06-08T15:25:13.770

Reputation: 11

The account needs "logon as service" right, however it has this right since you can start it manually (if you enter a user in the service manager it will add that right) – eckes – 2017-05-11T05:35:46.493

Could you please point to any documentation why that should be the case? Why do you believe that the account the service is running under needs the rights to start the service? The service is not starting itself, so its account does not need the right to start it. – Werner Henze – 2013-08-07T11:39:43.807

It's possible the account assigned to the service does not have the correct permissions to fulfill the functionality of the service. For example, if the service has to write data to a drive but the id used for the service does not have this permission, therefore causing the service to fail upon start up. – Steve – 2013-08-07T13:41:46.350

Yes, this may be, but this is not what you wrote in your answer. Also what you write in your last comment does not match the case of the questioner. He writes that the service does not start if started automatically by Windows. It starts when started manually. Both times the service is running under the same account and will have the same rights and privileges. – Werner Henze – 2013-08-07T13:49:14.050

Hi Werner - I've amended my reply and provided a link, I look forward to your comments, thanks. – Steve – 2013-08-08T15:11:54.827

0

Break it down.

Give the service user admin rights. Does it run?

Then dial it back.

Make sure to add / grant the user logon as a service rights.

Kvad

Posted 2012-06-08T15:25:13.770

Reputation: 451

If he can start it manually the user rights are correct – eckes – 2017-05-11T05:34:41.713