Check the permissions of the
It should be owned by the user mosquitto.
To fix this:
chown -R mosquitto:mosquitto /var/lib/mosquitto
Check if the file
mosquitto.db has been created in there.
Otherwise…It may be a problem with your mosquitto.conf file… (some syntax error or something similar)
back it up and remove it from
/etc/mosquitto/ folder put in the following simple options in a new one and try to
systemctl restart mosquitto
user mosquitto port 1883
The Broker should become active (running)
If this works, start adding back the other options in your new mosquitto.conf, like:
pid_file /var/run/mosquitto.pid persistence true persistence_location /var/lib/mosquitto/ log_dest file /var/log/mosquitto/mosquitto.log allow_anonymous false password_file /etc/mosquitto/passfile