locked
Error 1051 Stop Control has been sent to a service that other running services are dependent on RRS feed

  • Question

  • I have ServiceA, ServiceB, and ServiceC.  ServiceB depends on ServiceA, ServiceC depends on ServiceB.

    Dependency chain:

    ServiceA <- ServiceB <- ServiceC

    When I open Services desktop app, then click on ServiceA and hit restart, I get an error:

    Error 1051 Stop Control has been sent to a service that other running services are dependent on

    The problem is that windows attempts to stop ServiceB before ServiceC.  

    This setup works in pre-Windows 10 systems.  In pre-Windows 10, ServiceC would be stopped first then ServiceB then A.

    I have tried altering the order in which I set the dependencies.  I have tried creating a servicegroup and setting the startup order in the registry under GroupOrderList.  Nothing has any effect, and the restarting always picks the same order and fails.

    From powershell, I can run restart-service ServiceA -force, and all services restart correctly without an error.

    This appears to be an issue with the Windows service manager.


    Wednesday, August 2, 2017 7:15 PM

All replies

  • Hi SummerHudson,

    Thank you for posting here.

    >>When I open windows services, then click on ServiceA and hit restart, I get an error:

    Error 1051 Stop Control has been sent to a service that other running services are dependent on

    How do you stop the windows service? Using C# or other ways?

    >>From powershell, I can run restart-service ServiceA -force, and all services restart correctly without an error.

    In powershell, it provide force parameter to stop dependent service.

    https://4sysops.com/archives/managing-services-the-powershell-way-part-3/

    I am not sure it caused by Windows service manager.

    If you have questions about windows service manager, you could post a new thread in Windows 10 General forum.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Friday, August 4, 2017 6:22 AM
  • I open the windows Services desktop app (Services.msc).  I click on ServiceA in the list and click the Restart Service button.  When I do this, it attempts to stop ServiceB before ServiceC and gives the error. 
    Friday, August 4, 2017 12:36 PM
  • Hi SummerHudson,

    You get support from Windows 10 General forum. I will move this thread to off-topic.

    The Visual C# forum discuss and ask the C# programming language, IDE, libraries, samples and tools.

    If you have some C# programming or code errors, please feel free to contact us.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, August 16, 2017 7:35 AM