Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Service stuck at Starting
I have a Standalone Application (Indy) that runs fine when compiled as an application but when compiled as a service (TIWStart.Execute(False); ) the service starts, the IWServerControllerBaseConfig runs and exits, the IWServerControllerBaseCreate runs and exits.  There are timers on the form and they run and execute, but the Service never shows in the service manager as Running, only sits at Starting, and browser connections cannot be made to the service.  Any ideas?  What has to finish for the service to be "started"?

BTW, This was an update to a service that has been in operational use for 5 years.  It is to be version 2.3 but this is the first time I have had this issue.  I made updates but can't figure out what could be causing it - and when I disable some changes or replace the items with what was used before it still happens.  I can compile version 2.2 with the new Intraweb and it runs as a service fine, so it isn't an Intraweb issue.  I just don't know what to look for that would cause it to not tell Windows it was loaded but that doesn't cause an issue when compiled and run as an app.
Is there an .err file in the directory after the service fails? Also check the windows event log.
(07-10-2020, 03:34 PM)kudzu Wrote: Is there an .err file in the directory after the service fails? Also check the windows event log.
No .err file and no event entries.  The service manager just says error 1053, that it wouldn't start in a timely manner.  It does it even if I only have the TIWStart.Execute(False) in the program source code and remove all events from ServerController.

I just found the problem.  It was in IWServerControllerBaseConfig the line AppName:='MyService';
That one line caused the service to never start...

The Service name installed with Inno was different than what the AppName command was setting it to. That is what caused the problem. When they are the same it works fine. Which is a "Duh" type thing - obvious to anyone. I didn't realize the name was different and Windows doesn't report anything either.

Oh well, live and learn.

Glad you got it fixed. Thanks for the follow up.

Forum Jump:

Users browsing this thread: 1 Guest(s)