I hava a fresh install of OpenHABian 3 on my RasPi 4.
Using putty I installed mosquitto and entered a password.
Installation told me mosquitto is up and running.
systemctl status mosquitto
tells me active (running)
But I get this in tail:
I found a similar thread here, but it did not help with my problem.
I already tried port 8883 and 1883 as well - both same problem.
What is the right port please?
What I am missing?
BTW: where do I find the mosquitto.log to get further information?
Which one? There’s many.
You likely need to do this.
Whichever you want to use, there is no “right” one. 1883 is standard MQTT port, 8883 the common one for encrypted MQTT.
you have to set mosquitto up to work for your desired way of making use of MQTT, it does not out of the box.
You need to configure mosquitto for authentication before it’ll allow to connect.
FOR an unencrypted MQTT Server
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
Afterwards restart mosquitto.
FWIW, I’ve changed that in openHABian so new Mosquitto installation now should have allow_anonymous true.
Note this won’t relieve you from the task of understanding and configuring Mosquitto, that cannot and never will happen upfront.
thanks to all for that great help here.
I had to enter
to the file
restart mosquitto by
sudo systemctl restart mosquitto
now it works like a charm.
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.