Closed NoelzeN closed 4 years ago
Try using
emqx console
When running
emqx console
immediately I get
[root@vmi150543 nrehwald]# emqx console
Exec: /usr/lib/emqx/erts-10.3.5.1/bin/erlexec -boot /usr/lib/emqx/releases/v3.2.1/emqx -mode embedded -boot_var ERTS_LIB_DIR /usr/lib/emqx/erts-10.3.5.1/../lib -mnesia dir "/var/lib/emqx/mnesia/emqx1@XXX.XXX.XXX.XXX" -config /var/lib/emqx/configs/app.2019.12.17.09.17.17.config -args_file /var/lib/emqx/configs/vm.2019.12.17.09.17.17.args -vm_args /var/lib/emqx/configs/vm.2019.12.17.09.17.17.args -- console
Root: /usr/lib/emqx
/usr/lib/emqx
Erlang/OTP 21 [erts-10.3.5.1] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:32] [hipe]
Starting emqx on node emqx1@XXX.XXX.XXX.XXX
Then after a minute or two I get
[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',{{badmatch,{error,{shutdown,{failed_to_start_child,emqx_router_sup,{shutdown,{failed_to_start_child,helper,{{badmatch,{error,{not_active_local,emqx_routing_node}}},[{emqx_router_helper,init,1,[{file,\"/tmp/emqx/v3.2.1/_checkouts/emqx/src/emqx_router_helper.erl\"},{line,95}]},{gen_server,init_it,2,[{file,\"gen_server.erl\"},{line,374}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,342}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,249}]}]}}}}}}},[{emqx_app,start,2,[{file,\"/tmp/emqx/v3.2.1/_checkouts/emqx/src/emqx_app.erl\"},{line,32}]},{application_master,start_it_old,4,[{file,\"application_master.erl\"},{line,277}]}]}}}}}"}
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
Crash dump is being written to: /var/log/emqx/crash.dump...done
You have new mail in /var/spool/mail/nrehwald
If I run ps aux during the time when the command line shows "Starting emqx..." for a minute or so, I get the following:
[root@vmi150543 emqx]# ps aux | grep emqx
root 10338 0.0 0.0 191780 2348 pts/0 S+ 09:17 0:00 su - emqx -c /usr/bin/emqx console
emqx 10412 1.1 1.6 2316872 96560 ? Ssl 09:17 0:01 /usr/lib/emqx/erts-10.3.5.1/bin/beam.smp -spp true -e 256000 -Q 1024000 -P 2048000 -A 32 -zdbbl 8192 -- -root /usr/lib/emqx -progname usr/bin/emqx -- -home /var/lib/emqx -- -boot /usr/lib/emqx/releases/v3.2.1/emqx -mode embedded -boot_var ERTS_LIB_DIR /usr/lib/emqx/erts-10.3.5.1/../lib -mnesia dir "/var/lib/emqx/mnesia/emqx1@XXX.XXX.XXX.XXX" -config /var/lib/emqx/configs/app.2019.12.17.09.17.17.config -kernel net_ticktime 60 -setcookie [SOMERANDOMCOOKIE] -ssl_dist_optfile /etc/emqx/ssl_dist.conf -proto_dist inet_tls -name emqx1@XXX.XXX.XXX.XXX -vm_args /var/lib/emqx/configs/vm.2019.12.17.09.17.17.args -- console
emqx 10582 0.0 0.0 11628 340 ? S 09:17 0:00 /usr/lib/emqx/erts-10.3.5.1/bin/epmd -daemon
emqx 11092 0.0 0.0 4356 524 ? Ss 09:17 0:00 erl_child_setup 1024
emqx 11111 0.0 0.0 113192 1208 ? Ss 09:17 0:00 sh -s disksup
emqx 11114 0.0 0.0 4348 596 ? Ss 09:17 0:00 /usr/lib/emqx/lib/os_mon-2.4.7/priv/bin/memsup
emqx 11115 0.0 0.0 4348 352 ? Ss 09:17 0:00 /usr/lib/emqx/lib/os_mon-2.4.7/priv/bin/cpu_sup
emqx 11116 0.0 0.0 11592 452 ? Ss 09:17 0:00 inet_gethost 4
emqx 11117 0.0 0.0 11592 432 ? S 09:17 0:00 inet_gethost 4
root 11515 0.0 0.0 112716 964 pts/1 S+ 09:19 0:00 grep --color=auto emqx
[root@vmi150543 emqx]# netstat -tulpn | grep 5369
tcp 0 0 0.0.0.0:5369 0.0.0.0:* LISTEN 10412/beam.smp
[root@vmi150543 emqx]# netstat -tulpn | grep 6369
tcp 0 0 0.0.0.0:6369 0.0.0.0:* LISTEN 10412/beam.smp
After I get the error message in console, I get this:
[root@vmi150543 emqx]# ps aux | grep emqx
emqx 10582 0.0 0.0 11628 340 ? S 09:17 0:00 /usr/lib/emqx/erts-10.3.5.1/bin/epmd -daemon
root 11568 0.0 0.0 112716 964 pts/1 S+ 09:20 0:00 grep --color=auto emqx
Try using
rm -rf /var/lib/emqx/mnesia/*
emqx console
This solved the issue, now I can start emqx again. Thanks a lot. Our of curiosity, how did this cause the issue? I had multiple folders in there and now I only have one, was that related to the issue?
System: CentOS 7 emqx Version: emqx-3.2.1-1.el7.x86_64 After a System Update I can't start emqx anymore. I have 2 nodes running on 2 more or less identical servers (Both CentOS 7). On Server 1, I performed the System Update and started emqx again, no issue at all. On Server 2, I performed the System Update and since then I can't start emqx anymore. The failing command seems to be this:
When I run it manually I get the following error:
I tried
echo $BINDIR
as well as root user and emqx user but on both Systems (The working one as well as the not working one) I get an empty result. Any hint what the issue might be? Unfortunately I'm not familiar with Erlang at all. The Logfiles are not very helpful.