From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1148 Path: news.gmane.org!not-for-mail From: Michael Glaesemann Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: qpsmtpd-forkserver on Mac OS X Date: Wed, 7 Jun 2006 12:36:48 +0900 Message-ID: <75C12523-F011-4682-B172-728336E1B739@seespotcode.net> References: <20060606155758.32069.qmail@3d2f285f0534b6.315fe32.mid.smarden.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v750) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1149651422 19110 80.91.229.2 (7 Jun 2006 03:37:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 7 Jun 2006 03:37:02 +0000 (UTC) Cc: supervision@list.skarnet.org Original-X-From: supervision-return-1384-gcsg-supervision=m.gmane.org@list.skarnet.org Wed Jun 07 05:37:00 2006 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by ciao.gmane.org with smtp (Exim 4.43) id 1Fnoql-00011N-BJ for gcsg-supervision@gmane.org; Wed, 07 Jun 2006 05:36:55 +0200 Original-Received: (qmail 26021 invoked by uid 76); 7 Jun 2006 03:37:16 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 26015 invoked from network); 7 Jun 2006 03:37:16 -0000 In-Reply-To: <20060606155758.32069.qmail@3d2f285f0534b6.315fe32.mid.smarden.org> Original-To: Gerrit Pape X-Mailer: Apple Mail (2.750) Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1148 Archived-At: On Jun 7, 2006, at 0:57 , Gerrit Pape wrote: > This may be another problem, independent from what you report: AFAIK > the poll() implementation of Mac OSX 10.4/Intel is broken, and doesn't > work for named pipes. runit (or better daemontools' iopause()) has an > alternative implementation using select(), but this isn't chosen while > building as poll() is available, but broken. Interesting. Thanks, Gerrit. I didn't save the STDOUT of the installation, so I can't easily verify whether it chose select() or poll(). However, I can verify that I am able to use runit and launchd on this machine to launch a simple Perl script that just logs to syslog. http://www.nntp.perl.org/group/perl.qpsmtpd/5172 People on the qpstmpd mailing list have been giving me lots of helpful suggestions, but no solution yet. >> The qpsmtpd wiki gives instructions[2] on how to configure qpsmtpd- >> forkserver with runit. Here's /var/service/qpsmtpd/run >> >> $ cat /var/service/qpsmtpd/run >> #!/bin/bash >> unset PERL_UNICODE >> /usr/local/qpsmtpd/qpsmtpd-forkserver --detach --user www --port 25 >> $ > > The service daemon must not background (or 'daemonize') when > supervised > by runit, but must run in the foreground. Try to remove the --detach > option. Right. This is the same advice I got from the qpsmtpd list. This has now been fixed in the run script. >> When org.smarden.runit.plist is loaded (either manually using >> launchctl or automatically on server restart), qsmtpd-forkserver >> doesn't appear to work. However, something is definitely running on >> port 25: > > Maybe you didn't stop the daemon you started before from the command > line, and which detached from the terminal and process tree, and now > still listens on the port. I rebooted the machine to make completely sure there wasn't anything else listening on port 25. It looks like for some reason the qpsmptd- forkserver server is quitting immediately after being started, and runit then restarts it (as expected), only to have the qpsmtp daemon quit again. The question now appears to be why the server is quitting. The server runs correctly when launched by the run script (sudo ./run without the runit service running), but not when controlled by runit. :/ >> I don't see anything in /var/log/system.log (where launchd problems >> are logged) or /var/log/mail.log (the qpsmtpd log). When using >> launchd/runit, nothing is logged to /var/log/mail.log at all. (When >> run from the command line, mail.log contains information about >> connections to the smtp server.) > > There should be no difference, I don't know why you get no logs here. The logging bit is still a bit of a mystery to me as well. Though if the qpsmtp daemon is quitting immediately after starting, its not going to be accepting connections/have anything to log anyway. That would explain the empty logs. Thanks for your analysis. It confirms things explained on the qpsmptd list and is helping my understanding of both qpsmptd and runit. Cheers, Michael Glaesemann grzm seespotcode net