2
私の設定には、TLSとユーザー/パス認証を使用するmosquitto 1.4.12がありますが、Ubuntu 14.04の下で問題なく動作しています。
問題は、$SYS
ブローカーステータスのトピックに公開されているデータがないことです。私は構成を見直してsys_interval
が10に設定されています。
多くのクライアント(mosquitto_sub、paho-mqtt、mqtt.fx)を試したので、クライアントの問題ではなく間違った設定です。
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#
:あなたは
$SYS
トピックを含めるようにACLに余分topic
行を追加する必要があり? '$ SYS'トピックは'# 'サブスクリプションには表示されません。 – hardillb
はい@hardillb、 '$ SYS/broker/clients/active'や' $ SYS/broker/uptime'のような特定のトピックを購読しています – gcw
その中にあなたのmosquitto.confと設定したACLを含めるように質問を編集して、設定したものが表示されるようにしてください。 – hardillb