Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'--quiet' flag does not suppress warnings #2680

Closed
mskardal opened this issue Nov 4, 2022 · 2 comments
Closed

'--quiet' flag does not suppress warnings #2680

mskardal opened this issue Nov 4, 2022 · 2 comments

Comments

@mskardal
Copy link

mskardal commented Nov 4, 2022

This issue is pretty much a duplicate of #1284, but it was closed three years ago.

I have a systemd service that triggers a script where I am sending some messages with the mosquitto_pub command. When running the script manually from the command line, no warnings are printed. However, journalctl logs the following message Warning: unable to locate configuration directory default config not loaded. whenever the systemd service triggers the mosquitto_pub commands. I have tried using the --quiet flag, but the warnings still appear in journalctl. I am using v3.1.1 MQTT broker.

@st1nga
Copy link

st1nga commented Mar 14, 2023

I believe the issue is that mosquitto_pub looks in $HOME/.config/mosquitto_pub for the config
systemd does not set HOME
I added Environment to the service file

[Service]
Type=simple
Environment=HOME=%h

and that fixed the issue.
I didn't really want to use the --quiet option as that may stop other messages

@ralight
Copy link
Contributor

ralight commented Apr 1, 2023

That warning message was removed in 1.6.3, so if you upgrade to a recent version you should be ok.

@ralight ralight closed this as completed Sep 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants