Hi,
I am running Node-Red successfully on a raspberry pi and now I want to run mosquitto the same way on this pi to have a MQTT Broker.
I tried several explanations (they are all more or less the same), but when I start the broker I get this error message:
and the only device that is allowed to connect to the broker is the raspberry itself.
I edited the conf-file as described here, but with no success:
The tutorial is misleading in this area. When you run mosquitto -v I think it does not use the config file you editted. Instead you should run it as a service by running sudo systemctl start mosquitto
Then run systemctl status mosquitto
to check it is running ok.
Also I suggest including this in the config file, otherwise the timestamps in the log are not readable.
# human readable timestamps in log
log_timestamp true
log_timestamp_format %Y-%m-%d %H:%M:%S
Then if you look in the mosquitto log using sudo cat /var/log/mosquitto/mosquitto.log
you should see everything that is going on.
Ah ok, I see
I was always starting the service with
mosquitto -v
to do the R&D activities in node-red, but never did the final service startup procedures.
Thanks a lot, I will try this immediately after I return home.
Run sudo tail -f /var/log/mosquitto/mosquitto.log
then in another terminal window sudo systemctl restart mosquitto
Attempt to connect with MQTTExplorer, and post the log outputs from the mosquitto starting message.