win32 extension: rare PythonService problem

Bengt Richter bokr at oz.net
Sun Mar 10 16:55:37 EST 2002


On 10 Mar 2002 14:50:59 GMT, Gordon McMillan <gmcm at hypernet.com> wrote:

>Zihong Lu wrote:
>
>> I use the win32 extension PythonService to write a windows service for
>> our project.  The service runs fine on most NT, win2k machines. 
>> Recently our customers reported that for some PCs, the command "python
>> MyService.py start" returned as usual, no traceback, but the service
>> did not start at all.  
>
>I would suspect permissions. I had a similar experience when 
>moving a service from a test box to prod. Eventually the sys 
>admin created a new account and things started working. As a
>lowly contractor I wasn't allowed to find out what he 
>actually did, though ;-(.
>
Permissions possibly, but I would also check environment, if that's used by
the service program and/or python either on purpose or as a fallback looking
for something.

If you can conveniently create a test service that will write the environment
_it_ sees as a running service to a file, or otherwise make it available to you,
that might tell you something, though it would probably be obvious just from
checking where the environment is defined.

But I'd check the event logs (run "%SystemRoot%"\system32\eventvwr.exe) first
for a clue, since that's easy. If there's a permission problem it may show up.
If not, you could if necessary set up an audit of all accesses to your
service program files and see them in the logs (both sucessful and failing
accesses if you like). (At the same time, you can log who is playing solitaire
on that machine ;-)

Regards,
Bengt Richter




More information about the Python-list mailing list