MQTT研究之EMQ:【EMQX使⽤中的⼀些问题记录(3)】
EMQX功能强⼤,但是帮助信息或者可⽤资料的确有限,遇到个问题,⽐较难到处理的头绪,今天,我要记录的是,使⽤中出现EMQX宕机,但是呢,启动也启动不了。今天
记录的内容,就以操作EMQX 3.2.3的版本来说吧。
你可能看到有下⾯的信息:
[root@tkwh-kfcs-app3 emqx]# emqx start
emqx v3.2.3is started successfully!
但是呢,你查看状态,⼜会看到下⾯的内容:
[root@tkwh-kfcs-app3 emqx]# emqx_ctl status
Node 'emqx@10.95.200.13' not responding to pings
这个是什么情况呢?其实就是EMQX启动异常了,然后⼜shutdown了,看看⽇志,在/var/log/emqx下⾯的 erlang.log.1 ⽂件⾥⾯可以到些许的信息。
1
2 =====
3 ===== LOGGING STARTED Fri Oct 2510:55:38 CST 2019
4 =====
5 Exec: /usr/lib/emqx/erts-10.3/bin/erlexec -boot /usr/lib/emqx/releases/v3.2.3/emqx -mode embedded -boot_var ERTS_LIB_DIR /usr/lib/emqx/erts-10.3/../lib -mnesia dir "/var/lib/emqx/mnesia/emqx@10.95.200.13" -config /var onfigs/app.2019.10.25.10.fig -args_file /var/lib/emqx/configs/vm.2019.10.25.10.55.38.args -vm_args /var/lib/emqx/configs/vm.2019.10.25.10.55.38.args -- console^M
6 Root: /usr/lib/emqx^M
7 /usr/lib/emqx^M
8 Erlang/OTP 21 [erts-10.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:128] [hipe]^M
9 ^M
102019-10-2510:55:43.487 [info] event=server_setup_successfully driver=tcp socket="#Port<0.8>"^M
112019-10-2510:55:43.488 [info] event=start^M
12 Starting emqx on node emqx@10.95.200.13^M
132019-10-2510:55:43.562 [info] Ekka(Membership): Node emqx@10.95.200.22 up^M
142019-10-2510:55:43.580 [notice] application: emqx^M
15 exited: {bad_return,^M
16 {{emqx_app,start,[normal,[]]},^M
17 {'EXIT',^M
18 {{badmatch,^M
19 {error,^M
20 {shutdown,^M
21 {failed_to_start_child,emqx_router_sup,^M
22 {shutdown,^M
23 {failed_to_start_child,helper,^M
24 {{badmatch,{error,{not_active_local,emqx_routing_node}}},^M
25 [{emqx_router_helper,init,1,^M
26 [{file,^M
27"/emqx_temp/emqx_rel/_checkouts/emqx/src/emqx_l"},^M
exited28 {line,95}]},^M
29 {gen_server,init_it,2,^M
30 [{file,"l"},{line,374}]},^M
31 {gen_server,init_it,6,^M
32 [{file,"l"},{line,342}]},^M
33 {proc_lib,init_p_do_apply,3,^M
34 [{file,"l"},{line,249}]}]}}}}}}},^M
35 [{emqx_app,start,2,^M
36 [{file,^M
37"/emqx_temp/emqx_rel/_checkouts/emqx/src/l"},^M
38 {line,32}]},^M
39 {application_master,start_it_old,4,^M
40 [{file,"l"},{line,277}]}]}}}}^M
41 type: permanent^M
42 [os_mon] memory supervisor port (memsup): Erlang has closed^M
43 [os_mon] cpu supervisor port (cpu_sup): Erlang has closed^M
44 {"Kernel pid terminated",application_controller,"{application_start_failure,emqx,{bad_return,{{emqx_app,start,[normal,[]]},{'EXIT',{{badmatch,{error,{shutdown,{failed_to_start_child,emqx_router_sup,{shutdown,{failed_to_start_chi ld,helper,{{badmatch,{error,{not_active_local,emqx_routing_node}}},[{emqx_router_helper,init,1,[{file,\"/emqx_temp/emqx_rel/_checkouts/emqx/src/emqx_l\"},{line,95}]},{gen_server,init_it,2,[{file,\"l\ "},{line,374}]},{gen_server,init_it,6,[{file,\"l\"},{line,342}]},{proc_lib,init_p_do_apply,3,[{file,\"l\"},{line,249}]}]}}}}}}},[{emqx_app,start,2,[{file,\"/emqx_temp/emqx_rel/_checkouts/emqx/src/emqx_app
.erl\"},{line,32}]},{application_master,start_it_old,4,[{file,\"l\"},{line,277}]}]}}}}}"}^M^M
45 Kernel pid terminated (application_controller) ({application_start_failure,emqx,{bad_return,{{emqx_app,start,[normal,[]]},{'EXIT',{{badmatch,{error,{shutdown,{failed_to_start_child,emqx_router_sup,{sh^M^M
46 ^M^M
47 Crash dump is being written to: /var/log/emqx/done^M^M
什么意思呢?其实就是在安装路径的/var/lib/emqx下⾯有些异常数据,导致emqx启动时做数据同步时,出现错误,最后就宕机了。解决办法,就是将/var/lib/emqx下的数据清除
掉,然后重新安装,当然,相关的配置,需要再次配置⼀下。
最后,再次将emqx安装⼀遍,就没有什么问题了。
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论