[ZCM] [ZC] 1240/12 Wontfix "Cannot run Zope 2.7 as service on NT server"

"Collector: Zope Bugs, Features, and Patches ..." <[email protected]> Mon, 14 May 2007 13:56:59 -0400
Newsgroups gmane.comp.web.zope.devel.collector-monitor
Message-ID <[email protected]>
Issue #1240 Update (Wontfix) "Cannot run Zope 2.7 as service on NT server"
 Status Wontfix, Zope/bug medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/1240

==============================================================
= Wontfix - Entry #12 by ajung on May 14, 2007 1:56 pm

 Status: Pending => Wontfix

Outdated
________________________________________
= Comment - Entry #11 by tim_one on Mar 12, 2004 9:42 pm

win32all is a 3rd-party package of Windows extensions maintained by Mark Hammond:

<http://starship.python.net/crew/mhammond/win32/Downloads.html>

It doesn't ship with the Python from python.org, but does ship with the Python distribution from ActiveState.  Zope for Windows also packages it.

Zope 2.7 shipped with win32all version 163.  I don't know which version of win32all introduced use of this newer Win32 API function, and I don't which version(s) of win32all previous Zopes shipped with.  Mark Hammond would have to answer the former, and Brian Lloyd the latter.

It's *possible* that installing a sufficiently old version of win32all from the download page referenced above would fix your problem:  because of a flaw in the way Zope is set up on Windows, any version of win32all you install yourself will hide the version of win32all Zope intended to use.
________________________________________
= Comment - Entry #10 by roeya on Mar 12, 2004 2:52 am

Yes it is win32all - found this 

http://mail.python.org/pipermail/spambayes-bugs/2003-December/001666.html

regarding the problem with services & win32all & NT 4.0 i found it also refrences to the problem using google and "win32all service NT site:python.org"

Your remark regarding win32all helped and prevented me from trying to fix things that are working well......

This is python problem and it seems that there is no way to run zope 2.7 as service unless I use some program (serveany?) that enables regular processes to be run as services......

well I inform you if it works when I'll return... so you can enter it to FAQ or something like that
________________________________________
= Comment - Entry #9 by roeya on Mar 12, 2004 2:31 am

I'll be out of the office for the next several days so it will take me a week or so to continue

Anyway I never installed python before the only python that I tried to install is the one that comes with zope.

After I could not run zope 2.7 as a service i installed zope 2.6.3 and it runs with no problems

I am new to both python and zope so I must understand - win32all is part of python ?

if this is the case which python is used in zope 2.7 ? 

I will try the dos box but... as I said next time i test it it will be in several days.

Thank you for your help

I will inform you what I found as soon as possible





________________________________________
= Comment - Entry #8 by tim_one on Mar 11, 2004 11:14 am

One other question:  have you installed win32all yourself on this machine, or installed ActiveState's Python (which installs win32all)?

If so, there may be a mismatch between the PythonService.exe Zope ships with and the version of win32all that actually gets used (Zope comes with its own win32all to try to prevent version clashes, but this doesn't actually work if win32all is installed by the user too -- win32all manages to put itself in Python's sys.path before Zope's win32all).
________________________________________
= Comment - Entry #7 by tim_one on Mar 11, 2004 11:06 am

roey, please try it from a DOS box, as suggested earlier.  That's the fastest way to make progress.

My guess:  something changed in win32all, and it's trying to access a Win32 API function that doesn't exist on your flavor of Windows.  You're reporting a DLL message from the Event log, and Zope proper makes no direct use of Windows-specific stuff outside Microsoft's runtime C library.  But win32all is deeply involved with Windows internals, and is used to run the service.

>From a DOS box using Python, we should get a useful traceback at the point things went wrong.
________________________________________
= Comment - Entry #6 by mcdonc on Mar 11, 2004 3:35 am

The service code is in several places.  First, Zope uses Mark Hammond's win32all PythonService.exe executable to register itself as a service.  Win32all ships with Zope within its software home directory.  Secondly, PythonService.exe turns around and calls the "zopeservice.py" file found in an instance home's bin directory to actually start a Zope process.  You can also register unregister, and debug the service using this script.  Lastly, the zopeservice.py code actually uses a bit of code from the Zope software home's "nt_svcutils" package which is located in Zope's software home.  Note also that people have reported problems with Zope services not running properly when there is another Python installed on the system which has its own win32all installed as well as a sitecustomize.py (Zope's Python has its own sitecustomize.py, which isn't recognized in this configuration).

I'd like to fix statements about Zope running ok on Windows NT as a service, as no one has the opportunity to support that platform anymore in a release cycle.  Do you happen to remember where you saw this assertion?
________________________________________
= Comment - Entry #5 by roeya on Mar 11, 2004 3:09 am

Well it worked on version 2.6.3, and I think if you point me to where the relevant service code is (what files/functions).
I think I can find out what went wrong... and fix it if possible.

Anyway as you do not test Zope on NT 4.0 you must remove it from the list of compatible os


________________________________________
= Comment - Entry #4 by mcdonc on Mar 11, 2004 1:15 am

FWIW, the service code was never actually tested (by me, at least) under NT although it was tested on 2K and XP.  I have no access to an NT box either, so if this error continues to occur, unless you're willing to debug it and fix yourself or convince someone who has an NT machine to do so on your behalf, it's likely to not be fixed.
________________________________________
= Comment - Entry #3 by roeya on Mar 10, 2004 11:53 pm

The os is NT 4.0 server sp6 + all relevant security patches + microsoft (there many...)

I'll do the test you described in the next hours and inform you
________________________________________
= Comment - Entry #2 by tim_one on Mar 10, 2004 2:54 pm

More information is needed.  Exactly which version of Windows are you running?  I'll note that I had no problem running Zope 2.7 as a service under Win2K SP4.  If you really meant (one of the many flavors of) NT, sorry, I have no access to one of those.

Does a Zope instance appear as a service in your system Services applet?  If not, then the service didn't manage to get installed.  But if so, what does the applet say its Status and Startup Type are?  I can't guess the answers from what you've revealed so far.

If a Zope instance does appear as a service with startup type Automatic, then that part of installion worked fine.  To proceed from there, open a DOS box, cd to your Zope instance's bin directory, and run

zopeservice.py start

using the python.exe in your Zope installation's (not your Zope instance's) bin directory.  If that fails, you may get a more useful traceback than you can get out of the telegraphic system Event log.
________________________________________
= Request - Entry #1 by Anonymous User on Feb 21, 2004 11:12 pm

this message was written to the event log:
The description for Event ID ( 14 ) in Source ( Python Service ) could not be found. It contains the following insertion string(s): , exceptions.ImportError, DLL load failed: The specified procedure could not be found..
==============================================================