Mosquitto - $SYS 主题中没有数据
Mosquitto - No data in $SYS topics
我的设置有使用 TLS 和 user/pass 身份验证的 mosquitto 1.4.12,它在 Ubuntu 14.04 下运行了很长一段时间没有问题。
问题是没有数据发布到任何 $SYS
代理状态主题。我已经检查了配置,sys_interval
设置为 10。是否还需要其他任何东西才能使它正常工作?
我试过很多客户端(mosquitto_sub、paho-mqtt、mqtt.fx),所以看起来像错误的 mosquitto 配置,而不是客户端问题。
mosquitto.conf 看起来像这样:
sys_interval 10
max_queued_messages 10000
max_inflight_messages 100
max_connections -1
connection_messages true
log_dest stderr
log_type error
log_type warning
log_type notice
log_type information
log_type all
log_timestamp true
password_file /etc/mosquitto/conf.d/jp.pw
acl_file /etc/mosquitto/conf.d/acl.conf
persistence true
persistence_location /var/lib/mosquitto/
persistence_file mosquitto.db
persistent_client_expiration 1m
autosave_interval 600
retained_persistence true
listener 8883
tls_version tlsv1.2
cafile /etc/mosquitto/ca_certificates/ca.crt
certfile /etc/mosquitto/ca_certificates/cert.crt
keyfile /etc/mosquitto/ca_certificates/cert.key
require_certificate false
allow_anonymous false
acl.conf有这个,可能不需要:
user test
topic #
ACL 中的主题过滤器应用与正常通配符处理相同的规则,因此仅允许访问 #
不会涵盖“$SYS/#”主题。
您需要向 ACL 添加额外的 topic
行以包含 $SYS
个主题:
user test
topic #
topic $SYS/#
我的设置有使用 TLS 和 user/pass 身份验证的 mosquitto 1.4.12,它在 Ubuntu 14.04 下运行了很长一段时间没有问题。
问题是没有数据发布到任何 $SYS
代理状态主题。我已经检查了配置,sys_interval
设置为 10。是否还需要其他任何东西才能使它正常工作?
我试过很多客户端(mosquitto_sub、paho-mqtt、mqtt.fx),所以看起来像错误的 mosquitto 配置,而不是客户端问题。
mosquitto.conf 看起来像这样:
sys_interval 10
max_queued_messages 10000
max_inflight_messages 100
max_connections -1
connection_messages true
log_dest stderr
log_type error
log_type warning
log_type notice
log_type information
log_type all
log_timestamp true
password_file /etc/mosquitto/conf.d/jp.pw
acl_file /etc/mosquitto/conf.d/acl.conf
persistence true
persistence_location /var/lib/mosquitto/
persistence_file mosquitto.db
persistent_client_expiration 1m
autosave_interval 600
retained_persistence true
listener 8883
tls_version tlsv1.2
cafile /etc/mosquitto/ca_certificates/ca.crt
certfile /etc/mosquitto/ca_certificates/cert.crt
keyfile /etc/mosquitto/ca_certificates/cert.key
require_certificate false
allow_anonymous false
acl.conf有这个,可能不需要:
user test
topic #
ACL 中的主题过滤器应用与正常通配符处理相同的规则,因此仅允许访问 #
不会涵盖“$SYS/#”主题。
您需要向 ACL 添加额外的 topic
行以包含 $SYS
个主题:
user test
topic #
topic $SYS/#