[python-win32] NT Service not re-startable after reboot

Mark Hammond mhammond at skippinet.com.au
Thu Mar 16 23:18:28 CET 2006


I'm afraid I've no idea.  The first thing to check is that username
configured to use the service, and check that the service does not rely on
any network shares or similar.  Most service problems relate to this (eg,
trying to run a service from a mapped drive as the LocalSystem account
doomed to failure.

After that, I'd suggest importing win32traceutil early in your program and
trying to determine if you module is being entered at all.  However, that
seems unlikely - once the service framework gets to the point it tries to
import your module, it should also be at the point where it can correctly
log any Python errors caused by the import and write them to the event log.

Good luck!

Mark

> -----Original Message-----
> From: python-win32-bounces at python.org
> [mailto:python-win32-bounces at python.org]On Behalf Of Robert Brewer
> Sent: Friday, 17 March 2006 7:26 AM
> To: python-win32 at python.org
> Subject: [python-win32] NT Service not re-startable after reboot
>
>
> I have a Python service (vmpro_pager.py) which worked fine when I wrote
> it a month ago. You can see the complete source code here:
> http://projects.amor.org/misc/browser/vmpro_pager.py It runs an SMTP
> proxy to clean up SMTP messages from a sender which is not compliant
> with the SMTP spec. Today, we found out that the service was not
> running, and had not been running for some time; my best guess is since
> the first reboot after the service was installed.
>
> Attempts to remove the service via "vmpro_pager.py remove" failed,
> complaining that no such service was installed. After manually deleting
> the appropriate registry keys, I am able to run "vmpro_pager.py install"
> with no problems. However, starting the service from Windows Service
> Manager fails with the message, "Windows could not start the Voicemail
> Pro Email Fixup service on Local Computer. For more information, review
> the System Event Log. If this is a non-Microsoft service, contact the
> service vendor, and refer to service-specific error code 1." The Event
> Log contains a single Error event with the Description: "The Voicemail
> Pro Email Fixup service terminated with service-specific error 1." The
> PYS_SERVICE_STARTED message from SvcDoRun is *not* in the Event Log.
>
> Running the service via "vmpro_pager.py debug", however, works
> perfectly.
>
> Although I'm certainly open to answers of the type, "here's your
> problem..." ;) I'd like to also where I can insert hooks to return an
> error code more-meaningful than "1" in the future.
>
>
> Robert Brewer
> System Architect
> Amor Ministries
> fumanchu at amor.org
>
> _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>



More information about the Python-win32 mailing list