listeners

listeners

listeners 命令用于查询开启的 TCP 服务监听器。

命令 描述
listeners 查询开启的 TCP 服务监听器
listeners stop <Proto> <Port> 停止监听端口,支持 mqtt:ssl,mqtt:tcp,http:dashboard,http:management,mqtt:ws,mqtt:wss 协议

listeners list

查询开启的 TCP 服务监听器:

$ ./bin/emqx_ctl listeners
listener on mqtt:ssl:8883
    acceptors       : 16
    max_conns       : 102400
    current_conn    : 0
    shutdown_count  : []
listener on mqtt:tcp:0.0.0.0:1883
    acceptors       : 8
    max_conns       : 1024000
    current_conn    : 0
    shutdown_count  : []
listener on mqtt:tcp:127.0.0.1:11883
    acceptors       : 4
    max_conns       : 1024000
    current_conn    : 2
    shutdown_count  : []
listener on http:dashboard:18083
    acceptors       : 2
    max_conns       : 512
    current_conn    : 0
    shutdown_count  : []
listener on http:management:8081
    acceptors       : 2
    max_conns       : 512
    current_conn    : 0
    shutdown_count  : []
listener on mqtt:ws:8083
    acceptors       : 2
    max_conns       : 102400
    current_conn    : 0
    shutdown_count  : []
listener on mqtt:wss:8084
    acceptors       : 2
    max_conns       : 16
    current_conn    : 0
    shutdown_count  : []

listener 参数说明:

Name 描述
acceptors TCP Acceptor 池
max_conns 最大允许连接数
current_conns 当前连接数
shutdown_count 连接关闭原因统计

listeners stop

停止监听端口:

$ ./bin/emqx_ctl listeners stop mqtt:tcp 0.0.0.0:1883
Stop mqtt:tcp listener on 0.0.0.0:1883 successfully.