none
Service won't start. Error 1053 (timeout) comes up within 2 seconds, but timeout set for much longer RRS feed

  • Question

  • I have a set of services on a Windows Server 2012 R@ server that I created myself, but when I try to start the service I get the following message:

    Error 1053: The service did not respond to the start or control request in a timely fashion.

    In the System Event Log, I see the following Error event with Service Control Manager as the source and Event ID 7009:

    A timeout was reached (30000 milliseconds) while waiting for the <service name> service to connect.

    The problem is that the error comes up within 2 seconds of when I try to start the service. I tried extending the timeout period to 240000 milliseconds in the Registry, but not only does the service still fail to start, but the Event Log entry reads the same.

    I'm prepared to delete and re-create these services, but I'd like to know if there is a fix for this so I don't have to do that. Can someone please shed some light on this? Thank you in advance for any assistance you can provide.

    Wednesday, September 12, 2018 7:04 PM

Answers

  • I found the answer and will record it here for anyone else who happens to need it.

    I used the Server 2003 Resource Kit tools as described in this article:

    https://support.microsoft.com/en-us/help/137890/how-to-create-a-user-defined-service

    I hadn't tried that before because I had read an article that said the 2003 tools wouldn't work on Server 2012 R2.

    thanks to everyone for your advice.

    • Marked as answer by TimKY-IT Monday, September 17, 2018 5:30 PM
    Monday, September 17, 2018 5:30 PM

All replies

  • Development issues are better addressed somewhere on MSDN, possibly over here.

    https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/home?forum=windowsgeneraldevelopmentissues

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Wednesday, September 12, 2018 7:42 PM
  • Hi TimKY,

    Since you have extended the timeout, three is great chance that something went wrong with your services.

    Under this circumstance, the appropriate solution is that you can re-create your service one by one to rule out the healthy services.

    Once you find the problematic service, you can reinstall or re-create this service.

    I hope this solution can help you.

    Best regards,

    Cora


    Please remember to mark the reply as an answer if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com


    Thursday, September 13, 2018 4:59 AM
    Moderator
  • I've removed and re-added all of the services I was trying to add, but they're still giving me the same error. I've checked the service logon account to make sure it has the proper permissions to the files related to the service that it needs to run. I've also made sure that the folder where the files are is included in the PATH variable. finally, I've run the file that the service is designed to govern and it runs without errors. If you can help but need more information, please let me know. Thank you.
    Friday, September 14, 2018 1:31 PM
  • I would take Dave advise and post to the development forum, as in your service you must handle all service task

    See there for an exemple; https://docs.microsoft.com/en-us/windows/desktop/services/svc-cpp You see the srvhandler section, which in turn will trigger the timeout you face if windows don't receive update from the handler function.


    Regards, Philippe

    Don't forget to mark as answer or vote as helpful to help identify good information. ( linkedin endorsement never hurt too :o) )

    Answer an interesting question ? Create a wiki article about it!

    Friday, September 14, 2018 1:58 PM
    Moderator
  • I've asked the question at the dev forum, but the service was created by a simple Powershell command and is not part of any other code, and the only suggestion I've gotten from that forum so far is to run debug on the program, but the program that the service is pointed to runs from a command prompt just fine.
    Friday, September 14, 2018 4:10 PM
  • Not all programs can run as a service. May need to contact the application developer for further assistance.

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Friday, September 14, 2018 4:13 PM
  • Hi TimKY,

    Since the solution got from the MSDN cannot help you, right now it is advisable to check how your code works and to find the root cause of this issue. Here is the link where you can get more help:  

    https://support.microsoft.com/en-us/help/4051701/global-customer-service-phone-numbers

    If anything is unclear, please feel free to let me know.

    -------------------------------------------------------------------------

    Best regards,
    Cora
    Please remember to mark the reply as an answer if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, September 17, 2018 6:45 AM
    Moderator
  • I found the answer and will record it here for anyone else who happens to need it.

    I used the Server 2003 Resource Kit tools as described in this article:

    https://support.microsoft.com/en-us/help/137890/how-to-create-a-user-defined-service

    I hadn't tried that before because I had read an article that said the 2003 tools wouldn't work on Server 2012 R2.

    thanks to everyone for your advice.

    • Marked as answer by TimKY-IT Monday, September 17, 2018 5:30 PM
    Monday, September 17, 2018 5:30 PM
  • Hi,
    I am glad to hear that your issue was successfully resolved. 
    If there is anything else we can do for you, please feel free to post in the forum.

    Best regards,
    Cora
    Please remember to mark the reply as an answer if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Sunday, September 23, 2018 8:41 PM
    Moderator