I faced with a problem and hope that someone can help me.
I try to start net_kernel
by :
net_kernel:start([test,shortnames]).
But I faced with this error :
{error,
{{shutdown,
{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}},
{child,undefined,net_sup_dynamic,
{erl_distribution,start_link,[[test,shortnames]]},
permanent,1000,supervisor,
[erl_distribution]}}}
=INFO REPORT==== 23-Apr-2017::21:07:43 ===
Protocol: "inet_tcp": register/listen error: econnrefused
Amazing tip is that when trying to start net_kernel
by:
erl -sname test
net_kernel
will start successfully
and another amazing tip is that after start net_kernel
at least one time after OS boot and exit erl shell , the first way to start net_kernel
will work successfully :|
( net_kernel:start([...]) )
after some search I found that CouchBase and RabbitMQ-Server and Ejabberd and some other apps that uses erlang , reported this error ( nodistribution error )