Mqtt & owntracks stoped working

I did a apt-get upgrade, rebooted and now I get this.
(0.45.1 AIO Installer @ RPi3)

The following components and platforms could not be set up:
- mqtt
- device_tracker.owntracks
Please check your config

What might have happened? It looks to me like mosquito is working…

Sometimes I just have to restart hass for things to work properly. I assume you’ve done that? Have you checked the homeassistant.log file?

After some fiddling it seams like mosquitto isn’t autostarting anymore?!

Running “sudo service mosquitto start” and then restarting HA resolves the issue, but it comes back after a reboot. Where can I see why it’s not autostarting?

“sudo service mosquitto status” will give you an idea why it is not starting…

I frequently have this issue because HA is not waiting for Mosquitto to fully start up and accept incoming connections. I am running Ubuntu with systemd, and while you can specify dependencies between services, this only ensures that HA is started after Mosquitto is started. The startup of each service is happening in parallel, and while Mosquitto still needs 5-10 seconds until it accepts connections, HA continues to start up trying (and failing) to connect.
Ideally, HA would just continue trying to connect to the MQTT broker for a certain amount of time. Or, maybe there is a way to let systemd only start HA if Mosquitto is accepting connections.

I had a similar symptom after running “sudo apt-get update && sudo apt-get upgrade” this morning, which upgraded Mosquitto to v1.4.12. In my case it turned out that the Mosquitto service got disabled during the update.

You may want to reboot your Pi before doing this just to make sure the results are not affected by any previous attempts to manually start the service, but then issue the following command:

sudo service mosquitto status

The “Loaded” line in the output of that command should end in either “; enabled” or “;disabled”. In my case it showed as disabled, so I ran the following:

sudo systemctl enable mosquitto.service
sudo reboot

After the reboot I ran the status command again just to double-check that everything was as expected, and Mosquitto was already running and showed as enabled now. All my MQTT devices were working with Home Assistant again.

1 Like

@hunterstee awesome, that worked like a charm, thanks!

1 Like

I have the same problem since today but I run hass.io and therefore I can’t use sudo commands in ssh. What can I do to solve the problem?