Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mosquitto-dev] Unable to start mosquitto - problem with password file

Having successfully used mosquitto a few years ago, I am trying to install it on a couple of new machines. I have downloaded the latest version from the PPA. All works fine on install.

My problems come when I try to modify the default conf file. Mosquitto fails to (re)start with an exit code of 13, which I have run down to the mosquitto log file entries of:

mosquitto version 2.0.18 starting

Config loaded from /etc/mosquitto/mosquitto.conf.

Error: Unable to open pwfile "/etc/mosquitto/passwd".

Error opening password file "/etc/mosquitto/passwd".


I am generating the password file using the mosquitto_password utility, which exits with a zero error code; in fact, I am using the example in the docs. The password file looks sensible with the contents of: username + ":" + a hashed password. I have even checked the file has root R/W access.

Convinced I have not made a dumb mistake in mistyping the pathname - I have cut-and-pasted the results of "ls /etc/mosquitto/passwd" directly into the conf file. Also run it past colleagues who can't seen any typos.

The actual conf file I am using is:

persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
connection_messages true
allow_anonymous false
password_file /etc/mosquitto/passwd
listener 1883 localhost

Using Mosquitto 2.0.18 on Linux Mint v21.2

Any ideas? This all worked beautifully for me a few years ago... 🙁

P.


Back to the top