MQTT (Mosquitto) continuously reconnecting...why?

Hi,
i’m now on a piece by piece migration from 2.5.12 to 3.2dev (latest). One mayor issue i see in the logs is that it seems that openhab tries to reconnect to the external mqtt broker (same RPI4 machine) all the time. So all things on the broker behave laggy/strange…

Any idea what could be the reasoning?

2021-07-27 22:57:29.769 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.1.11'. Next attempt in 60000ms
2021-07-27 22:57:29.776 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.1.11' with clientid openhab
2021-07-27 22:57:49.816 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '192.168.1.11'. Next attempt in 60000ms
2021-07-27 22:57:49.819 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.1.11' with clientid openhab

Thanks
Norbert

The MQTT bridge looks like this. Same config works fine with 2.5.12…

Bridge mqtt:broker:mosquitto [ host="192.168.1.11",port=1883,secure=false,clientID="openhab" ] {
    Thing topic z2m "zigbee2mqtt" {
    Channels:
        Type string : TradfriSwitch01 "TradfriSwitch#01 [%s]" [ stateTopic="/z2m/Tradfri_Switch01", transformationPattern="JSONPATH:$.action" ].........

Is this the same for both openHAB’s? If so, you must change one of them.

what do you mean by openhabs? OH2.5 and OH3?

OH3 was installed on a new machine, OH2.5 machine should not connect to the broker of OH3 machine at all.

So you are currently running two instances of openHAB on two different machines, and each of those machines has an instance of Mosquitto too?

yes. i now changed the openhab-ID to openhab99 and the issue is gone. Not sure if one Raspi crosstalks to the other…should not as i changed everything, but it works now.

ONLY - my OH3 instance is connecting to another broker (VenuxGX…the controller of my house storage from Victron)…and here it reconnects also all the time, but this is more a VenuxGX issue…

Thanks so far for the help!

no. not Raspi crosstalking - every machine connecting to an MQTT-broker needs to have a unique client-ID. If two machines use the same client-ID the stuff happens you encountered.

no. i ment that my OH3 Raspi may have also MQTT messages from the OH2.5 raspi if the old one does not use its own mosquitto but talk to OH3 broker…as the IP address may be configured wrong. I checked but could not see any wrong ip link.