Continual MQTT reconnections (moved from development)

My system (0.102.3) seems to be running OK, but I’ve just noticed my log is enormous. On inspection I see:

2019-12-05 18:03:15 INFO (Thread-3) [homeassistant.components.mqtt] Successfully reconnected to the MQTT server
2019-12-05 18:03:17 INFO (Thread-3) [homeassistant.components.mqtt] Successfully reconnected to the MQTT server
2019-12-05 18:03:19 INFO (Thread-3) [homeassistant.components.mqtt] Successfully reconnected to the MQTT server
2019-12-05 18:03:21 INFO (Thread-3) [homeassistant.components.mqtt] Successfully reconnected to the MQTT server
2019-12-05 18:03:23 INFO (Thread-3) [homeassistant.components.mqtt] Successfully reconnected to the MQTT server
2019-12-05 18:03:25 INFO (Thread-3) [homeassistant.components.mqtt] Successfully reconnected to the MQTT server

i.e. it’s reconnecting every 2 seconds.

I’ve checked the MQTT broker (mosquitto running in a docker container on another machine) and I see

1575569327: New connection from 172.29.12.16 on port 1883.
1575569328: Socket error on client <unknown>, disconnecting.
1575569328: New connection from 172.29.12.16 on port 1883.
1575569328: Client hassio already connected, closing old connection.
1575569328: Client hassio disconnected.
1575569328: New client connected from 172.29.12.16 as hassio (c1, k60)..

Other mqtt clients seem to be operating normally.

Any ideas what’s going on?

Happening to me as well.

Setup yesterday zigbee2mqtt and Mosquitto. Zigbee2mqtt doesn’t seem to have problems connecting, but HA is in a reconnect loop every 2 seconds as OP reports.

It does connect and get data in the meantime.

Using HA homeassistant/home-assistant:stable docker image, Zigbee2mqqt also in docker and Mosquitto native in the host.

Sorry to hear that, Miguel.
It’s still happening to me for now apparent reason and no way to find out.

Gareth

I seem to have resolved the issue by moving to the Hassio MQTT addon. The original MQTT broker had been running with no problems for ages, and was being used by a number of other devices, so I have no idea why I was getting a problem with HA.
Nomatter. Luckily all devices resolve the address of the broker using DNS, so moving to a new broker was fairly painless for me.