Issue with "Disconnected from MQTT (1)"

A couple of thoughts on the log file

  1. Can you do
sudo journalctl -u mosquitto.service

It doesn’t produce anything for me, but I still have my mosquitto started by an init.d script. It might produce something for you as you have it started with system v scripts.

  1. Check that the user running mosquitto has permission to write to the log file
$ ps -ef|grep [m]osquitto
mosquit+   415     1  0 Apr28 ?        00:11:43 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
pi@raspberrypi:~
$ ls -ld /var/log/mosquitto
drwxr-xr-x 2 mosquitto root 4096 Apr 15 07:25 /var/log/mosquitto
pi@raspberrypi:~
$

Also, as a guess, do you have another client connecting with a client -id of home-assistant-1? It causes similar effects to what you are seeing, but I didn’t think it allowed any messages to be published.

1 Like