Ok so I finally decided to move to OH3 and I did a clean install on my Raspberry Pi, however I cannot for the life of me get the MQTT binding to connect to the broker.
I have reinstalled multiple times now, and used the option to install mosquitto from the openhabian-config - with no password set i might add. Next I added the MQTT bridge and choose the MQTT Broker (NOT the system one) and entered the IP of the Pi. And it just will not connect.
Using these same properties can you connect to the broker using some other MQTT client like mosquitto_sub or MQTTExplorer? You’ll want to do so from the same machine OH is running on to detect whether this is a networking problem.
You might need to set the logging for the binding to TRACE logging and see if there is any more information in the logs about why it’s failing to connect (timed out, connection refused, etc.).
Do you use unencrypted login at port 1883?
The problem encounters because of the default setting of mosquitto v2.0+. At default settings, nobody (devices & openhab) was able to connect to the mqtt server after i reinstalled openhabian.
Try to add these two lines (first line is really needed):
sudo nano /etc/mosquitto/conf.d/default.conf
Note what @Giga522 said. Mosquitto has changed. It no longer supports by default a username/passwordless unencrypted connection by default. You actually have to change it’s config to enable that now.