PDA

View Full Version : [QMAIL & LOG] Mail Log Impazzito !!!


The X
07-09-2004, 12:12
Sto guardando adesso la cartella /var/log e mi sono accorto ke tutti i files d log mail.* (mail.err mail.info mail.log mail.warn) contengo una riga d'errore ogni secondo che riporta :


qmail: 1091789625.051958 alert: cannot start: qmail-send is already running


A causa d questo ho file d svariati Mb !!!

E' un brutto segno ? Come mai ogni secondo mi genera questo errore ? Non rischia d compromettere le performance del server ?

TNK

#!/bin/sh
07-09-2004, 12:54
io controllerei gli script di avvio di qmail

The X
08-09-2004, 08:10
Originariamente inviato da #!/bin/sh
io controllerei gli script di avvio di qmail

qmail l'ho installato tramite apt-get x cui la teoria mi direbbe ke è tutto a posto...

Ad ogni modo cosa dovrei andare, + o -, in cerca ?

tnk

l.golinelli
08-09-2004, 09:23
Hai problemi con le daemontools per caso? A volte succede se lo lanci con uno script senza daemontools e poi avii anche le daemontools...

The X
08-09-2004, 09:38
Originariamente inviato da l.golinelli
Hai problemi con le daemontools per caso? A volte succede se lo lanci con uno script senza daemontools e poi avii anche le daemontools...

I Daemon Tools li ho installati sempre tramite apt-get (daemontools-run) ma nn mi è totalmente chiaro lo scopo d tali tools x questo motivo come vedo se ho problemi con i daemon e/o se qmail parte correttamente con essi ecc ecc ?

TNK

#!/bin/sh
08-09-2004, 09:48
Originariamente inviato da The X
qmail l'ho installato tramite apt-get x cui la teoria mi direbbe ke è tutto a posto...

Ad ogni modo cosa dovrei andare, + o -, in cerca ?

tnk

allora dovresti vedere come parte qmail e per quale motivo viene lanciato qmail-send + di una volta. da quello che si vede nel log qmail send viene lanciato due vole e la seconda istanza si incavola xchè ne trova già uno che gira.
Devi guardare negli script legge svscan.

#!/bin/sh
08-09-2004, 09:52
Originariamente inviato da The X
I Daemon Tools li ho installati sempre tramite apt-get (daemontools-run) ma nn mi è totalmente chiaro lo scopo d tali tools x questo motivo come vedo se ho problemi con i daemon e/o se qmail parte correttamente con essi ecc ecc ?

TNK

Domandone: se il pacchetto daemontools è fatto tipo quello di gentoo non è che tu hai installato daemontools, qmail e poi hai aggiunto a mano qmail all'avvio? Questo spiegherebbe tutto. In gentoo quando installi qmail ti mette anche gli script al posto giusto per far partire qmail. Questo spiegherebbe tutto.

The X
08-09-2004, 10:10
Originariamente inviato da #!/bin/sh
Domandone: se il pacchetto daemontools è fatto tipo quello di gentoo non è che tu hai installato daemontools, qmail e poi hai aggiunto a mano qmail all'avvio? Questo spiegherebbe tutto. In gentoo quando installi qmail ti mette anche gli script al posto giusto per far partire qmail. Questo spiegherebbe tutto.

Io nn ho aggiunto nulla a mano.. facendo "apt-get install qmail-run" (come spiegato qui http://smarden.org/pape/Debian/qmail/qmail-run.html) lui installa qmail, i daemon-tools e gli script d'avvio....

l.golinelli
08-09-2004, 10:41
Posta /etc/inittab

The X
08-09-2004, 10:46
# /etc/inittab: init(8) configuration.
# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $

# The default runlevel.
id:2:initdefault:

# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS

# What to do in single-user mode.
~~:S:wait:/sbin/sulogin

# /etc/init.d executes the S and K scripts upon change
# of runlevel.
#
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.

l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6
# Normally not reached, but fallthrough in case of emergency.
z6:6:respawn:/sbin/sulogin

# What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

# Action on special keypress (ALT-UpArrow).
#kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work."

# What to do when the power fails/returns.
pf::powerwait:/etc/init.d/powerfail start
pn::powerfailnow:/etc/init.d/powerfail now
po::powerokwait:/etc/init.d/powerfail stop

# /sbin/getty invocations for the runlevels.
#
# The "id" field MUST be the same as the last
# characters of the device (after "tty").
#
# Format:
# <id>:<runlevels>:<action>:<process>
#
# Note that on most Debian systems tty7 is used by the X Window System,
# so if you want to add more getty's go ahead but skip tty7 if you run X.
#
1:2345:respawn:/sbin/getty 38400 tty1
2:23:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3
4:23:respawn:/sbin/getty 38400 tty4
5:23:respawn:/sbin/getty 38400 tty5
6:23:respawn:/sbin/getty 38400 tty6

# Example how to put a getty on a serial line (for a terminal)
#
#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
#T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100

# Example how to put a getty on a modem line.
#
#T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3

#-- daemontools-run begin
SV:123456:respawn:/command/svscanboot
#-- daemontools-run end

l.golinelli
08-09-2004, 11:04
SV:123456:respawn:/command/svscanboot

Le daemontools le usi...
Se usi quelle non usare lo script di avvio altrimenti commenta nell'inittab l'ultima riga...

The X
08-09-2004, 11:29
Originariamente inviato da l.golinelli
SV:123456:respawn:/command/svscanboot

Le daemontools le usi...
Se usi quelle non usare lo script di avvio altrimenti commenta nell'inittab l'ultima riga...

T posto anke lo script d'avvio d qmail ke sta sotto init.d...


#!/bin/sh

# This is the qmailctl script from http://lifewithqmail.org (2.8.2.1.)
# with minor changes for debian. <pape@smarden.org>

# For Red Hat chkconfig
# chkconfig: - 30 80
# description: the qmail MTA

PATH=/command:/var/qmail/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin
export PATH

case "$1" in
start)
echo "Starting qmail"
if svok /service/qmail-send ; then
svc -u /service/qmail-send
else
echo qmail-send service not running
fi
if svok /service/qmail-smtpd ; then
svc -u /service/qmail-smtpd
else
echo qmail-smtpd service not running
fi
if [ -d /var/lock/subsys ]; then
touch /var/lock/subsys/qmail
fi
if svok /service/qmail-pop3d ; then
svc -u /service/qmail-pop3d
else
echo qmail-pop3d supervise not running
fi
;;
stop)
echo "Stopping qmail..."
echo " qmail-smtpd"
svc -d /service/qmail-smtpd
echo " qmail-send"
svc -d /service/qmail-send
if [ -f /var/lock/subsys/qmail ]; then
rm /var/lock/subsys/qmail
fi
echo " qmail-pop3d"
svc -d /service/qmail-pop3d
;;
stat)
svstat /service/qmail-send
svstat /service/qmail-send/log
svstat /service/qmail-smtpd
svstat /service/qmail-smtpd/log
svstat /service/qmail-pop3d
svstat /service/qmail-pop3d/log
qmail-qstat
;;
doqueue|alrm|flush)
echo "Sending ALRM signal to qmail-send."
svc -a /service/qmail-send
;;
queue)
qmail-qstat
qmail-qread
;;
reload|hup)
echo "Sending HUP signal to qmail-send."
svc -h /service/qmail-send
;;
pause)
echo "Pausing qmail-send"
svc -p /service/qmail-send
echo "Pausing qmail-smtpd"
svc -p /service/qmail-smtpd
echo "Pausing qmail-pop3d"
svc -p /service/qmail-pop3d
;;
cont)
echo "Continuing qmail-send"
svc -c /service/qmail-send
echo "Continuing qmail-smtpd"
svc -c /service/qmail-smtpd
echo "Continuing qmail-pop3d"
svc -c /service/qmail-pop3d
;;
restart|force-reload)
echo "Restarting qmail:"
echo "* Stopping qmail-smtpd."
svc -d /service/qmail-smtpd
echo "* Sending qmail-send SIGTERM and restarting."
svc -t /service/qmail-send
echo "* Restarting qmail-smtpd."
svc -u /service/qmail-smtpd
echo "* Restarting qmail-pop3d."
svc -t /service/qmail-pop3d
;;
cdb)
# tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
# chmod 644 /etc/tcp.smtp.cdb
tcprules-smtp
echo "Reloaded /etc/qmail/tcp.smtp."
;;
help)
cat <<HELP
stop -- stops mail service (smtp connections refused, nothing goes out)
start -- starts mail service (smtp connection accepted, mail can go out)
pause -- temporarily stops mail service (connections accepted, nothing leaves)
cont -- continues paused mail service
stat -- displays status of mail service
cdb -- rebuild the tcpserver cdb file for smtp
restart -- stops and restarts smtp, sends qmail-send a TERM & restarts it
doqueue -- sends qmail-send ALRM, scheduling queued messages for delivery
reload -- sends qmail-send HUP, rereading locals and virtualdomains
queue -- shows status of queue
alrm -- same as doqueue
flush -- same as doqueue
hup -- same as reload
HELP
;;
*)
echo "Usage: $0 {start|stop|restart|doqueue|flush|reload|stat|pause|cont|cdb|queue|help}"
exit 1
;;
esac

exit 0


Da quello ke ho capito anke tramite pacchetto deb qmail dovrebbe partire via daemontools e questo script nn dovrebbe fare altro ke lanciare i tools....

l.golinelli
08-09-2004, 11:36
Infatti... Commenta la riga in /etc/inittab e dai un telinit q.
Killa tutti i processi legati a qmail.
Poi decommenta la riga e dai un telinit q e dovrebbero partire le daemontools...

The X
08-09-2004, 11:40
Originariamente inviato da l.golinelli
Infatti... Commenta la riga in /etc/inittab e dai un telinit q.
Killa tutti i processi legati a qmail.
Poi decommenta la riga e dai un telinit q e dovrebbero partire le daemontools...

Ma questo lo dovrei poi fare 1 volta solo o anke ad un successivo (ed eventuale) riavvio della macchina ? In poke parole è 1 soluzione definitiva o temporanea ?

Con lo script d sopra qmail dovrebbe partire grazie ai daemontools quindi anke i comandi "qmail start stop restart" dovrebbe poi andare ?

TNK

l.golinelli
08-09-2004, 11:43
E' una prova... Falla...

The X
08-09-2004, 11:48
Al riavvio dei daemontools facendo "ps aux" ricevo questo errore :


root 7504 0.0 0.2 2168 1068 ? S 12:41 0:00 /bin/sh /command/svscanboot
root 7506 0.0 0.0 1276 324 ? S 12:41 0:00 svscan /service
root 7507 0.1 0.0 1236 252 ? S 12:41 0:00 readproctitle service errors: ...denied?multilog: fatal: unab
root 7508 0.0 0.0 1240 288 ? S 12:41 0:00 supervise qmail-smtpd
root 7509 0.0 0.0 1240 288 ? S 12:41 0:00 supervise log
root 7510 0.0 0.0 1240 288 ? S 12:41 0:00 supervise qmail-send
root 7511 0.0 0.0 1240 288 ? S 12:41 0:00 supervise log
root 7512 0.0 0.0 1240 288 ? S 12:41 0:00 supervise qmail-pop3d
root 7514 0.0 0.0 1240 288 ? S 12:41 0:00 supervise log
qmaill 7516 0.2 0.0 1252 280 ? S 12:41 0:00 multilog t ./main
qmaild 7517 0.4 0.0 1304 500 ? S 12:41 0:00 [tcpserver]
qmaill 7518 0.0 0.0 1252 280 ? S 12:41 0:00 multilog t ./main
root 7520 0.0 0.0 1268 312 ? S 12:41 0:00 /usr/local/bin/tcpserver -v -R -H -l 0 0 110 /var/qmail/bin/q
root 7531 0.0 0.0 0 0 ? Z 12:41 0:00 [env <defunct>]
qmaill 7532 0.0 0.0 0 0 ? Z 12:41 0:00 [multilog <defunct>]
root 7533 0.0 0.2 3292 1412 pts/0 R 12:41 0:00 ps aux


E' 1 errore ?

l.golinelli
08-09-2004, 11:50
Quello è di certo un errore, credo di permessi... Ma quello che hai postato all'inizio è un'altro errore mi sa...

The X
08-09-2004, 12:00
Originariamente inviato da l.golinelli
Quello è di certo un errore, credo di permessi... Ma quello che hai postato all'inizio è un'altro errore mi sa...

Questo l'avevo intuito.... ora il prob è trovare qual'è la directory in questione.... :(

#!/bin/sh
08-09-2004, 12:06
Originariamente inviato da The X
Io nn ho aggiunto nulla a mano.. facendo "apt-get install qmail-run" (come spiegato qui http://smarden.org/pape/Debian/qmail/qmail-run.html) lui installa qmail, i daemon-tools e gli script d'avvio....

altra domanda lo script /etc/init.d/qmail è quello originale o lo hai modificato?

The X
08-09-2004, 12:11
Originariamente inviato da #!/bin/sh
altra domanda lo script /etc/init.d/qmail è quello originale o lo hai modificato?

è quello originale (e ke ho postato poco sopra)...
L'unica cosa ke ho modificato e/o fatto è stato quello indicato qui http://smarden.org/pape/Debian/qmail/lwq.html