[ZODB-Dev] zeo, data.fs permissions

Jeremy Hylton jeremy@zope.com
Wed, 4 Sep 2002 08:04:02 -0400


>>>>> "MM" == Mark McEahern <mark@mceahern.com> writes:

  MM> I assume /var/zope/ is a remnant of the Zope SRPM I used to
  MM> build the Zope RPM.  Since I'm a relative newbie in both Linux
  MM> and Zope, I don't know exactly what part of the SRPM.  Probably
  MM> the thing they call the spec, but I don't know yet how to read,
  MM> modify that.  So I'll most likely take Guido's advice to scrap
  MM> the whole RPM thing for now.  ;-)

The spec probably did say to build everything in /var/zope.

  MM> Here's one useful bit of information.  When I look at my Zope
  MM> through the ZMI, the control panel says that INSTANCE_HOME is
  MM> /var/zope.  I found myself thinking, "Well, if Zope isn't
  MM> reading the /usr/share/zope/custom_zodb.py, what if I put
  MM> custom_zodb.py in /var/zope?"  It sure did read it.  But now
  MM> when I try to access http://localhost:8080/manage, the server
  MM> times out.

That's progress!   Did you use the same network for the client and the
server?  You may have configured one to use the loopback interface and
one to use the ethernet interface.

  >> It is clear that ZEO is using /usr/share/zope at any rate, since
  >> you found permissions problems.  I guess the question should be:
  >> How is the Zope service getting started?  What code runs when you
  >> do "/sbin/service zope start" and why does it insist on using
  >> /var/zope?

  MM> That's a shell script in /etc/init.d/zope, presumably installed
  MM> by the Zope RPM (and appended to the bottom of this message,
  MM> fwiw).  It does indeed set INSTANCE_HOME=/var/zope.  Is that
  MM> foobar?

If you want to use /usr/share/zope as your instance home, then yes.
If you want to use /var/zope, then you should stop putting things in
/usr/share/zope :-).  One way or another, you need to get all the
scripts to agree on one location.

  >> Also, you should be able to read the log files in
  >> /usr/share/zope/var to see if ZEO is working correctly.  The
  >> server log should contain a log entry for every connection; like
  >> this: "connect from ('127.0.0.1', 12034): ...".

  MM> I'm still trying to figure out the logging.  Reading LOGGING.txt
  MM> shed some light on it.  What controls the ZEO logs -- are they
  MM> distinct from Zope logs?

ZEO and Zope use the same logging software, but that doesn't
necessarily mean they share the same logs.  The logging is controlled
by two environment variables -- STUPID_LOG_FILE and
STUPID_LOG_SEVERITY.  Set the first one to a filename (or '' to mean
stderr) and the logs from the process will get written to that file.
It's possible to direct Zope and ZEO logs to different files using
different values for STUPID_LOG_FILE.  

The STUPID_LOG_SEVERITY affects the amount of logging that get's
done.  The default is 0, but you can set it to one of -100, -200, and
-300 to get more verbose logging.  For ZEO, less than -100 is probably
only useful to people who know the code inside out.

Jeremy