steering Zserver startup messages to syslog?
Does anyone know how to send the output of the 'start' script of Zserver to syslog?
See doc/LOGGING.txt Andreas ----- Original Message ----- From: "marc lindahl" <marc@bowery.com> To: <zope@zope.org> Sent: Wednesday, September 19, 2001 12:35 Subject: [Zope] steering Zserver startup messages to syslog?
Does anyone know how to send the output of the 'start' script of Zserver to syslog?
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Great!! But, question: In that file, it says to use syslog you: ZSYSLOG="/dev/log" Is this the same as the -M option of start? (not mentioned) e.g. -M /dev/log ? thanks, Marc
From: "Andreas Jung" <andreas@zope.com> Organization: Zope Corporation Reply-To: "Andreas Jung" <andreas@zope.com> Date: Wed, 19 Sep 2001 13:01:10 -0400 To: "marc lindahl" <marc@bowery.com>, <zope@zope.org> Subject: Re: [Zope] steering Zserver startup messages to syslog?
See doc/LOGGING.txt
Andreas
----- Original Message ----- From: "marc lindahl" <marc@bowery.com> To: <zope@zope.org> Sent: Wednesday, September 19, 2001 12:35 Subject: [Zope] steering Zserver startup messages to syslog?
Does anyone know how to send the output of the 'start' script of Zserver to syslog?
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Marc:
Does anyone know how to send the output of the 'start' script of Zserver to syslog?
I'm running RH 7.1 and grabbed the RPM's from: http://www.taupro.com/Downloads/Zope/Zope241 (..Stay with me on this, you might need it to solve your logging problems...) Comments in the startup file (/var/zope/zserver.sh) read (please read, it's important): # Now that we have fixed syslog.syslog_client to handle RH 6.1's changes, we # can use syslogd for logging. Logging to a remote server using syslogd can # be done by using ZSYSLOG_SERVER instead if ZYSLOG. If you do not define # either of the ZSYSLOG* env vars, logging goes to the file specified by # the -l <file> command argument instead. # Note: For syslog logging to work from the ZServer/medusa subsystem, the # ZSYSLOG variable must now contain the name of the socket to log to, # usually /dev/log on Unix machines. JM 19991104. export ZSYSLOG="/dev/log" #export ZSYSLOG_SERVER="localhost:514" THIS IS MY CONTRIBUTION: Using ZSYSLOG on my RH system resulted in syslog message(s): z2[14150]: Startup exception : error: (111, 'Connection refused') ... and ZServer (Zope) failed to start. I traced this down to Medusa failing to connect to /dev/log, but do not have the expertise to determine why not (any help out there?). My resolution was to leave the variable ZSYSLOG _undefined_ and allow logging to a file, here is the actual startup command: cd $INSTANCE_HOME /usr/bin/env python2.1 z2.py \ -u zope \ -z /usr/share/zope \ -Z /var/run/zwatchdog.pid \ -w 8080 \ -f 8021 \ -m '' \ -l /var/log/zope \ >> /var/log/zope 2>&1 \ & Note: if ZSYSLOG is defined, the "-l" option above is ignored... Also, add a "-D" to enable debugging if you want more info from startup: DISCLAIMER: I've been using ZOPE for, er.. since last night :-/ This message encompasses my entire knowledge base for Zope and is probably totally incorrect, useless, and likely to break stuff... -Ron PS: I'm not impressed with the ease of installation... I guess it's designed to weed out the unfit.
From: theotiwii@earthlink.net
THIS IS MY CONTRIBUTION:
Using ZSYSLOG on my RH system resulted in syslog message(s):
z2[14150]: Startup exception : error: (111, 'Connection refused')
Yes, similar to what I get (not found).
... and ZServer (Zope) failed to start. I traced this down to Medusa failing to connect to /dev/log, but do not have the expertise to determine why not (any help out there?).
That's the issue, in a nutshell.
My resolution was to leave the variable ZSYSLOG _undefined_ and allow logging to a file, here is the actual startup command:
That's not acceptable, I'm doing that now (by piping the output to a file). I want syslog, so I can monitor it via webmin, use logrotate, etc. Anyone out there using syslog with Zserver/Medusa?
marc lindahl writes:
Anyone out there using syslog with Zserver/Medusa? I do and have no problems "/dev/log" accessibility.
Reading the "syslogd" man page, I see that (under Linux) "/dev/log" should be a Unix domain socket from where "syslogd" reads log messages. It may help to delete "/dev/log" and let it recreate by a restart of "syslogd". Dieter
From: Dieter Maurer <dieter@handshake.de> Date: Thu, 20 Sep 2001 22:20:23 +0200 (CEST) To: marc lindahl <marc@bowery.com> Cc: <theotiwii@earthlink.net>, <zope@zope.org> Subject: Re: [Zope] steering Zserver startup messages to syslog?
marc lindahl writes:
Anyone out there using syslog with Zserver/Medusa? I do and have no problems "/dev/log" accessibility.
Reading the "syslogd" man page, I see that (under Linux) "/dev/log" should be a Unix domain socket from where "syslogd" reads log messages.
It may help to delete "/dev/log" and let it recreate by a restart of "syslogd".
Hmmm... for permission reasons? Because other services are logging just fine. This is the error I got when calling start -M /dev/log : 2001-09-19T18:12:29 PANIC(300) z2 Startup exception Traceback (innermost last): File /usr/local/zope/Zope-2.3.3/z2.py, line 563, in ? File /usr/local/zope/Zope-2.3.3/ZServer/DebugLogger.py, line 114, in __init__ IOError: [Errno 6] No such device or address: '/dev/log'
marc lindahl writes:
This is the error I got when calling start -M /dev/log : Die "syslogd" Beschreibung sprach von einem Unix Domain Socket. Erwarten würde ich, dass man einen solchen Socket mit "socket/connet" anspricht (oder über "syslog" Aufrufe) und nicht wie eine Datei einfach öffnet (wie dies "-M" tut).
Dieter
According to babelfish, you wrote: " syslogd " the description spoke of a Unix Domain Socket. I would expect the fact that one " socket/connet " such Socket with responds (or over " syslog " calls) and not like a file simply opens (like this " - M " does). So, you're saying that -M isn't the same as ZSYSLOG, it's opening a file not a socket... Studying z2.py more closely... yes, it's in a different section. So I guess, there's no way to have ZSYSLOG as a command line parameter to z2 or start scripts?
From: Dieter Maurer <dieter@handshake.de> Date: Fri, 21 Sep 2001 22:51:45 +0200 (CEST) To: marc@bowery.com (marc lindahl) Cc: <zope@zope.org> Subject: Re: [Zope] steering Zserver startup messages to syslog?
marc lindahl writes:
This is the error I got when calling start -M /dev/log : Die "syslogd" Beschreibung sprach von einem Unix Domain Socket. Erwarten würde ich, dass man einen solchen Socket mit "socket/connet" anspricht (oder über "syslog" Aufrufe) und nicht wie eine Datei einfach öffnet (wie dies "-M" tut).
Dieter
marc lindahl writes:
So, you're saying that -M isn't the same as ZSYSLOG, it's opening a file no t a socket... "-M" is a special purpose very detailed log facility, more detailed then the standard HTTP log. It does not use "syslog" but directly writes to a file.
Studying z2.py more closely... yes, it's in a different section. So I guess, there's no way to have ZSYSLOG as a command line parameter to z2 or start scripts? I do not know ZSYSLOG, but I would expect that it uses the system "syslog" function to log problems only (and not routinely all HTTP requests). It probably works....
Dieter
participants (4)
-
Andreas Jung -
Dieter Maurer -
marc lindahl -
theotiwii@earthlink.net