Erlang NoDistribution error

I ran into a problem and hope someone can help me.

I am trying to run net_kernel

by:

net_kernel:start([test,shortnames]).

      

But I ran into 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

      

Awesome tip: when trying to run net_kernel

by:

erl -sname test

      

net_kernel

will start successfully

and one more great tip: after running net_kernel

at least once after booting the OS and exiting from the erl command line, the first way to start net_kernel

will work successfully: |

( net_kernel:start([...]) )

      

after some searching I found that CouchBase and RabbitMQ-Server and Ejabberd and some other apps that use erlang reported this error (distribution error)

+3


source to share


1 answer


You don't have epmd running, that will be what it says econnrefused

. When you start net_kernel

it wants to register the name with epmd in order to find node.

Make sure net_kernel

the epmd process is running on startup and I'm sure the problem goes away.



In terms of work erl -sname test

, I expect epmd to start for you?

+1


source







All Articles