Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Duplicated log when using upstart>=1.4 can break systems

Hi Mikkel,

I'm out so I'm not in the best position to be checking on this at the
moment, but my recollection is that the debian and ubuntu config is
set to log to /var/log/mosquitto/mosquitto.log only and that
logrotation is configured to rotate daily. If logging to stderr is
still happening that is definitely a bug. If you don't specify any
logging then stderr will be used, otherwise only the destinations that
you configure should be used.

Have you upgraded from a much earlier version, or is this a fresh installation?

Cheers,

Roger


On Tue, Dec 22, 2015 at 1:21 PM, Mikkel Kirkgaard Nielsen
<miki@xxxxxxxxx> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi stingers/stung people.
>
> Today I experienced an Ubuntu 14.04 development system break using
> Mosquitto v1.4.5 installed from PPA.
> It had accumulated a ~4GiB log file in /var/log/upstart/mosquitto.log
> that deprived the system of available diskspace.
>
> I was able to trace it back to the fact that the mosquitto server was
> outputting log messages both to the configured "log_dest file
> /var/log/mosquitto.log" and to stderr.
> The startup daemon will by default (since upstart v1.4, see
> http://upstart.ubuntu.com/cookbook/#id152) save stderr from spawned
> daemons to files in /var/log/upstart/ thus duplicated logging will be
> done. This can be problematic if no rotation is done on
> /var/log/upstart (this seems luckily to be the default on our servers).
>
> As I recall the distributed mosquitto.conf for Ubuntu (and Debian?)
> (which is not identical to what I see today in git) it is set up like
> that too.
>
> It can be fixed in configuration by turning off the default "stderr"
> logging before specifying the log method you actually want by
> inserting a "log_dest none" clause before other "log_dest" clauses.
> Or it could be prevented by using the --daemon switch when exec'ing in
> upstart configuration. Any reason why this isn't done already?
>
> A minor issue but one that is critical for the people where it rears
> its head. At least a sane default config should not duplicate logs
> like that.
>
> I see other people has had similar problems;
> https://github.com/jpmens/mosquitto-auth-plug/issues/54
>
> - --
>     Mikkel
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
>
> iQEcBAEBAgAGBQJWeU5XAAoJEJ2luFWzaTSaT68IAIULu7V3oGAoyebNuRJg00DE
> 2NLZGWfSdj3Wv1uD+hRfQLrFhaC/i5wENfxiPEZEB5vlRmvszckCnovNhxKzP308
> hlGi+mU9HynvYXaAg2jQ2vWs8hgDtpD10XDPgO68uAJiGOuxCaw/9HI/IyANAgAi
> AqwoTxIgQh16baFVscLrKuN1zuXwPHWdIwGo1C5Oft1RMQicPgwT3SlMXXdCDRJz
> z3IgP8vRW84BjGdFeIiIFXaJ0rlEP3/vvmH0g8hBlDKWnMquXHt1pqfEKh58qyzR
> xYGTBwdcNdh1+uArN4F3yJX2bSHWgG4cWyecoV4c/3rPD/NEzQV2ctfxkK28qKk=
> =foG1
> -----END PGP SIGNATURE-----
> _______________________________________________
> mosquitto-dev mailing list
> mosquitto-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/mosquitto-dev


Back to the top