Syslog is filled with messages about MQTT

I am running HA (ver 0.92.2) on a Raspberry Pi

I recently reinstalled everything when trying to upgrade to Python 3.6 I screwed everything up. Anyway everything is back and seemingly working.

This afternoon the Pi was unresponsive to HTTP and SSL connections so I force rebooted it. I was trawling through log files to see if I could work out what went wrong when I noticed that my syslog file was absolutely full of this line:

May 13 16:56:25 pi-HomeAssistant-1 hass[367]: 2019-05-13 16:56:25 INFO (Thread-2) [homeassistant.components.mqtt] Successfully reconnected to the MQTT server

It seems that this is occuring every 2 seconds or so. Any ideas?

You don’t mention which broker you are using.

If it is the Mosquitto addon do you have an ACL?

Note the warning at the top of this page. https://www.home-assistant.io/addons/mosquitto/

I’m using a standalone Mosquitto server running on another Pi, not the addon.

mosquitto version 1.4.14 (build date Mon, 10 Jul 2017 23:48:43 +0100)

I’m running two instances of HA on two raspberry Pi’s. One of the Pi is also running Mosquitto.

The syslog of the Pi running Mosquitto shows this every second:

May 13 06:54:52 raspberrypi mosquitto[434]: 1557694492: Socket error on client <unknown>, disconnecting.
May 13 06:54:52 raspberrypi mosquitto[434]: 1557694492: New connection from 127.0.0.1 on port 1883.
May 13 06:54:52 raspberrypi mosquitto[434]: 1557694492: Client home-assistant-1 already connected, closing old connection.
May 13 06:54:52 raspberrypi mosquitto[434]: 1557694492: Client home-assistant-1 disconnected.
May 13 06:54:52 raspberrypi mosquitto[434]: 1557694492: New client connected from 127.0.0.1 as home-assistant-1 (c1, k60, u'*REDACTED'*).
May 13 06:54:52 raspberrypi mosquitto[434]: 1557694492: New connection from *REDACTED* on port 1883.

Duh. Excuse me but I have found my obvious error.

Both my HA were connecting with the same client name thus causing each other to be disconnected and then reconnecting in and endless loop.