Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] Authentication with user and password - Error: Unable to open pwfile

Hi,

Your problem is that the path to your password file is missing a leading /

password_file etc/mosquitto/passwordsvpj

instead of

password_file /etc/mosquitto/passwordsvpj

On 13/10/18 10:00, chr cza wrote:
> Hi @all,
> 
> 
> on my Raspberry Pi I want all clients to use  a username and password
> before publish or subscribe a topic. But the following issue occurs and
> can not fix it.
> 
> 
> _*This is my mosquitto.conf file (without comments):*_
> 
> 
> pid_file /var/run/mosquitto.pid
> 
> persistence true
> 
> persistence_location /var/lib/mosquitto/
> 
> log_dest file /var/log/mosquitto/mosquitto.
> 
> include_dir /etc/mosquitto/conf.d
> 
> 
> _*This is my mosquittoCCZ.conf file within "/etc/mosquitto/conf.d"*_
> 
> 
> # Standard Listener
> 
> #listener 1883
> 
> protocol mqtt
> 
> log_type error
> 
> log_type warning
> 
> log_type notice
> 
> log_type information
> 
> 
> # Websockets Listener
> 
> listener 9001
> 
> protocol websockets
> 
> 
> log_dest syslog
> 
> log_dest stdout
> 
> 
> connection_messages true
> 
> log_timestamp true
> 
> 
> allow_anonymous false
> 
> password_file etc/mosquitto/passwordsvpj
> 
> 
> _*This is the error:*_
> 
> 
> pi@raspberrypi:~ $ sudo mosquitto -c /etc/mosquitto/mosquitto.conf
> 
> 1539358641: mosquitto version 1.5.3 starting
> 
> 1539358641: Config loaded from /etc/mosquitto/mosquitto.conf.
> 
> 1539358641: Error: Unable to open pwfile "etc/mosquitto/passwordsvpj".
> 
> 1539358641: Error opening password file "etc/mosquitto/passwordsvpj".
> 
> 
> _*Some more information:*_
> 
> 
> pi@raspberrypi:~ $ ls -la /etc/mosquitto/
> 
> insgesamt 36
> 
> drwxr-xr-x   5 root root  4096 Okt 12 17:22 .
> 
> drwxr-xr-x 121 root root 12288 Okt  6 11:26 ..
> 
> drwxr-xr-x   2 root root  4096 Okt  6 11:24 ca_certificates
> 
> drwxr-xr-x   2 root root  4096 Okt  6 11:24 certs
> 
> drwxr-xr-x   2 root root  4096 Okt 12 17:22 conf.d
> 
> -rw-r--r--   1 root root   348 Aug  8 16:14 mosquitto.conf
> 
> -rw-r--r--   1 pi   pi     585 Okt 12 16:51 passwordsvpj
> 
> 
> 
> Can somebody help me? I was looking for a solution in a lot of forums
> but wasn't successful.
> 
> 
> Thanks in advance
> 
> 
> 
> 
> _______________________________________________
> mosquitto-dev mailing list
> mosquitto-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/mosquitto-dev
> 

-- 
http://www.hardill.me.uk/wordpress
http://about.me/hardillb
http://flickr.com/photos/hardillb/
http://last.fm/user/hardillb
https://keybase.io/hardillb


Back to the top