This is my config file /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
pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d
This is my passwd file created using sudo mosquitto_passwd -c /etc/mosquitto/password ananth
ananth:$6$pW5LFAJ/J0bzSHyz$XZsN5MwVc80JqITYvg8qtLxkjWWF2AEzYtoVJpXV9VbjXE5YSXFYC/umWXocj2ScQO/ztFsovgq8o/h00zQTSg==
This is my local config file present in /etc/mosquitto/conf.d/auth.conf
allow_anonymous false
password_file /etc/mosquitto/password
When I run mosquitto_sub -t test
or mosquitto_pub -t test -m "Message"
, Broker is not refusing the connection due to un authentication
I also tried restarting mosquitto using sudo service mosquitto restart
On Ubuntu 16.04 on oracle virtual machine
Am I missing something ?
ps -efc | grep mosquitto
to check that mosquitto is being run with the-c
config option pointing to the config file. iirc mosquitto on 16.04 doesn't default to use the config filemosquit+ 15995 1 TS 19 Jul12 ? 00:00:09 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
sudo mosquitto -c /etc/mosquitto/mosquitto.conf
New client connected from 127.0.0.1 as mosq/Nc2cy7FMx9SI2fab8U (p2, c1, k60).