Force registration of node with epmd

Pieter Rautenbach <>
Fri Mar 10 15:17:09 CET 2006


Hello

As a novice Erlang programmer I have the following question: Is it possible to
register a node with epmd after restarting epmd, if (for some unknown reason)
epmd failed to start (or maybe crashed)?

Here's how create this scenario:
1. Create new node: 
     erl -sname tmp
   (Let's assume the Erlang emulator shows  at its prompt.)
2. Check that epmd is running and contains this node:
     epmd -names
   It should return something like this:
     epmd: up and running on port 4369 with data:
     name tmp at port 2581
3. Kill epmd:
     epmd -kill
4. Restart epmd:
     epmd
5. Check if there are any registered nodes:
     epmd -names
   There should be none.
6. Now, with an unregistered node and epmd running, is there any way to      
   register the node without restarting/recreating the node? I've looked
   at the net_kernel module, specifically connect_node/1, e.g.:
     net_kernel:connect_node('').
   This returned true, but the node doesn't show up in epmd. Also, if a 
   node is started with -sname, net_kernel:stop/1 returns 
   {error, not_allowed} as the node was not started with net_kernel:start/?
   in the first place.

Any help or comments will be appreciated.

Thanks
Pieter Rautenbach




More information about the erlang-questions mailing list