Comments (7)
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.
Ok, thank you so much. I din't see #9, sorry. I'll wait for it.
from mosquitto-auth-plug.
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.
JPMens, thank you for the info.
I'll wait for the solution :-)
from mosquitto-auth-plug.
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.
I've tested again with 1.4.11 (OS/X) and I can still crash the server.
from mosquitto-auth-plug.
This is now working here, so I will close this (after a very loong time, sorry!)
from mosquitto-auth-plug.
Related Issues (20)
- ACL issue with JWT backend HOT 2
- Inconsistencies between HTTP and JWT code & configuration HOT 3
- Merge be-http and be-jwt into one
- conf->hostname might be uninitialized in be_jwt_init() HOT 2
- ACL issue with %d placeholder - MySQL backend HOT 4
- Compilation Error HOT 1
- Compilation Error config.h: No such file or directory HOT 19
- problem with sizeof HOT 1
- Compile error with Mosquitto 1.5.5 and latest Auth-plug version HOT 2
- Websocket error: connection was lost (verbose output) HOT 4
- given the current vesion of Auth-plug, what version of mosquitto and libwebsockets should I install? HOT 1
- Fact that a user is superuser is not cached HOT 1
- mysql problem acl SUB/PUB HOT 1
- Cannot Load Auth plug-Error HOT 8
- mosquitto_client_id: symbol not found HOT 5
- Failed to create file named auth-plug.so
- Segmentation fault with BE_PSK and postgres backend HOT 1
- HTTP backend doesn't connect, instead rejects subscriptions HOT 1
- HTTP backend not calling api HOT 1
- Issue subscribing with wildcard in MongoDB and maybe MySQL HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mosquitto-auth-plug.