我的 Mosquitto 服务器整个 ACL 文件内容:
pattern write s1/%c
pattern read s1/%c
我知道应该有可能有单行:
pattern readwrite s1/%c
但我的服务器抱怨错误:
Empty invalid topic access type in acl_file.
我想两条线应该像readwrite
一条线一样。如果我错了,请纠正我。
我确实s1/ss
从客户订阅ss
:
mosquitto_sub -h 192.168.1.8 -t s1/ss --cafile ca.crt -p 8883 -d -u b -P b -i ss
我确实从客户端发布ss
:
mosquitto_pub -h 192.168.1.8 -t s1/ss --cafile ca.crt -m "test" -p 8883 -d -u b -P b -i ss
根据 Mosquitto 日志服务器通知它对发布感到满意,但订阅者未收到消息。更糟糕的是,根据日志同时它重新订阅服务器。
1577902083: New connection from 192.168.1.222 on port 8883.
1577902083: Client ss already connected, closing old connection.
1577902083: New client connected from 192.168.1.222 as ss (c1, k60, ub).
1577902083: Sending CONNACK to ss (0)
1577902083: Received PUBLISH from ss (d0, q0, r0, m0, 's1/ss', ... (4 bytes))
1577902083: Received DISCONNECT from ss
1577902084: New connection from 192.168.1.222 on port 8883.
1577902084: New client connected from 192.168.1.222 as ss (c1, k60, ub).
1577902084: Sending CONNACK to ss (0)
1577902084: Received SUBSCRIBE from ss
1577902084: s1/ss (QoS 0)
1577902084: ss 0 s1/ss
1577902084: Sending SUBACK to ss
为什么我的订阅者没有收到消息?我的 ACL 线路是否正确?