emqx/changes/ce/fix-10052.en.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

996 B

Improve daemon mode startup failure logs.

Before this change, it was difficult for users to understand the reason for EMQX 'start' command failed to boot the node. The only information they received was that the node did not start within the expected time frame, and they were instructed to boot the node with 'console' command in the hope of obtaining some logs. However, the node might actually be running, which could cause 'console' mode to fail for a different reason.

With this new change, when daemon mode fails to boot, a diagnosis is issued. Here are the possible scenarios:

  • If the node cannot be found from ps -ef, the user is instructed to find information in log files erlang.log.*.
  • If the node is found to be running but not responding to pings, the user is advised to check if the host name is resolvable and reachable.
  • If the node is responding to pings, but the EMQX app is not running, it is likely a bug. In this case, the user is advised to report a Github issue.