I finally took the time to update from 2.5.1 to 3.0.1. Most of my things are behind MQTT, and I use external mosquitto for that. Everything has been ok for years. Now I took the 2.5.1 config dirs, and dropped them to new fedora-iot server and told podman to start the latest 3.0.1 container using the old config dirs.
I saw from logs there were some upgrades being done, and eventyally openhab started fine. There seems to be the MQTT items in place. But none of them connects, due mqtt server was not anywhere in configs. I found the place from settings to go and add it. It should be simple, just fqdn, possibly port and no secure no auth.
But for some reason openhab keeps giving me this:
21:04:55.885 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing 'mqtt:systemBroker:net' changed from OFFLINE to OFFLINE (COMMUNICATION_ERROR): io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: mqtt.net/192.168.1.32:8883
See how the port is 8883. I have even tried to set it manually to 1883 from mqtt settings, and toggled the secure on and back to off, but for some reason the port keeps being wrong. Any ideas how to force it right?
There are two places where the MQTT connection might be configured. In settings you’ll see a “MQTT system broker connection” option. Honestly, it’s not clear what that is and what it controls but there have been reports that using that doesn’t work. So remove anything you may have configured in there.
Once you’ve cleaned that up, you need to configure the MQTT connection using an MQTT Broker Thing. Go to Things and click +, select MQTT from the list and select MQTT Broker Thing. Fill out all your connection information there. All your other MQTT Things will need to be updated to use that new Broker Thing.
If you’ve already a Broker Thing created, post the config here.
Ah, this is the most effective way of fixing things. Write to forum about it. And ta-daa, it sure starts to work the moment you press send.
I gave up and shut down the container after not getting it to work via numerous reconfigs. And sir, have you tried to turn it off and on again? Yes, now I have and it works. Beautiful.
@rlkoshak it’s the exact one I had configured it. And in things-> mqtt bridge says it reflects the settings from system; “A system configured and therefore read-only broker connection. Properties are reflecting the configuration and internal connection status.”. So it actually works as beginner would imagine it does, except that to apply changes, one needs to reboot the container. At least once. In my case it didn’t start right after first restart, but on the second one it did.