Package: mosquitto
Version: 1.5.7-1+deb10u1
Followup-For: Bug #960489

Dear Maintainer,

I'm also seeing this message, nearly every night I think.

I'm running stable (Buster) but I've picked up the change to use invoke-rc.d
instead of killall from #940229 but that hasn't helped, I think this means I'm
effectively using the same logrotate config as testing/unstable.

My guess is that the "postrotate" hook is not being called until after the
compression, so mosquitto.log.1 is still the live logfile at that point. This
seems a bit odd too me as I can't find any option to run a script between the
rotate and compress which seems like the sort of thing many daemons would need.

Looking at the logrotate man page I think the right answer is to use the
"delaycompress" option:

    > Postpone compression of the previous log file to the next rotation cycle.
    > This only has effect when used in combination with compress.  It can be
    > used when some program cannot be told to close its logfile and thus might
    > continue writing to the previous log file for some time.

IOW do not compress mosquitto.log.1 but instead defer until it becomes
mosquitto.log.2 tomorrow. I've deployed this locally but I won't know until a
few days time if it has worked.

HTH,
Ian.

-- System Information:
Debian Release: 10.9
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: armel (armv5tel)

Kernel: Linux 4.19.0-16-marvell
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages mosquitto depends on:
ii  adduser         3.118
ii  libc6           2.28-10
ii  libssl1.1       1.1.1d-0+deb10u6
ii  libsystemd0     241-7~deb10u7
ii  libuuid1        2.33.1-0.1
ii  libwebsockets8  2.0.3-3
ii  libwrap0        7.6.q-28
ii  lsb-base        10.2019051400

mosquitto recommends no packages.

Versions of packages mosquitto suggests:
ii  apparmor  2.13.2-10

-- Configuration Files:
/etc/logrotate.d/mosquitto changed:
/var/log/mosquitto/mosquitto.log {
        rotate 7
        daily
        compress
        delaycompress
        size 100k
        nocreate
        missingok
        postrotate
                if invoke-rc.d mosquitto status > /dev/null 2>&1; then \
                        invoke-rc.d mosquitto reload > /dev/null 2>&1; \
                fi;
        endscript
}


-- no debconf information

Reply via email to