Mqtt connection to broker was lost

WE were working in the mqtt.cg 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) - java.io.EOFException
at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:146)[199:org.eclipse.paho.client.mqttv3:1.0.2]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_65]
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:267)[:1.8.0_65]
at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:65)[199:org.eclipse.paho.client.mqttv3:1.0.2]
at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:107)[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

3 Likes

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
BundleLocation: mvn:org.openhab.io/org.openhab.io.transport.mqtt/1.13.0
Properties:
   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
   service.pid = 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