Mosquitto broker "starting in local only mode"

Hey, I am currently trying to configure my Mosquitto broker running headless on a raspberry pi 4...
When running mosquitto -v I always get as response, that its running on local mode only.


1656875923: mosquitto version 2.0.11 starting
1656875923: Using default config.
1656875923: Starting in local only mode. Connections will only be possible from clients running on this machine.
1656875923: Create a configuration file which defines a listener to allow remote access.
1656875923: For more details see https://mosquitto.org/documentation/authentication-methods/
1656875923: Opening ipv4 listen socket on port 1883.
1656875923: Opening ipv6 listen socket on port 1883.
1656875923: mosquitto version 2.0.11 running

The linked docs doesnt help, I already tried bind_address 0.0.0.0 in the mosquitto.conf file, even when allow_anonymous is true it doesnt work.

This is my config file:

  GNU nano 5.4              /etc/mosquitto/mosquitto.conf
# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example
per_listener_settings true

pid_file /run/mosquitto/mosquitto.pid

persistence true
persistence_location /var/lib/mosquitto/

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

include_dir /etc/mosquitto/conf.d

allow_anonymous false

listener 1883
password_file /etc/mosquitto/passwd

It works communicating on the machine, but I cant connect with my mqtt dashboard or else.
Could you please help me? Idk what to do anymore :frowning:

Thanks!

Do you think that it might be better to seek help on a Raspberry Pi forum as your problem has nothing to do with the Arduino ?

If you start mosquitto that way it won't use the config file you made.

Given you installed mosquitto using the Raspberry's Debian package system you should start mosquitto as a service:

service mosquitto start

In most cases this isn't necessary as the service probably should start at power up by default.

service mosquitto status

should show you if the service is active.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.