这是我的配置文件 /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
这是我使用创建的密码文件 sudo mosquitto_passwd -c /etc/mosquitto/password ananth
ananth:$6$pW5LFAJ/J0bzSHyz$XZsN5MwVc80JqITYvg8qtLxkjWWF2AEzYtoVJpXV9VbjXE5YSXFYC/umWXocj2ScQO/ztFsovgq8o/h00zQTSg==
这是我的本地配置文件 /etc/mosquitto/conf.d/auth.conf
allow_anonymous false
password_file /etc/mosquitto/password
当我运行mosquitto_sub -t test
或 时mosquitto_pub -t test -m "Message"
,由于未验证,Broker 不会拒绝连接
我也尝试使用重新启动mosquitto sudo service mosquitto restart
在 oracle 虚拟机上的 Ubuntu 16.04
我错过了什么吗?