Archived

This forum has been archived. Please start a new discussion on GitHub.

IceBox as manually installed Windows Service: Event ID 7009

Hello,

I am trying to deploy a windows service bypassing IceGridNode for a specific purpose as standalone Icebox Windows Service. I currently use Ice 3.7.2 and my C++ DLL provided to Icebox woks perfectly within IceGridNode integration.

I followed your documentation instruction for manually deployed service and the IceBox Windows Service can be activated with the correct path and correct config file. The Ice::Service::start() method is invoked and runs fine until the end as my logging shows. Nevertheless the Windows Service MessageBox's progress bar popping up at startup hangs for 30sec and terminates with the following error in the Event Log:
Event ID 7009 : A timeout was reached (30000 milliseconds) while waiting for the ServiceName Local service to connect.
Event ID 7000 : The_ServiceName_ service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion.

As a consequence Windows terminates the Icebox without calling the Ice::Service:stop() method.
If I run in a command prompt the command line passed to Windows Service configuration, there is no issue and all features works fine.

So what do I do wrong ? It looks like Windows is awaiting some acknowledgement from Icebox after the start() succeed to flag it as started. Isn't Icebox supposed to do that ? Do I have to use some specific option on the command line or in the config file to inform Icebox that it runs as a Windows service ?

Thanks a lot in advance for your help,
Best regards

Jean-Christophe Bellon

Comments

  • xdm
    xdm La Coruña, Spain

    Hi Jean,

    I tested this with the IceBox/demo from Ice 3.7.4 and the instructions from https://doc.zeroc.com/ice/3.7/platform-specific-features/windows-services/manually-installing-a-service-as-a-windows-service. I didn't find any issues.

    Seems your service is being killed because it takes more than 30 seconds to start, you can add some tracing to your service start to see what's going on, you can also try to increase the start timeout and attach the debugger to the IceBox process to see what is happening.

    Regarding increasing the service start timeout see: https://support.microsoft.com/en-us/help/922918/a-service-does-not-start-and-events-7000-and-7011-are-logged-in-window

  • jcbellon
    edited June 2020

    Hi José and thanks for the fast feedback,

    Thanks also for the link, I've seen it during my troubleshooting before posting here.

    For me service start completed when the implementation of Ice::Service::start() completes. I do print on the standard output at the end and it takes only a few millisec as expected. Is there another step to complete to consider the service started from the Icebox point of view ?

    Regards,

    JC

  • You've spotted the issue !!!!

    It works fine now. I did try the --service but misunderstood it how to correctly make use of it.

    That is a very efficient support and many thanks for it.

    JC