emqx/changes/ce/fix-10052.zh.md
Zaiming (Stone) Shi 4eb9a69df0 feat(bin/emqx): diagnose boot failure
Prior to this change, when EMQX daemon mode failed to start
it's not quite easy for users to understand what went wrong.
All the know is the node did not start in time
and then instructed to boot the node in 'console' mode wishing
for some logs.
However, the node might actuay be running, causing 'console' mode
to fail with a different reason.

With this change, after a filure of daemon mode boot,
we issue a diagnosis.
1. if node can not be found from ps -ef, instruct the user
   to find information in erlang.log.N
2. if the node is found running, but not responding to pings
   instruct the user to check if the node name is
   resolvable and reachable
3. if the node is responding to pings but emqx app is not
   running, then it's likely a bug. so the user is advised
   to report a github issue.
2023-03-02 14:46:09 +01:00

818 B
Raw Blame History

优化 EMQX daemon 模式启动启动失败的日志。

在进行此更改之前,当 EMQX 用 start 命令启动失败时,用户很难理解出错的原因。 所知道的仅仅是节点未能在预期时间内启动,然后被指示以 console 式引导节点以获取一些日志。 然而,节点实际上可能正在运行,这可能会导致 console 模式因不同的原因而失败。

此次修复后,启动脚本会发出诊断:

  • 如果无法从 ps -ef 中找到节点,则指示用户在 erlang.log.* 中查找信息。
  • 如果发现节点正在运行但不响应 ping,则建议用户检查节点主机名是否有效并可达。
  • 如果节点响应 ping 但 EMQX 应用程序未运行,则很可能是一个错误。在这种情况下,建议用户报告一个Github issue。