我正在尝试通过mqtt连接我的Tasmota交换机。我已经在一台虚拟机上安装了蚊子,配置如下:
/etc/mosquitto/matterto.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/etc/mosquitto/acl
# weewx readwrite to the loop
user tasmota
#topic weather/#/etc/mosquitto/conf.d/myconfig.conf
allow_anonymous true
password_file /etc/mosquitto/passwd
persistence false
protocol mqtt
acl_file /etc/mosquitto/acl服务正在运行,端口已打开
这是我的交换机的配置

我正在尝试查看以下消息
mosquitto_sub -h 10.11.0.106 -t '#'我还尝试添加用户和密码,但没有得到任何输出
我可以在日志中看到,连接已建立
1579896351: Config loaded from /etc/mosquitto/mosquitto.conf.
1579896351: Opening ipv4 listen socket on port 1883.
1579896351: Opening ipv6 listen socket on port 1883.
1579896351: New connection from 10.10.0.137 on port 1883.
1579896351: New client connected from 10.10.0.137 as mosqsub|19705-warmachin (c1, k60).
1579896358: Socket error on client mosqsub|19705-warmachin, disconnecting.
1579896358: New connection from 10.10.0.137 on port 1883.
1579896358: New client connected from 10.10.0.137 as mosqsub|19775-warmachin (c1, k60).
1579896361: New connection from 10.11.1.51 on port 1883.
1579896361: New client connected from 10.11.1.51 as DVES_6CA231 (c1, k30, u'tasmota').
1579896361: New connection from 10.11.1.52 on port 1883.
1579896361: New client connected from 10.11.1.52 as DVES_301DDC (c1, k30, u'tasmota').
1579896362: New connection from 10.11.1.54 on port 1883.
1579896362: New client connected from 10.11.1.54 as DVES_350992 (c1, k30, u'tasmota').是我错过了什么,还是我误解了完全错误的东西?
请帮帮忙
发布于 2020-01-25 05:10:51
正如注释中指出的那样,您的ACL文件缺少任何针对anonymous用户或tasmota用户启用的主题。
如果启用ACL,则需要定义希望用户能够访问的所有主题。
https://stackoverflow.com/questions/59903369
复制相似问题