3

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.

2
  • 1
    Are 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? Commented Aug 7, 2013 at 11:43
  • 1
    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:stackoverflow.com/questions/11015189/… it as auto (delayed) may help.
    – eckes
    Commented May 11, 2017 at 4:46

4 Answers 4

2

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

1
  • 1
    Why the downvote, looks like the most likely answer to me
    – eckes
    Commented May 11, 2017 at 5:36
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

5
  • 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. Commented Aug 7, 2013 at 11:39
  • 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
    Commented Aug 7, 2013 at 13:41
  • 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. Commented Aug 7, 2013 at 13:49
  • Hi Werner - I've amended my reply and provided a link, I look forward to your comments, thanks.
    – Steve
    Commented Aug 8, 2013 at 15: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
    Commented May 11, 2017 at 5:35
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.

1
  • If he can start it manually the user rights are correct
    – eckes
    Commented May 11, 2017 at 5:34
0

The Microsoft Windows Service Control Manager controls the state (i.e., started, stopped, paused, etc.) of all installed Windows services. By default, the Service Control Manager will wait 30,000 milliseconds (30 seconds) for a service to respond. Certain configurations, technical restrictions, or performance issues may result in the service taking longer than 30 seconds to start and report ready to the Service Control Manager.

By editing or creating the ServicesPipeTimeout DWORD value, the Service Control Manager timeout period can be overridden, thereby giving the service more time to start up and report ready to the service.

How to make it ?

  1. Go to Start > Run > and type regedit
  2. Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
  3. With the control folder selected, right click in the pane on the right and select new DWORD Value
  4. Name the new DWORD: ServicesPipeTimeout
  5. Right-click ServicesPipeTimeout, and then click Modify
  6. Click Decimal, type '180000', and then click OK
  7. Restart the computer

Note: The recommendation above increases the timeout to 180,000 milliseconds (3 minutes), but this may need to be increased further depending on your environment. Keep in mind that increasing this value will likely yield longer server boot times.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .