Mqtt connection to broker was lost

WE were working in the to chnge the url from openhab to mysensor and now this error comes even we returend every thing back to normal

the error message as below

03:51:54.616 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting connection helper to periodically try restore connection to broker 'openhab’
03:52:01.758 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection 'mysensor’
03:52:02.387 [ERROR] [t.mqtt.internal.MqttBrokerConnection] - MQTT connection to broker was lost
Connection lost (32109) -
Caused by:
at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage([199:org.eclipse.paho.client.mqttv3:1.0.2]
… 1 more
03:52:02.398 [ERROR] [t.mqtt.internal.MqttBrokerConnection] - MQTT connection to ‘mysensor’ was lost: Connection lost : ReasonCode 32109 : Cause : null
03:52:02.405 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting connection helper to periodically try restore connection to broker ‘mysensor’

please assist us

Are you running OH2? If so check this post


That was a very helpful post and answer - following it fixed the same problem for me ( error in the log files). Also as an OH newbie, first time using the Karaf console, which will no doubt come in handy for other things.

Thanks! this helped me after removing the 2.4 mqtt binding and reverting to the 1.x binding and some other failed configuration attempts which left me with duplicate config as shown below

Pid:            org.openhab.mqtt
   broker.clientId = openHAB
   broker.pwd = openhabian
   broker.retain = true
   broker.url = tcp://localhost:1883
   broker.user = openhabian
   mosquitto.clientId = openHAB
   mosquitto.pwd = openhabian
   mosquitto.qos = 1
   mosquitto.retain = true
   mosquitto.url = tcp://localhost:1883
   mosquitto.user = openhabian = org.openhab.mqtt

To delete, I had to use the --force flag which seemed to do it. followed by a restart of openhab2

openhab> config:delete org.openhab.mqtt
This config is being edited.  Cancel / update first, or use the --force option
openhab> config:delete org.openhab.mqtt --force