0
votes

I am trying to configure Mosquitto MQTT broker on windows with Authentication with username and password.

I have added below line in mosquitto.conf file:

allow_anonymous false

username Test remote_username Test

remote_password Test123

While running broker following error occurs:

C:\Program Files (x86)\mosquitto>mosquitto.exe -c mosquitto.conf -p 1883 Error: Invalid bridge configuration. Error found at mosquitto.conf:750. Error: Unable to open configuration file.

Without username and password I am able to start broker and connect with MQTTLens Client.

Thanks, Ashok

1

1 Answers

4
votes

The remote_username and remote_password options are for configuring bridges. You should look at the password_file option. For example

password_file /etc/mosquitto/pwfile

The generate the file with

mosquitto_passwd -c /etc/mosquitto/pwfile ashok

And add more users

mosquitto_passwd /etc/mosquitto/pwfile guest