[ZODB-Dev] ZEO question

Chris Withers chrisw@nipltd.com
Fri, 23 Mar 2001 15:01:52 +0000


Jim Fulton wrote:
> 
> It means you aren't running Unix/Linux 

Well, if it's useful, I'll keep trying...
I did get a ZEO client up on a Windows NT box that used a Solaris box as its
storage server.

> Actually, I'm surprised you got this far into the signal handling
> setup code.  Is there a way to send signals on windows? 

Dunno, sorry :-S The closes I can think of is killing processes using the Task
Manager, but I have no idea how (if?) that geenrates a signal to the process
being killed.

> There must
> be I suppose. This code is there to get ZEO to shutdown gracefully
> when killed via a signal (unix kill command).

Okay, I see that now :-)

> OTOH, someone should probably turn the ZEO server into an NT service.

Duncan Booth <duncan@rcp.co.uk> mentioned in a mail on zope-dev that he had, but
I don't know if he's on this list.

> is typically only two directories up.) You can set the INSTANCE_HOME environment
> variable to specify a specific directory. You can also provide
> "INSTANCE_HOME=somedir" as a command-line option.

Cool, so, basically, storage servers listen to INSTANCE_HOME declarations?

> You could change the finally on the next line to an except.

Did that, which resulted in:

Traceback (innermost last):
  File "e:/zope/2.3.1b1/lib/python/ZEO/start.py", line 315, in ?
    if __name__=='__main__': main(sys.argv)
  File "e:/zope/2.3.1b1/lib/python/ZEO/start.py", line 310, in main
    open(zeo_pid,'w').write("%s %s" % (os.getppid(), os.getpid()))
AttributeError: getppid

Which I fixed by changing the above line to:
    try:    ppid=os.getppid()
    except: ppid=''
    open(zeo_pid,'w').write("%s %s" % (ppid, os.getpid()))

...which matches what's in z2.py

...and lo and behold, I appear to have a storage server up and running :-)))

cool,

Chris