hassio-addons / addon-emqx

EMQX - Home Assistant Community Add-ons
MIT License
67 stars 14 forks source link

Authentication Expired #114

Closed MRobi1 closed 1 day ago

MRobi1 commented 1 month ago

Problem/Motivation

Seemingly at random, I will wake up and my entire smarthome will not be functioning. I'll have a repair issue created in HA saying "Authentication Expired" for MQTT. I get the same thing at random for my ratgdo devices connecting via MQTT. Z2M. Basically anything connected through the EMQX addon will have random authentication expiring at random. I need to restart the add-on/device/etc to re-authenticate. Is there any way to remove the authentication expiring after X amount of time option? The only thing I can find in the EMQX docs is related to certificates expiring.

MRobi1 commented 1 month ago

Woke up this morning to Authentication expired again. Was able to grab some logs this time. Looks like EMQX is randomly crashing (possibly caused by high memory usage?), going into a boot loop with exit code 256, and after a few tries comes back up and is stable again. But in the meantime no clients reconnect unless I restart them.

-----------------------------------------------------------
 Add-on: EMQX
 The most scalable open-source MQTT broker for IoT. An alternative for the Mosquitto add-on
-----------------------------------------------------------
 Add-on version: 0.7.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 13.1  (amd64 / generic-x86-64)
 Home Assistant Core: 2024.10.2
 Home Assistant Supervisor: 2024.10.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-timezone: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
[07:44:23] INFO: Configuring timezone (America/Halifax)...
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service base-addon-timezone successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-emqx: starting
s6-rc: info: service init-emqx successfully started
s6-rc: info: service emqx: starting
s6-rc: info: service emqx successfully started
s6-rc: info: service legacy-services: starting
[07:44:24] INFO: Starting EMQX...
s6-rc: info: service legacy-services successfully started
EMQX_PLUGINS__INSTALL_DIR [plugins.install_dir]: /data/emqx/plugins
EMQX_RPC__PORT_DISCOVERY [rpc.port_discovery]: manual
EMQX_NODE__DATA_DIR [node.data_dir]: /data/emqx/data
EMQX_NODE__COOKIE [node.cookie]: ******
EMQX_NODE__NAME [node.name]: emqx@homeassistant.local
2024-10-16T07:44:47.626040-03:00 [warning] msg: alarm_is_activated, message: <<"93.10% mem usage">>, name: high_system_memory_usage
Listener tcp:default on 0.0.0.0:1883 started.
Listener ssl:default on 0.0.0.0:8883 started.
Listener ws:default on 0.0.0.0:8083 started.
Listener wss:default on 0.0.0.0:8084 started.
Listener http:dashboard on :18083 started.
EMQX 5.8.0 is running now!
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed
[os_mon] memory supervisor port (memsup): Erlang has closed
[07:45:42] INFO: Service EMQX exited with code 256 (by signal 9)
[07:45:43] INFO: Starting EMQX...
EMQX_PLUGINS__INSTALL_DIR [plugins.install_dir]: /data/emqx/plugins
EMQX_RPC__PORT_DISCOVERY [rpc.port_discovery]: manual
EMQX_NODE__DATA_DIR [node.data_dir]: /data/emqx/data
EMQX_NODE__COOKIE [node.cookie]: ******
EMQX_NODE__NAME [node.name]: emqx@homeassistant.local
[07:46:02] INFO: Service EMQX exited with code 256 (by signal 9)
[07:46:03] INFO: Starting EMQX...
EMQX_PLUGINS__INSTALL_DIR [plugins.install_dir]: /data/emqx/plugins
EMQX_RPC__PORT_DISCOVERY [rpc.port_discovery]: manual
EMQX_NODE__DATA_DIR [node.data_dir]: /data/emqx/data
EMQX_NODE__COOKIE [node.cookie]: ******
EMQX_NODE__NAME [node.name]: emqx@homeassistant.local
[07:46:09] INFO: Service EMQX exited with code 256 (by signal 9)
[07:46:10] INFO: Starting EMQX...
EMQX_PLUGINS__INSTALL_DIR [plugins.install_dir]: /data/emqx/plugins
EMQX_RPC__PORT_DISCOVERY [rpc.port_discovery]: manual
EMQX_NODE__DATA_DIR [node.data_dir]: /data/emqx/data
EMQX_NODE__COOKIE [node.cookie]: ******
EMQX_NODE__NAME [node.name]: emqx@homeassistant.local
Listener tcp:default on 0.0.0.0:1883 started.
Listener ssl:default on 0.0.0.0:8883 started.
Listener ws:default on 0.0.0.0:8083 started.
Listener wss:default on 0.0.0.0:8084 started.
Listener http:dashboard on :18083 started.
EMQX 5.8.0 is running now!

image image

github-actions[bot] commented 1 week ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!