Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mosquitto-dev] Unable to open pwfile when using mosquitto Docker image

Hi All

I am trying to get mosquitto docker to work with a password file.  my run command:

sudo docker run --rm -i -p 1883:1883 -v /volume1/mosquitto:/mosquitto eclipse-mosquitto:latest

my config (/volume1/mosquitto/config/mosquitto.conf):

listener 1883
password_file /mosquitto/data/mosquitto.password_file

container file structure:

(there are 2 copies of password at 2 different locations)

Within the running container I can see the mqtt_passwd in /mosquitto/ but the mosquitto.password_file is missing from /mosquitto/data - I have no idea how that can happen.

If I change my config to point to the password file at /mosquitto/mqtt_passwd I get the same error:

1646978185: mosquitto version 2.0.14 starting
1646978185: Config loaded from /mosquitto/config/mosquitto.conf.
1646978185: Error: Unable to open pwfile "/mosquitto/mqtt_password".
1646978185: Error opening password file "/mosquitto/mqtt_password".

I am very new to docker and pretty new to linux so I am a bit lost. Any help much appreciated.

Back to the top