EMQX__MQTT__IDLE_TIMEOUT=30s
mqtt.idle_timeout = 30s
emqx_ctl conf
Configuration priority at startup (highest to lowest):
Duplicate configurations can lead to confusing behavior. For instance:
To prevent confusion, it's recommended to use a single way for configuring each setting. This way ensures consistency and reduces the risk of conflicting configurations.
EMQX-Guard-Pro monitors for those duplicated configurations and alerts you when detected.
Let's consider a common mistake:
Configure authorization in
etc/emqx.conf
to reject unauthorized clients.This includes setting
deny_action = disconnect
,no_match = deny
, andsources = []
.
Configure authorization's sources to
built_in_database
on Dashboard while EMQX is running.System works as expected.
After a long runtime, the cluster restarts.
All clients are unable to log in because the authorization's sources is empty (in
etc/emqx.conf
).
Avoid configuring
authorization.sources
inetc/emqx.conf
.Instead, configure
authorization.sources
through the Dashboard.
etc/emqx.conf
file.Use only one way to change each configuration item:
1️⃣. Set node
, cluster
, dashboard
in etc/emqx.conf
file
2️⃣. Set all other settings via Dashboard/CLI
3️⃣. Add to etc/emqx.conf
file only if:
EMQX's dashboard modifies configurations for the entire cluster.
For single node changes:
etc/emqx.conf
filelog.file.level=debug
, others to log.file.level=warning
for temporary trace use.This method is for temporary modifications only.
Long-term use can make configuration management difficult, and it always conflicts with the modifications made in the dashboard.