"Setup failed for mqtt: Unable to import component" after upgrade to 0.102.3

Is there a bug for MQTT in this version? I did an upgrade the regular way:

sudo -u homeassistant -H -s
cd  /srv/homeassistant
source bin/activate
pip3 install --upgrade homeassistant

And after that I can’t start MQTT. I get this error message:

2019-12-08 12:36:55 ERROR (MainThread) [homeassistant.setup] Setup failed for mqtt: Unable to import component

And that messes up my automations too since most of them are triggered by MQTT.

Edit: I downgraded to 0.102.2 without any change, but downgrading back to 0.97.2 actually worked, so MQTT came back. Now I’m trying an upgrade agin, this time to 0.102.2, to se if that changes anything.

Edit 2: Nope, same problem. There has to be something special with this installation, or somebody else would probably have noticed on the last couple of versions. I’ll try a full uninstall and reinstall. Luckily I’m always doing a full image backup of the Pi before trying any upgrades!

Check the console output - there will be information about why (for example missing library). You’ll want the journalctl command to see that, such as:

journalctl -u home-assistant@homeassistant --since '2019-12-08 12:30:00'

No information about why, as far as I can see:

es. 08 13:49:44 Hytte-Pi2 hass[860]: 2019-12-08 13:49:44 ERROR (MainThread) [homeassistant.setup] Setup failed for mqtt: Unable to import component

Could this be related to Setup failed for owntracks: Unable to import component · Issue #28464 · home-assistant/core · GitHub ?

It’s very possible. The strange thing is that I have it working with 0.102.2 on another Pi. But that one has an MQTT server running, so maybe that’s the reason. Still I can’t see why it uninstalled the MQTT that was there when I upgraded. Weird stuff.

Removing the virtual environment, deleting the user and deleting all references to Hass on the SSD, and then doing a full setup again actually fixed it. Easy to see too, because when I clicked to add MQTT as an integration, there was a 20-30 second waith, which must have been when the dependancies were installed. :slight_smile: