运行emqx5.0.8出错(emqx-5.0.8-ubuntu20.04-arm64.tar.gz)

环境信息

  • EMQX 版本:5.0.8 开源版
  • 操作系统及版本:Ubuntu20.04 arm64
  • 其他 arm64

问题描述

执行./emqx/bin/emqx start无法启动

!!!!!!
WARNING: Default (insecure) Erlang cookie is in use.
WARNING: Configure node.cookie in /etc/emqx/emqx.conf or override from environment variable EMQX_NODE__COOKIE
NOTE: Use the same config value for all nodes in the cluster.
!!!!!!
EMQX 5.0.8 failed to start in 120 seconds.
Please find more information in erlang.log.N
Or run 'env DEBUG=1 /usr/bin/emqx console' to have logs printed to console.

配置文件及日志

配置默认无改动

执行./emqx/bin/emqx console

root@localhost:~# ./emqx/bin/emqx console
!!!!!!
WARNING: Default (insecure) Erlang cookie is in use.
WARNING: Configure node.cookie in /root/emqx/etc/emqx.conf or override from environment variable EMQX_NODE__COOKIE
NOTE: Use the same config value for all nodes in the cluster.
!!!!!!
log.file_handlers.default.enable = EMQX_LOG__FILE_HANDLERS__DEFAULT__ENABLE = false
log.console_handler.enable = EMQX_LOG__CONSOLE_HANDLER__ENABLE = true
Erlang/OTP 24 [erts-12.2.1] [emqx] [64-bit] [smp:8:6] [ds:8:6: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}}},{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}}},{kernel,start,[normal,[]]}}})

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

看起来是 QUIC 依赖的库在你系统上没有,导致 QUIC 启动失败了,这个我们先调查下

@yibingyihan
你执行一下下面的指令,看看是否缺少什么库
find ./ -name libquicer_nif.so | xargs ldd
然后 arm 架构比较多,不一定是缺库, 我们编的包是 aarm64的 ,如果和你部署的架构不一致的话,可能需要你自己来编译下

@blankalupo 你好,5.0.16 版本.Centos7 环境下 x86 架构的,tar.gz 安装包方式启动,也是出现类型问题,无法启动

将缺少的库文件,从emqx安装目录下的dynlibs目录内,拷贝一份到/lib64或者在/lib64目录内创建对应的软连 ,再启动emqx就可以了。