[OH3] MQTT system broker connection - cannot update settings with same Connection name

Tags: #<Tag:0x00007f17515a5220> #<Tag:0x00007f17515a5158> #<Tag:0x00007f17515a4fc8>

Dear all,

During my attempts to configure the OH3 MQTT system broker connection, I noticed a possible bug.
I am able to make the first configuration and save it under an arbitrary “Connection name”:

The operation is logged in /var/log/openhab/openhab.log:

2021-02-22 14:55:06.507 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'mqtt:systemBroker:mqtt-system-broker' to inbox.
2021-02-22 14:55:06.514 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '10.0.0.3' with clientid mqtt2-system-broker

But if I want to make any changes AFTER this step, I get the following warning and the changes are NOT saved:

2021-02-22 14:56:58.249 [WARN ] [.MqttBrokerConnectionServiceInstance] - Ignore existing broker connection configuration for: mqtt-system-broker

The only way to overcome this is to change the Connection name and then Save the settings again.

If I try to re-use any Connection name previously used, the settings cannot be saved (“ignore existing broker” warning), so I believe these connections appear as “ghost” entries somewhere in the OH3 settings database.

I can’t help with the exact issue, except to say that the MQTT System Broker Connection should not exist in OH3. It is a relic from OH2, and should have been removed, but here we are.

I’d recommend removing the connection you’ve made, and setup a connection to your broker via a Thing, as described here or here.

1 Like

Thanks, I already created a MQTT Broker thing which works perfectly.
I was under the impression that the System broker is also needed, given the fact that it is present in OH3/Settings/Other Services.
I cannot delete the settings that I already made in MQTT system broker connection.
On the other hand I noticed the MQTT System broker thing appears in error (error:comm) and it is not able to connect to mosquitto:

2021-02-22 16:10:48.800 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '10.0.0.3'. Next attempt in 60000ms
2021-02-22 16:10:48.804 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '10.0.0.3' with clientid mqtt2-system-broker
2021-02-22 16:11:48.813 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '10.0.0.3'. Next attempt in 60000ms
2021-02-22 16:11:48.820 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '10.0.0.3' with clientid mqtt2-system-broker
2021-02-22 16:12:48.822 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '10.0.0.3'. Next attempt in 60000ms
2021-02-22 16:12:48.829 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '10.0.0.3' with clientid mqtt2-system-broker
2021-02-22 16:13:48.833 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '10.0.0.3'. Next attempt in 60000ms
2021-02-22 16:13:48.836 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '10.0.0.3' with clientid mqtt2-system-broker

I removed the MQTT System broker thing but the same errors continue to appear every 1 minute.
I also restarted OH3, but they keep coming in:

2021-02-22 16:36:08.180 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '10.0.0.3'. Next attempt in 60000ms
2021-02-22 16:36:08.183 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '10.0.0.3' with clientid mqtt2-system-broker
2021-02-22 16:37:08.185 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to '10.0.0.3'. Next attempt in 60000ms
2021-02-22 16:37:08.187 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '10.0.0.3' with clientid mqtt2-system-broker

Is there any way to get rid of these?

Thanks,
Cristian

It is definitely not needed.

Not sure, I’m afraid. Hopefully someone with more experience can chime in later!