I currently have ZServer running as a service on two machines using the srvany.exe tool from the NT resource kit or from MSDN. Essentially srvany is the actual service and then you tell it via registry settings what other program you want to run. It works good enough for me for the time being. The only problem is that the service stop message does a hard kill on the ZServer process so any last second updates to the Zope DB might be fragmented if it wasn't finished writing, but with the way the DB works at least the DB will still be usable. I am out of the office right now so I can't provide step by step instructions right now. There is a .doc file that comes with srvany.exe that I followed. I specified that Python was the executeable to be run by srvany, the ZServer directory is to be the CWD, and that the command-line should be start.py. Worked first try. Of course the right thing to do would be to integrate native service capabilities into ZServer itself via the win32api packages. That way ZServer could shhutdown gracefully and could send meaningful things to the event log. But srvany is good enough for alpha level, non-production servers. And I havn't had any problems to speak of dealing with running it as a service. -- Robin Dunn robin@AllDunn.com http://AllDunn.com/robin/ http://AllDunn.com/wxPython/ Check it out! Try http://AllDunn.com/laughworks/ for a good laugh. -----Original Message----- From: Dick Wall <dick.wall@mediamail.telinet.com> To: zope@zope.org <zope@zope.org> Date: Tuesday, March 09, 1999 5:09 AM Subject: [Zope] ZServer as a windows NT service?
Hi all,
I have been using python for years, and zope for a few months now (lovely), ZServer for weeks, but Windows NT? Not long enough to understand the differences between services and ordinary process (give me a break, I am heavily from a Un*x background) :-).
I know when I installed the binary version of Zope on the windows machine here it gave me a service in the services list which I can activate on startup. However, I am betting that this runs the ZopeHTTPServer, not the ZServer which I got as a separate download. I have everything working just lovely with the ZServer now, but it needs to be run as an NT service (and respond to start and stop signals, etc) at which point I freely admit my own inadequacies in this area.
Now my question. How can I do what I need to do. Is it simply a case of redirecting a python 'shell' file used by the service to the start.py in the ZServer module, or is there more to it? If it is this simple, which python 'shell' file do I use? If it is not this simple, can someone send me basic instructions on how to do it (why is NT like this - give me an rc.local file any day - I know where I stand with that stuff).
Thanks in advance.
Dick
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(For developer-specific issues, use the companion list, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )