Bonjour,
J’ai un problème avec Zigbee2MQTT. Le service fonctionne correctement mais en cas de coupure de courant, le service ne redémarre pas et je suis obligé de le lancer manuellement en me connectant avec la commande mosquitto -v
Voici ce que m’affiche la commande mosquitto status au redémarrage :
pi@raspberrypi:~ $ sudo systemctl status mosquitto
● mosquitto.service - Mosquitto MQTT Broker
Loaded: loaded (/etc/systemd/system/mosquitto.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Sat 2022-07-16 17:52:36 BST; 14s ago
Process: 617 ExecStart=/etc/mosquitto/mosquitto.conf (code=exited, status=200/CHDIR)
Main PID: 617 (code=exited, status=200/CHDIR)
Jul 16 17:52:36 raspberrypi systemd[1]: mosquitto.service: Service RestartSec=15s expired, scheduling restart.
Jul 16 17:52:36 raspberrypi systemd[1]: mosquitto.service: Scheduled restart job, restart counter is at 3.
Jul 16 17:52:36 raspberrypi systemd[1]: Stopped Mosquitto MQTT Broker.
Jul 16 17:52:36 raspberrypi systemd[1]: Started Mosquitto MQTT Broker.
Jul 16 17:52:36 raspberrypi systemd[1]: mosquitto.service: Main process exited, code=exited, status=200/CHDIR
Jul 16 17:52:36 raspberrypi systemd[1]: mosquitto.service: Failed with result 'exit-code'.
Le fichier mosquitto.service :
[Unit]
Description=Mosquitto MQTT Broker
[Service]
WorkingDirectory=/usr/sbin/mosquitto
ExecStart=/etc/mosquitto/mosquitto.conf
Restart=always
RestartSec=15
[Install]
WantedBy=multi-user.target
Le fichier mosquitto.conf :
pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d
listener 1883
allow-anonymous true
Auriez-vous une idée ?