mosquitto icon indicating copy to clipboard operation
mosquitto copied to clipboard

Unable to open config file /home/USER/mosquitto/mosquitto.conf

Open chrysa95 opened this issue 6 years ago • 4 comments

Hello ,

I add the auth plugin in the mosquitto broker but when I am trying to run mosquitto -c /home/USER/mosquitto/mosquitto.conf it returns me the following error:

(i am following this tutorial http://www.yasith.me/2016/04/securing-mqtt-connection-using.html)

Error: Unable to open config file /home/USER/mosquitto/mosquitto.conf
Error found at /home/USER/mosquitto/mosquitto.conf:0.
Error: Unable to open configuration file.

Any ideas? Thanks !!

chrysa95 avatar Jan 28 '19 14:01 chrysa95

Do you definitely have the correct permission to access the file?

ralight avatar Jan 31 '19 23:01 ralight

Commenting out the below in my config solved the above issue. It seems to know /var/lib/mosquitto/ is my persistent location without specifying it. For me, it was not a permissions issue.

#persistence_location /var/lib/mosquitto/

In some cases, I think it is able to open the configuration file. Even if you get the error "Error: Unable to open configuration file."

(I was hoping to see a reply from @chrysa95 how they resolved their issue?)

tamusjroyce avatar May 25 '19 23:05 tamusjroyce

oui pour moi la solution était de donner toutes les autorisations au système

walidmr11 avatar Oct 13 '21 13:10 walidmr11

@chrysa95 did you solve the problem? Can the issue be closed?

ckrey avatar Oct 14 '24 15:10 ckrey