[python-win32] win service cant start ? why ?

Mark Hammond mhammond at skippinet.com.au
Mon Nov 8 06:12:03 CET 2004


> Error msg will displayed after i'm trying to stop the
> service that been "started" before. the error msg is :
> " Error stopping service: The service has not been
> started. (1062) " ...

That error message simply means you are trying to stop a service that is not
running.

Using "your_service.py start" does not actually wait until the service
reports it started.  If you have pywin32-203, try "your_service.py --wait=30
start", and see if it reports success.  Alternatively, "net start
service_name" *does* wait.

Thus, if your service has a startup error, these commands aren't likely to
mislead you into believing it has started.  Note however that this could
still happen if your service reported successful started, and then
terminated (due to an error or any other reason).

If there is an unhandled exception in your service (which will cause it to
terminate), you should find the error in the eventlog.

Mark



More information about the Python-win32 mailing list