EMQX 5.0.16 启动失败

环境

EMQX 版本:EMQX 5.0.16
操作系统版本:Linux CentOS 7.6 amd架构

执行 ./emqx/bin/emqx start 后
给出以些警告
WARNING: Default (insecure) Erlang cookie is in use.
WARNING: Configure node.cookie in /usr/emqx/emqx/etc/emqx.conf or override from environment variable EMQX_NODE__COOKIE
WARNING: Use the same config value for all nodes in the cluster.

然后提示失败
EMQX 5.0.16 failed to start in 120 seconds.

日志显示

===== LOGGING STARTED Tue Feb 7 20:41:39 CST 2023

e[33mWARNING: Default (insecure) Erlang cookie is in use.e(Be[m
e[33mWARNING: Configure node.cookie in /usr/emqx/emqx/etc/emqx.conf or override from environment variable EMQX_NODE__COOKIEe(Be[m
e[33mWARNING: Use the same config value for all nodes in the cluster.e(Be[m
Erlang/OTP 24 [erts-12.3.2.2] [emqx] [64-bit] [smp:8:8] [ds:8:8:8] [async-threads:4]

{“Kernel pid terminated”,application_controller,“{application_start_failure,kernel,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,quicer_nif,{{badmatch,{error,{load_failed,"Failed to load NIF library /usr/emqx/emqx/lib/quicer-0.0.16/priv/libquicer_nif: ‘libatomic.so.1: cannot open shared object file: No such file or directory’"}}},[{quicer_nif,init,0,[{file,"quicer_nif.erl"},{line,54}]},{init,‘-run_on_load_handlers/2-fun-0-’,1,[]}]}}}},{kernel,start,[normal,[]]}}}”}
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,quicer_nif,{{badmatch,{error,{load_failed,“Failed to load NIF library /usr/emqx/emqx/lib/quicer-0.0.16/priv/libquicer_nif: ‘libatomic.so.1: cannot open shared object file: No such file or directory’”}}},[{quicer_nif,init,0,[{file,“quicer_nif.erl”},{line,54}]},{init,‘-run_on_load_handlers/2-fun-0-’,1,[]}]}}}},{kernel,start,[normal,[]]}}})

Crash dump is being written to: log/erl_crash.dump…done

求助解决 感谢

你好,libatomic.so.1: cannot open shared object file... 这个报错是因为缺少 libatomic 这个库,执行 yum -y install libatomic 安装一下再启动 EMQX 就可以了。

如果你是通过 RPM 包安装的,那这个依赖库会自行安装。

前面 WARNING 日志,只是提示你现在正在使用默认的 Erlang Cooike,可能存在一定的安全风险,但是不会影响启动和正常使用。