1epmd(1)                          User Commands                         epmd(1)
2
3
4

NAME

6       epmd - Erlang Port Mapper Daemon
7

DESCRIPTION

9         epmd [-d|-debug] [DbgExtra...] [-address Addresses] [-port No] [-dae‐
10         mon] [-relaxed_command_check]:
11           Starts the port mapper daemon.
12
13         epmd [-d|-debug] [-port No] [-names|-kill|-stop Name]:
14           Communicates with a running port mapper daemon.
15
16       This daemon acts as a name server on all hosts involved in  distributed
17       Erlang  computations.  When  an Erlang node starts, the node has a name
18       and it obtains an address from the host OS kernel. The name and address
19       are  sent to the epmd daemon running on the local host. In a TCP/IP en‐
20       vironment, the address consists of the IP address and  a  port  number.
21       The  node name is an atom on the form of Name@Node. The job of the epmd
22       daemon is to keep track of which node name listens  on  which  address.
23       Hence, epmd maps symbolic node names to machine addresses.
24
25       The  TCP/IP epmd daemon only keeps track of the Name (first) part of an
26       Erlang node name. The Host part (whatever is after the @)  is  implicit
27       in  the node name where the epmd daemon was contacted, as is the IP ad‐
28       dress where the Erlang node can be reached. Consistent and correct  TCP
29       naming  services  are therefore required for an Erlang network to func‐
30       tion correctly.
31
32   Note:
33       On Windows the maximum number of nodes allowed in one epmd instance  is
34       60.  This  is  because of limitations in the current implementation. If
35       you need more nodes, you should look into using and erlang  based  epmd
36       implementation such as Erlang EPMD.
37
38
39         Starting the port mapper daemon:
40           The  daemon  is started automatically by command erl(1) if the node
41           is to be distributed and no running instance is present.  If  auto‐
42           matically launched environment variables must be used to change the
43           behavior of the daemon; see section Environment Variables.
44
45           If argument -daemon is not specified, epmd runs as a normal program
46           with  the controlling terminal of the shell in which it is started.
47           Normally, it is to be run as a daemon.
48
49           Regular startup options are described in section Regular Options.
50
51           The DbgExtra options are described in section DbgExtra Options.
52
53         Communicating with a running port mapper daemon:
54           Communicating with the running epmd daemon by the epmd  program  is
55           done primarily for debugging purposes.
56
57           The different queries are described in section Interactive options.
58

REGULAR OPTIONS

60       These  options  are  available  when starting the name server. The name
61       server is normally started automatically by command erl(1) (if not  al‐
62       ready available), but it can also be started at system startup.
63
64         -address List:
65           Lets  this instance of epmd listen only on the comma-separated list
66           of IP addresses and on the loopback address  (which  is  implicitly
67           added  to  the list if it has not been specified). This can also be
68           set using environment variable ERL_EPMD_ADDRESS; see section  Envi‐
69           ronment Variables.
70
71         -port No:
72           Lets  this instance of epmd listen to another TCP port than default
73           4369.  This  can   also   be   set   using   environment   variable
74           ERL_EPMD_PORT; see section Environment Variables.
75
76         -d | -debug:
77           Enables  debug  output. The more -d flags specified, the more debug
78           output you will get (to a certain limit). This option is most  use‐
79           ful when the epmd daemon is not started as a daemon.
80
81         -daemon:
82           Starts epmd detached from the controlling terminal. Logging ends up
83           in syslog when available and correctly configured. If the epmd dae‐
84           mon is started at boot, this option is definitely to be used. It is
85           also used when command erl automatically starts epmd.
86
87         -relaxed_command_check:
88           Starts the epmd program with relaxed command checking  (mostly  for
89           backward compatibility). This affects the following:
90
91           * With relaxed command checking, the epmd daemon can be killed from
92             the local host with, for example, command epmd -kill even if  ac‐
93             tive  nodes  are  registered. Normally only daemons with an empty
94             node database can be killed with epmd -kill.
95
96           * Command epmd -stop (and the corresponding messages  to  epmd,  as
97             can  be  specified  using erl_interface:ei(3)) is normally always
98             ignored. This because it can cause a strange situation where  two
99             nodes  of the same name can be alive at the same time. A node un‐
100             registers itself by only closing the connection to epmd, which is
101             why  command  stop  was only intended for use in debugging situa‐
102             tions.
103
104             With relaxed command checking enabled, you can forcibly  unregis‐
105             ter live nodes.
106
107           Relaxed command checking can also be enabled by setting environment
108           variable ERL_EPMD_RELAXED_COMMAND_CHECK before starting epmd.
109
110           Use relaxed command checking only on systems with very limited  in‐
111           teractive usage.
112

DBGEXTRA OPTIONS

114   Note:
115       These options are only for debugging and testing epmd clients. They are
116       not to be used in normal operation.
117
118
119         -packet_timeout Seconds:
120           Sets the number of seconds a connection can be inactive before epmd
121           times out and closes the connection. Defaults to 60.
122
123         -delay_accept Seconds:
124           To simulate a busy server, you can insert a delay between when epmd
125           gets notified that a new connection is requested and when the  con‐
126           nection gets accepted.
127
128         -delay_write Seconds:
129           Also  a simulation of a busy server. Inserts a delay before a reply
130           is sent.
131

INTERACTIVE OPTIONS

133       These options make epmd run as an interactive command,  displaying  the
134       results  of sending queries to an already running instance of epmd. The
135       epmd contacted is always on the local node, but  option  -port  can  be
136       used to select between instances if several are running using different
137       ports on the host.
138
139         -port No:
140           Contacts the epmd listening on the specified TCP port  number  (de‐
141           fault  4369).  This  can  also  be  set  using environment variable
142           ERL_EPMD_PORT; see section Environment Variables.
143
144         -names:
145           Lists names registered with the currently running epmd.
146
147         -kill:
148           Kills the currently running epmd.
149
150           Killing the running epmd is only allowed if epmd  -names  shows  an
151           empty  database or if -relaxed_command_check was specified when the
152           running instance of epmd was started.
153
154           Notice that -relaxed_command_check is specified when  starting  the
155           daemon that is to accept killing when it has live nodes registered.
156           When running epmd interactively, -relaxed_command_check has no  ef‐
157           fect.  A  daemon  that  is started without relaxed command checking
158           must be killed using, for example, signals or  some  other  OS-spe‐
159           cific method if it has active clients registered.
160
161         -stop Name:
162           Forcibly unregisters a live node from the epmd database.
163
164           This  command  can  only  be  used  when  contacting epmd instances
165           started with flag -relaxed_command_check.
166
167           Notice that relaxed command checking must enabled for the epmd dae‐
168           mon  contacted.  When  running  epmd  interactively,  -relaxed_com‐
169           mand_check has no effect.
170

ENVIRONMENT VARIABLES

172         ERL_EPMD_ADDRESS:
173           Can be set to a comma-separated list of IP addresses, in which case
174           the  epmd  daemon will listen only on the specified address(es) and
175           on the loopback address (which is implicitly added to the  list  if
176           it  has  not  been specified). The default behavior is to listen on
177           all available IP addresses.
178
179         ERL_EPMD_PORT:
180           Can contain the port number epmd will use. The  default  port  will
181           work fine in most cases. A different port can be specified to allow
182           several instances of epmd,  representing  independent  clusters  of
183           nodes,  to  co-exist  on the same host. All nodes in a cluster must
184           use the same epmd port number.
185
186         ERL_EPMD_RELAXED_COMMAND_CHECK:
187           If set before start, the epmd daemon  behaves  as  if  option  -re‐
188           laxed_command_check was specified at startup. Consequently, if this
189           option is set before starting the Erlang virtual machine, the auto‐
190           matically started epmd accepts the -kill and -stop commands without
191           restrictions.
192

LOGGING

194       On some operating systems syslog will be used for error reporting  when
195       epmd  runs  as a daemon. To enable the error logging, you must edit the
196       /etc/syslog.conf file and add an entry:
197
198         !epmd
199         *.*<TABs>/var/log/epmd.log
200
201
202       where <TABs> are at least one real tab character. Spaces  are  silently
203       ignored.
204

ACCESS RESTRICTIONS

206       The  epmd  daemon  accepts messages from both the local host and remote
207       hosts. However, only the query commands are answered (and  acted  upon)
208       if  the query comes from a remote host. It is always an error to try to
209       register a node name if the client is not a process on the same host as
210       the  epmd  instance is running on. Such requests are considered hostile
211       and the connection is closed immediately.
212
213       The following queries are accepted from remote nodes:
214
215         * Port queries, that is, on which port the node with a specified name
216           listens
217
218         * Name  listing, that is, gives a list of all names registered on the
219           host
220
221       To restrict access further, firewall software must be used.
222
223
224
225Ericsson AB                       erts 13.1.4                          epmd(1)
Impressum