EMQX5.0.8启动失败

环境信息

  • EMQX 版本:CentOS7 amd64/tar.gz v5.0.8
  • 操作系统及版本:CentOS Linux release 7.9.2009(Core)
  • 其他

问题描述

执行./emqx/bin/emqx start启动失败,提示如下:
Using libs from ‘/sitracs/mqtt/emqx/dynlibs’ due to missing from the OS.
!!!
WARNING: Default (insecure) Erlang cookie is in use.
WARNING: Configure node.cookie in /sitracs/mqtt/emqx/etc/emqx.conf or override from environment variable EMQX_NODE__COOKIE
NOTE: Use the same config value for all nodes in the cluster.
!!!

配置文件及日志

执行./emqx/bin/emqx console 打印如下:
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:56:56] [ds:56:56:8] [async-threads:4]

2022-10-12T10:55:43.053996+08:00 [warning] line: 411, message: <<“84.78% mem usage”>>, mfa: emqx_alarm:do_actions/3, msg: alarm_is_activated, name: high_system_memory_usage
Listener ssl:default on :8883 started.
Listener tcp:default on :1883 started.
2022-10-12T10:55:43.059195+08:00 [error] Failed to start Ranch listener ‘ws:default’ in ranch_tcp:listen([{cacerts,’…’},{key,’…’},{cert,’…’},{ip,{0,0,0,0}},{port,8083},{backlog,1024},{buffer,4096},{high_watermark,1048576},{nodelay,true},{send_timeout,15000},{send_timeout_close,true}]) for reason eaddrinuse (address already in use)
2022-10-12T10:55:43.059519+08:00 [error] Supervisor: {<0.2383.0>,ranch_listener_sup}. Context: start_error. Reason: {listen_error,‘ws:default’,eaddrinuse}. Offender: id=ranch_acceptors_sup,pid=undefined.
Failed to start listener ws:default on :8083: eaddrinuse.
2022-10-12T10:55:43.059776+08:00 [error] crasher: initial call: supervisor:ranch_acceptors_sup/1, pid: <0.2385.0>, registered_name: [], exit: {{listen_error,‘ws:default’,eaddrinuse},[{ranch_acceptors_sup,listen_error,5,[{file,“ranch_acceptors_sup.erl”},{line,66}]},{supervisor,init,1,[{file,“supervisor.erl”},{line,330}]},{gen_server,init_it,2,[{file,“gen_server.erl”},{line,423}]},{gen_server,init_it,6,[{file,“gen_server.erl”},{line,390}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,226}]}]}, ancestors: [<0.2383.0>,ranch_sup,<0.1910.0>], message_queue_len: 0, messages: [], links: [<0.2383.0>], dictionary: [{logger,error_logger}], trap_exit: true, status: running, heap_size: 1598, stack_size: 28, reductions: 8385; neighbours:
2022-10-12T10:55:43.060660+08:00 [error] crasher: initial call: application_master:init/4, pid: <0.2037.0>, registered_name: [], exit: {{bad_return,{{emqx_app,start,[normal,[]]},{‘EXIT’,{{failed_to_start,“ws:default(:8083) : eaddrinuse”},[{emqx_listeners,’-foreach_listeners/1-fun-0-’,2,[{file,“emqx_listeners.erl”},{line,601}]},{lists,foreach,2,[{file,“lists.erl”},{line,1342}]},{emqx_app,maybe_start_listeners,0,[{file,“emqx_app.erl”},{line,90}]},{emqx_app,start,2,[{file,“emqx_app.erl”},{line,50}]},{application_master,start_it_old,4,[{file,“application_master.erl”},{line,293}]}]}}}},[{application_master,init,4,[{file,“application_master.erl”},{line,142}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,226}]}]}, ancestors: [<0.2036.0>], message_queue_len: 1, messages: [{‘EXIT’,<0.2038.0>,normal}], links: [<0.2036.0>,<0.1685.0>], dictionary: [], trap_exit: true, status: running, heap_size: 987, stack_size: 28, reductions: 180; neighbours:
[os_mon] memory supervisor port (memsup): Erlang has closed
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed
{“Kernel pid terminated”,application_controller,"{application_start_failure,emqx,{bad_return,{{emqx_app,start,[normal,[]]},{‘EXIT’,{{failed_to_start,“ws:default(:8083) : eaddrinuse”},[{emqx_listeners,’-foreach_listeners/1-fun-0-’,2,[{file,“emqx_listeners.erl”},{line,601}]},{lists,foreach,2,[{file,“lists.erl”},{line,1342}]},{emqx_app,maybe_start_listeners,0,[{file,“emqx_app.erl”},{line,90}]},{emqx_app,start,2,[{file,“emqx_app.erl”},{line,50}]},{application_master,start_it_old,4,[{file,“application_master.erl”},{line,293}]}]}}}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,emqx,{bad_return,{{emqx_app,start,[normal,[]]},{‘EXIT’,{{failed_to_start,“ws:default(:8083) : eaddrinuse”},[{emqx_listeners,’-foreach_listeners/1-fun-0-’,2,[{file,“emqx_listeners.erl”},{line,601}]},{lists,foreach,2,[{file,“lists.erl”},{line,1342}]},{emqx_app,maybe_start_listeners,0,[{file,“emqx_app.erl”},{line,90}]},{emqx_app,start,2,[{file,“emqx_app.erl”},{line,50}]},{application_master,start_it_old,4,[{file,“application_master.erl”},{line,293}]}]}}}}})

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

未修改过配置文件

端口被占用了,没仔细看

请问怎么确定自己的端口是否被占用呢

Failed to start listener ws:default on :8083: eaddrinuse.
提示在8083端口上启动失败了,用命令netstat -anp|grep 端口号,查看是否被占用就可以了,如果有LISTEN就是被占用了,我们的83和84端口都占用了,在配置文件里把端口修改就可以了

好的,谢谢


请问您知道这是什么情况嘛?

不好意思,我启动的方式和提示不是这样的所以我也不太清楚,单独发帖问一下吧

好的,谢谢你哈