HA not starting after mosquitto

Hi!

I installed HA and mosquitto. According MQTT Brokers I modified following line in “[email protected]” file to

“After=network-online.target mosquitto.service”

to start HA after mosquitto. After reboot mosquitto starts but HA is inactive:

~$ sudo systemctl status home-assistant@homeassistant
[email protected] - Home Assistant
Loaded: loaded (/etc/systemd/system/[email protected]; enabled; vendor preset: enabled)
Active: inactive (dead)

if I start service manually it starts fine

without mosquitto.service in “[email protected]” file :

“After=network-online.target”

both mosquitto and HA active after reboot

Could you please help with this issue?

PS: mosquitto.service is added using systemd:

~$ sudo systemctl status mosquitto.service
● mosquitto.service - Mosquitto MQTT Broker daemon
Loaded: loaded (/etc/systemd/system/mosquitto.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2018-11-21 13:57:37 +06; 38min ago
Main PID: 760 (mosquitto)
Tasks: 1 (limit: 2309)
CGroup: /system.slice/mosquitto.service
└─760 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf -d

Regards,
Doszhan

Just use this - it is the way hassbian is set up. The additional mosquitto line only ensures that the mosquitto service is started before HA, and there is no guarantee that it will be up and ready when HA starts anyway.

1 Like