> -----Original Message-----
> From: Chris Johnson [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, July 25, 1999 12:24 PM
> To: Alex Miller
> Cc: Qmail
> Subject: Re: supervision of tcpserver qmptd
>
>
> On Sun, Jul 25, 1999 at 12:13:48PM -0400, Alex Miller wrote:
> > I have noticed that my hard disk light clicks on every 2/3 second or so.
> >
> > It seems that a new process that supervises the tcpserver is
> created, then
> > destroyed and created again with a new process number.
> >
> > the "status" file in /var/lock/qmail-qmtpd keeps getting
> recreated, even if
> > I delete it.
> >
> > The "solution", for lack of a better term, maybe "diagnostic
> cure", is to
> > delete the stable process that seems to be spawning the
> flashing process.
> >
> > ps -axw yielded 2 processes almost identical.
> >
> > I kill the one that is stable (and earlier)
> > it'll be something like where 12345 is the PID
> >
> > 12345 supervise /var/lock/qmail-qmtpd tcpserver -u -c40 -u81 -g80 0 qmtp
> > qmail-qmtpd
>
> Look at how you're calling tcpserver: you're not providing an
> argument to the
> -u (the first one), so tcpserver prints an error message (which you're not
> seeing) and exits. supervise notices tcpserver's death and starts
> it again,
> which is what it's supposed to do.
>
> Fix your tcpserver invocation and everything will be okay.
>
> Chris
>


Having installed the memphis rpm the invocation of the tcpserver is
controlled by the following file /etc/rc.d/init.d/qmail-qmtpd.init which is
as follows:

#! /bin/sh -
# $INITDIR/qmail-qmqpd.init
# INITDIR is defined below
# Sun Dec 14 1997 XZ <[EMAIL PROTECTED]> v2.3

# chkconfig: 345 84 49
# description:  Start, stop, restart, reload, and otherwise \
#               signal qmail-qmqpd. \
#               Makes heavy use of parts of DJB's daemontools  package \
#               It also relies upon daemontools.functions for 91.04982% \
#               of the grunt work.
#
# [EMAIL PROTECTED]:
# small fixes and modifications

# customize
QMAILHOME=/var/qmail                # ~qmail
USERID=`id -u qmaild`               # UID to run with
GROUPID=`id -g qmaild`              # GID to run with
PROG=qmail-qmqpd                    # what program?
COMMAND=$PROG                       # command to start $PROG
DIR=/var/lock/$PROG                 # directory for supervise
LOGDIR=/var/log/$PROG               # directory to log to
LOGUSER=qmaill                      # user to own logs
LOGSIZE="-s 1000000"                # size of logfile
CDB=/etc/tcprules.d/$PROG.cdb       # rules file
CONCURRENT=40                       # number of concurrent connections
                                    # (40 is the default of tcpserver)
PORT=628                            # port to watch
VERBOSE=-v                          # use verbose option to tcpserver
INITDIR=/etc/rc.d/init.d            # location of initscripts

# Grab the daemontools init  functions
. $INITDIR/daemontools.functions
export PATH=$QMAILHOME/bin:$PATH

start() {
    if check; then
        echo "$PROG is already running"
    else
        echo -n "Starting $PROG..."
        if [ -e $CDB ]; then
            supervise $DIR \
            tcpserver $VERBOSE -c$CONCURRENT -x $CDB -u$USERID -g$GROUPID 0 $PORT
$COMMAND \
            2>&1| setuser $LOGUSER accustamp \
            | setuser $LOGUSER  cyclog $LOGSIZE $LOGDIR &
        else
            supervise $DIR \
            tcpserver $VERBOSE -c$CONCURRENT  -u$USERID -g$GROUPID 0 $PORT $COMMAND
\
            2>&1 | setuser $LOGUSER accustamp \
            | setuser $LOGUSER  cyclog $LOGSIZE $LOGDIR &
        fi
        echo "done"
    fi
}

case "$1" in
    start)
        start
    ;;
    stop)
        stop
    ;;
    restart)
        restart
    ;;
    status)
        status
    ;;
    help)
        help
    ;;
    *)
        signal $1
    ;;
esac

I think I might be able to figure out how to fix this file so it doesn't
launch a supervised tcpserver with incorrect parameters but it would be
useful to start off with a working one, and then I can try to translate that
into the script.

What does your invocation look like?

It seems to me though that since this script is unmodified from the memphis
rpm that everyone who uses the memphis rpm should have the identical
symptom, or am I missing something?

Alex Miller

Reply via email to