# 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
listener 1883
listener 1884
protocol websockets
user root
启动代理:
root@agx:/home/zone/z2# /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf1652700122: mosquitto version 1.4.15 (build date Tue, 18 Jun 201911:42:22 -0300) starting
1652700122: Config loaded from /etc/mosquitto/mosquitto.conf.
1652700122: Opening ipv4 listen socket on port 1883.
1652700122: Opening ipv6 listen socket on port 1883.
1652700122: Opening websockets listen socket on port 1884.
1652700122: Warning: Mosquitto should not be run as root/administrator.
1652700122: New client connected from 192.168.1.6 as ce6c70a3-32ba-4b7c-9bf8-95364cc2d46b1652700076349 (c1, k10).
1652700171: New connection from 192.168.1.193 on port 1883.
1652700171: New client connected from 192.168.1.193 as 3f0a486b-52cc-442d-8813-7166fbe45b69 (c1, k60).
1652700195: New connection from 192.168.1.238 on port 1883.
1652700195: New client connected from 192.168.1.238 as 1087df8c-6c85-4645-911f-e5ce75ae03bd (c1, k60).
1652700279: New client connected from 192.168.1.6 as 1652700278651client (c1, k60, u'xfai_mqtt').
1652700322: Socket error on client 1652700278651client, disconnecting.
1652700323: New client connected from 192.168.1.6 as 1652700322256client (c1, k60, u'xfai_mqtt').
1652700326: New client connected from 192.168.1.6 as 1652700325986client (c1, k60, u'xfai_mqtt').