Le lundi 14 mars 2011 à 12:40 +0100, Alessio Fattorini a écrit :
> Can you help me about this trouble? During weekly logrotate, sogo stop and
> doesn't restart.
>
> This is old log
>
> # tail /var/log/sogo.log.1
> Mar 03 04:02:13 sogod: SOGo watchdog [2694]: <0x0x84ea618[WOWatchDog]>
> Terminating with signal 15
> Mar 03 04:02:18 sogod: SOGo watchdog [2694]: <0x0x8506188[WOWatchDogChild]>
> sending terminate signal
> to pid 2695
> Mar 03 04:02:29 sogod: SOGo watchdog [2694]: <0x0x8506188[WOWatchDogChild]>
> child 2695 exited
> Mar 03 04:02:29 sogod: SOGo watchdog [2694]: <0x0x84ea618[WOWatchDog]> all
> children exited. We now
> terminate.
>
>
> New sogo.log is empty :-|
>
> This is logrotate script:
>
> #cat /etc/logrotate.d/sogo
> /var/log/sogo/*.log {
> missingok
> rotate 5
> notifempty
> create 0664 sogo sogo
> postrotate
> /sbin/service sogod restart > /dev/null 2>&1
> endscript
> }
>
>
> No errors in messages.
Hi Alessio. I had the same problem, and I solved it by removing the
postrotate section, and adding the copytruncate option in the logrotate
config. This way, the logrotate doesn't restart sogo anymore.
Regards, Daniel
>
> I can't reproduce that fail, if i execute logrotate manually works.
> If i execute restart manually, it works.
>
> Service is a link to /etc/rc.d/init.d/sogod
>
> This is verbose mode of logrotate. It works:
>
> # logrotate -fv /etc/logrotate.conf
>
> rotating pattern: /var/log/sogo/*.log forced from command line (5 rotations)
> empty log files are not rotated, old logs are removed
> considering log /var/log/sogo/sogo.log
> log needs rotating
> rotating log /var/log/sogo/sogo.log, log->rotateCount is 5
> renaming /var/log/sogo/sogo.log.5 to /var/log/sogo/sogo.log.6 (rotatecount 5,
> logstart 1, i 5),
> renaming /var/log/sogo/sogo.log.4 to /var/log/sogo/sogo.log.5 (rotatecount 5,
> logstart 1, i 4),
> renaming /var/log/sogo/sogo.log.3 to /var/log/sogo/sogo.log.4 (rotatecount 5,
> logstart 1, i 3),
> renaming /var/log/sogo/sogo.log.2 to /var/log/sogo/sogo.log.3 (rotatecount 5,
> logstart 1, i 2),
> renaming /var/log/sogo/sogo.log.1 to /var/log/sogo/sogo.log.2 (rotatecount 5,
> logstart 1, i 1),
> renaming /var/log/sogo/sogo.log.0 to /var/log/sogo/sogo.log.1 (rotatecount 5,
> logstart 1, i 0),
> old log /var/log/sogo/sogo.log.0 does not exist
> renaming /var/log/sogo/sogo.log to /var/log/sogo/sogo.log.1
> creating new log mode = 0664 uid = 3000 gid = 3000
> running postrotate script
> removing old log /var/log/sogo/sogo.log.6
>
>
>
> --
> Alessio Fattorini ([email protected])
>
> nethesis srl - Via degli Olmi 16/4 - 61100 Pesaro (PU)
> tel. +39 0721 405516 - fax +39 0721 268147
> www.nethesis.it - [email protected]
--
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: [email protected]
Web : http://www.firewall-services.com
--
[email protected]
https://inverse.ca/sogo/lists