[root@nimbus data2]# epmd -names epmd: up and running on port 4369 with data: name ns_1 at port 21101 name babysitter_of_ns_1 at port 21100 name ligaoren at port 51056
[root@nimbus data2]# erl -name test@nimbus -setcookie 1234 [root@nimbus ~]# epmd -names epmd: up and running on port 4369 with data: name test at port 35441 name ns_1 at port 21101 name babysitter_of_ns_1 at port 21100 name ligaoren at port 51056
ERL_EPMD_ADDRESS=127.0.0.1 epmd -daemon
epmd -address IPList
erl ... -kernel inet_dist_use_interface "{127,0,0,1}"
erl -sname abc -kernel inet_dist_listen_min 4370 inet_dist_listen_max 4375 erl -sname node1 -kernel inet_dist_listen_min 4370 inet_dist_listen_max 4375 erl -sname node2 -kernel inet_dist_listen_min 4370 inet_dist_listen_max 4375 erl -sname node3 -kernel inet_dist_listen_min 4370 inet_dist_listen_max 4375 erl -sname node4 -kernel inet_dist_listen_min 4370 inet_dist_listen_max 4375 erl -sname node5 -kernel inet_dist_listen_min 4370 inet_dist_listen_max 4375
epmd: up and running on port 4369 with data: name node5 at port 4375 name node4 at port 4374 name node3 at port 4373 name node2 at port 4372 name node1 at port 4371 name abc at port 4370
erl -sname node6 -kernel inet_dist_listen_min 4370 inet_dist_listen_max 4375
{error_logger,{{2014,7,3},{20,51,4}},"Protocol: ~tp: register/listen error: ~tp~ n",["inet_tcp",eaddrinuse]} {error_logger,{{2014,7,3},{20,51,4}},crash_report,[[{initial_call,{net_kernel,in it,['Argument__1']}},{pid,<0.20.0>},{registered_name,[]},{error_info,{exit,{erro r,badarg},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,320}]},{proc_lib ,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}},{ancestors,[net_sup,ke rnel_sup,<0.10.0>]},{messages,[]},{links,[<0.17.0>]},{dictionary,[{longnames,fal se}]},{trap_exit,true},{status,running},{heap_size,610},{stack_size,27},{reducti ons,1861}],[]]}
application:set_env(kernel, inet_dist_listen_min, 9100). application:set_env(kernel, inet_dist_listen_max, 9105).
{ kernel, [ {inet_dist_listen_min, 6000}, {inet_dist_listen_max, 7999} ]}
ERL_EPMD_ADDRESS=127.0.0.1 ERL_EPMD_PORT=8384 epmd -daemon
epmd -port 8384 -names
调试状态看细节
[root@Slave4 ~]# [root@Slave4 ~]# epmd -d epmd: Thu Jul 3 15:56:15 2014: epmd running - daemon = 0 epmd: Thu Jul 3 15:56:25 2014: ** got ALIVE2_REQ epmd: Thu Jul 3 15:56:25 2014: registering 'abc:2', port 35383 epmd: Thu Jul 3 15:56:25 2014: type 77 proto 0 highvsn 5 lowvsn 5 epmd: Thu Jul 3 15:56:25 2014: ** sent ALIVE2_RESP for "abc" epmd: Thu Jul 3 15:56:43 2014: ** got ALIVE2_REQ epmd: Thu Jul 3 15:56:43 2014: registering 'xyz:2', port 42802 epmd: Thu Jul 3 15:56:43 2014: type 77 proto 0 highvsn 5 lowvsn 5 epmd: Thu Jul 3 15:56:43 2014: ** sent ALIVE2_RESP for "xyz" epmd: Thu Jul 3 15:57:22 2014: ** got ALIVE2_REQ epmd: Thu Jul 3 15:57:22 2014: node name already occupied abc epmd: Thu Jul 3 15:57:22 2014: ** sent ALIVE2_RESP for "abc" epmd: Thu Jul 3 15:57:22 2014: trying to unregister node with unknown file descriptor 6 epmd: Thu Jul 3 15:57:51 2014: ** got ALIVE2_REQ epmd: Thu Jul 3 15:57:51 2014: registering 'test:1', port 32781 epmd: Thu Jul 3 15:57:51 2014: type 77 proto 0 highvsn 5 lowvsn 5 epmd: Thu Jul 3 15:57:51 2014: ** sent ALIVE2_RESP for "test" epmd: Thu Jul 3 15:58:23 2014: ** got PORT2_REQ epmd: Thu Jul 3 15:58:23 2014: ** sent PORT2_RESP (ok) for "test" epmd: Thu Jul 3 16:05:26 2014: unregistering 'xyz:2', port 42802 epmd: Thu Jul 3 16:05:35 2014: unregistering 'test:1', port 32781