Giter Site home page Giter Site logo

Really big logs about mosquitto-auth-plug HOT 7 CLOSED

manolodd avatar manolodd commented on June 3, 2024
Really big logs

from mosquitto-auth-plug.

Comments (7)

jpmens avatar jpmens commented on June 3, 2024

Logging via Mosquitto's logging functions will be possible soon I hope (see #9 ); this will ensure that fprintf to stderr will stop and should take care of your issue.

from mosquitto-auth-plug.

manolodd avatar manolodd commented on June 3, 2024

Ok, thank you so much. I din't see #9, sorry. I'll wait for it.

from mosquitto-auth-plug.

jpmens avatar jpmens commented on June 3, 2024

FYI this is taking longer than expected b/c I'm not comfortable yet with how Mosquitto's logging has been surfaced in the plugin; it is possible to crash the server.

from mosquitto-auth-plug.

manolodd avatar manolodd commented on June 3, 2024

JPMens, thank you for the info.

I'll wait for the solution :-)

from mosquitto-auth-plug.

mikini avatar mikini commented on June 3, 2024

Hi @manolodd / @jpmens.
I have today seen what seems to be the exact same problem on a VMware Player virtualized Ubuntu 14.04 using Mosquitto v1.4.5. It had accumulated a ~4GiB log file in /var/log/upstart/mosquitto.log that deprived the system of available diskspace.
We are however not using mosquitto-auth-plugin and if your problem is the same as the one I experienced, I don't think it is at all related to mosquitto-auth-plugin.

I was able to pinpoint the reason to the fact that the mosquitto server is outputting log messages both to the defined "log_dest file" in my configuration file and to stderr. The startup daemon used to control services 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/.

This, although subtly documented but rather strange, mosquitto behaviour can be eliminated by a simple twist in the mosquitto configuration. It is caused by the default log_dest being "stderr" (see man mosquitto.conf). So when not specifying other log_dest clauses than a "log_dest file" (and I think the default Debian/Ubuntu setup is like that) the configured log_dest will be "file" in addition to "stderr". The fix being to turn 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.

I intend to bring this up in upstream mosquitto. At least a sane default config on Debian/Ubuntu should not duplicate logs in /var/log/mosquitto.log and /var/log/upstart/mosquitto.log.

Hope this will help you.

from mosquitto-auth-plug.

jpmens avatar jpmens commented on June 3, 2024

I've tested again with 1.4.11 (OS/X) and I can still crash the server.

from mosquitto-auth-plug.

jpmens avatar jpmens commented on June 3, 2024

This is now working here, so I will close this (after a very loong time, sorry!)

from mosquitto-auth-plug.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.