After upgrading to from 0.98.2 to 0.98.4 my MQTT integration has stopped working for some reason. Downgrading back to 0.98.2 or upgrading to 0.98.5 has not solved the problem.
I’m running eclipse-mosquitto with no security in a docker container and connecting to it and publishing events from other sources has no issues.
configuration.yaml
mqtt:
broker: localhost (also tried with direct container ip and host ip)
port: 1883
discovery: false
home-assistant.log
2019-09-11 15:24:24 ERROR (MainThread) [homeassistant.components.mqtt] Failed to connect due to exception: [Errno 98] Address in use
2019-09-11 15:24:24 WARNING (MainThread) [homeassistant.config_entries] Config entry for mqtt not ready yet. Retrying in 5 seconds.
2019-09-11 15:24:26 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 406, in _async_add_entity
await entity.async_added_to_hass()
File "/usr/src/homeassistant/homeassistant/components/mqtt/sensor.py", line 132, in async_added_to_hass
await self._subscribe_topics()
File "/usr/src/homeassistant/homeassistant/components/mqtt/sensor.py", line 199, in _subscribe_topics
"qos": self._config[CONF_QOS],
File "/usr/src/homeassistant/homeassistant/components/mqtt/subscription.py", line 82, in async_subscribe_topics
await requested.resubscribe_if_necessary(hass, current)
File "/usr/src/homeassistant/homeassistant/components/mqtt/subscription.py", line 39, in resubscribe_if_necessary
hass, self.topic, self.message_callback, self.qos, self.encoding
File "/usr/src/homeassistant/homeassistant/components/mqtt/__init__.py", line 452, in async_subscribe
encoding,
File "/usr/src/homeassistant/homeassistant/components/mqtt/__init__.py", line 848, in async_subscribe
await self._async_perform_subscription(topic, qos)
File "/usr/src/homeassistant/homeassistant/components/mqtt/__init__.py", line 884, in _async_perform_subscription
_raise_on_error(result)
File "/usr/src/homeassistant/homeassistant/components/mqtt/__init__.py", line 984, in _raise_on_error
"Error talking to MQTT: {}".format(mqtt.error_string(result_code))
homeassistant.exceptions.HomeAssistantError: Error talking to MQTT: The client is not currently connected.
I’m also running owntracks, however I’ve tried to disable it with no effect. I’ve also tried removing the configuration.yaml entry and doing it through integrations, however i get message “Unable to connect to the broker” in the configuration interface.
As you can see from the config I’m not running the embedded MQTT server, so the “Address in use” message makes no sense. Looking at the mosquitto logfile I see no connection attempt from HA. I’ve attempted a wget localhost:1883 from the HA container to see if I can reach the mosquitto container and the mosquitto.log indicates that I can reach the container, so that’s not the issue.
I’ve run out of ideas to try, any suggestions?