Erlang net_kernel无法启动节点(无分发)

e3bfsja2  于 2022-12-08  发布在  Erlang
关注(0)|答案(3)|浏览(215)

I am new to Erlang and RabbitMQ.
I have a node on RabbitMQ on CentOS which I had to reset to restart the message queues. Ever since the restart, the Erlang refuses to start the node. There was an erlang_vm corrupted error that was fixed with a rabbit remove and restart. I've tried net_kerlnel start in erlang shell but it fails.

[root@directadmin ~]# erl
Erlang R16B03 (erts-5.10.4) [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V5.10.4  (abort with ^G)
1> node().
nonode@nohost
2> net_kernel:start([rabbit, shortnames]).
{error, 
    {{shutdown,
         {failed_to_start_child,net_kernel,{'EXIT',nodistribution}}},
     {child,undefined,net_sup_dynamic,
         {erl_distribution,start_link,[[rabbit,shortnames]]},
         permanent,1000,supervisor,
         [erl_distribution]}}}
3>
=INFO REPORT==== 26-Jan-2017::18:58:36 ===
Protocol: "inet_tcp": the name rabbit@directadmin seems to be in use by another Erlang node

I've noticed that someone else had a similar issue and they cited that fixing rule set in iptables resolved their issue. I am not sure how that is done. I've tried service iptables restart but that didn't make any difference

http://erlang.org/pipermail/erlang-questions/2015-October/086270.html

When I try run rabbitmqctl stop_app I get this error

[root@directadmin ~]# rabbitmqctl stop_app
Stopping node rabbit@directadmin ...
Error: erlang_vm_restart_needed

When I try running 'rabbitmqctl stop' I get the vm corrupted error

[root@directadmin ~]# rabbitmqctl stop
Stopping and halting node rabbit@directadmin ...
Error: {badarg,[{io,format,
                [standard_error,
                 "Erlang VM I/O system is damaged, restart needed~n",[]],
                []},
            {rabbit_log,handle_damaged_io_system,0,
                        [{file,"src/rabbit_log.erl"},{line,110}]},
            {rabbit_log,with_local_io,1,
                        [{file,"src/rabbit_log.erl"},{line,95}]},
            {rabbit,'-stop_and_halt/0-after$^0/0-0-',0,
                    [{file,"src/rabbit.erl"},{line,434}]},
            {rabbit,stop_and_halt,0,[{file,"src/rabbit.erl"},{line,431}]},
            {rpc,'-handle_call_call/6-fun-0-',5,
                 [{file,"rpc.erl"},{line,187}]}]}
e5nszbig

e5nszbig1#

磁盘已满,可能是因为写入日志文件时出错。我删除了var/log中占用最多空间的日志,然后运行yum erase erlang,然后干净地重新安装了erlang和rabbitmq。这解决了问题。感谢大家的贡献!

oxiaedzo

oxiaedzo2#

你需要rabbitmqctl stop,而不仅仅是rabbitmqctl stop_app
根据the documentationstop_app“停止RabbitMQ应用程序,让Erlang节点继续运行”,而stop“停止运行RabbitMQ的Erlang节点”。

new9mtju

new9mtju3#

问题是由于epmd没有启动。您需要手动启动epmd,或者在启动erl时提供一个节点名。这不是rabbitmq发行版特有的。
http://erlang.org/documentation/doc-8.0/erts-8.0/doc/html/epmd.html

相关问题