MQTT 2.4 Broker thing localhost not working

Hi all,
I have updated my system to 2.4 and have a question to the MQTT Broker thing. A mosquitto is installed and working. The thing says it’ online. Everything seems to be OK.
But I can only get mqtt messages in openhab2 when i set the broker thing to the IP address (192.168.0.x), localhost or will not work.
I’m doing the upgrades and testing at a second raspberry and after having a working configuration, I change the SD card to the primary raspi. I don’t want to change IP addresses in configs all the time.

Is there a special syntax to use?

Thanks / Zennix

On the same machine?
Can you post your mosquitto.cfg file, please?

Hi Vincent,
yes on the same machine. And if I set the IP to 192.168.0.x in the Broker thing it’s all working.

I have no mqtt.cfg file. Everything is configured in the Broker thing via PaperUI.

Here my mosquitto.conf

pid_file /var/run/

persistence true
persistence_location /var/lib/mosquitto/

log_dest file /var/log/mosquitto/mosquitto.log

include_dir /etc/mosquitto/conf.d

Greetings / Zennix

Sorry, I meant mosquitto.conf but you got it!!

Nothing wrong here. I would change the persistence to false personally and only retain topics on demand

It should work with, but maybe it’s the new binding

Thank you Vicent,
I tried to use a mqtt.things file to create the Broker thing.

mqtt:broker:Mosquitto [ host=“localhost”, secure=false, username=“openhab”, password=“xxxxx” ]

now it’s working. I think, I will switch back to config files. Creating things and items with Paper UI is not reliable.

Thanks / Zennix

I couldn’t disagree more.
Creating things with paperUI is more reliable than with text config.
It’s less flexible (in some cases) granted but not more reliable.
You loose self discovery and other advantages.
You don’t have to look up the syntax of some obscure setting in the docs.
It’s much easier

I use the PaperUI for ALL my things
And I use the text files for items and sitemaps