After altering the mosquitto.conf file and using
sudo systemctl restart mosquitto
I get the following error
job for mosquitto.service failed because the control process exited with error code.
See “systemctl status mosquitto.service” and “journalctl -xeu mosquitto.service” for details.
My mosquitto.conf file is
#Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example
per_listener_settings true
pid_file /run/mosquitto/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d
allow_anonymous false
password_file /etc/mosquitto/passwd
listener 1883
What is happening.
Running the command
mosquitto
This works locally but only allows local connections and does not allow my ESP board to connect.
Hi.
Please double-check that you’ve edited the configuration file correctly.
I think that’s what the error code is mentioning. There’s some error on the configuration file.
You can also try running the commands mentioning in the error code to understand if the issue is being caused by something else.
Regards,,
Sara
I got the same problem. checked the config file twice but can’t find any error in the file.
I tried to repeat the whole installation process but same error occurs. Why is mosquitto unable to restart???