Service with startup type automatic doesn't start after reboot

13,424

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

Share:
13,424

Related videos on Youtube

laconicdev
Author by

laconicdev

Updated on September 18, 2022

Comments

  • laconicdev
    laconicdev over 1 year

    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.

    • Werner Henze
      Werner Henze almost 11 years
      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?
    • Mathew Lionnet
      Mathew Lionnet about 7 years
      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.
  • Werner Henze
    Werner Henze almost 11 years
    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.
  • Steve
    Steve almost 11 years
    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.
  • Werner Henze
    Werner Henze almost 11 years
    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.
  • Steve
    Steve almost 11 years
    Hi Werner - I've amended my reply and provided a link, I look forward to your comments, thanks.
  • Mathew Lionnet
    Mathew Lionnet about 7 years
    If he can start it manually the user rights are correct
  • Mathew Lionnet
    Mathew Lionnet about 7 years
    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)
  • Mathew Lionnet
    Mathew Lionnet about 7 years
    Why the downvote, looks like the most likely answer to me