OH2 Mqtt config removed, no Mqtt anymore


I had the same problem as another user (two mqtt broker configs, one disconnected the other), and then I tried to follow the instructions in the thread. [Solved] Very frequent MQTT disconnects

I had a broker connection named broker and one named mqtt in the OH2 database, I edited the config files, deleted the OH2 entries and restarted the openhabian.
Now it seems I have no usable mqtt binding anymore.
Before my deletions I saw some state changes in events.log, but also the dropped connections to the brokers in openhab.log.
Now I see nothing anymore regarding mqtt.
I already tried to remove the mqtt binding in paperUI and re-added it, restarted again, but nothing worked…
Broker is still running fine, I checked with mqtt-spy, but openhab is not using it.
The settings in the OH2 database are now the correct onces.

Any clue?


First thing to do: check your settings in /conf/services/mqtt.cfg


Thats exactly what i did in the first place.
Correct the line in mqtt.cfg, delete the list in oh2 database, reboot openhabian.
Didnt help

The second thing to check is that userdata/config/org/openhab/mqtt.config is correct. There is a bug where when you delete something from conf/services/mqtt.cfg it doesn’t actually get removed from this file and it is this file that OH actually uses to establish its connections.

You can delete this file and restart OH and it will be recreated based on the current contents of mqtt.cfg.

1 Like


I looked at userdata in /srv/… and all looked good.

Time to start from scratch. SD card is formatting just now. Sad thing - I hope this does not happen again :slight_smile: