Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to stop Erlang servers from automatically starting epmd?

Erlang servers will automatically spawn epmd (the Erlang port mapper daemon) if it isn't already running. I would prefer to manage epmd using systemd as a separate service. This is so that if I have multiple Erlang servers running on one host (e.g. RabbitMQ and ejabberd), epmd won't dissapear if the server that automatically spawned epmd gets shut down. systemd will clean up any stray processes when a service gets shut down so an automatically spawned epmd won't survive.

I can mostly handle this by making sure epmd is running as a separate service before starting any Erlang servers but I want to make extra sure that epmd is running only as a separate service.

like image 486
jcollie Avatar asked Jun 26 '13 15:06

jcollie


People also ask

How do you prevent EPMD?

It is also used when the erl command automatically starts epmd. With relaxed command checking, the epmd daemon can be killed from the localhost with i.e. epmd -kill even if there are active nodes registered. Normally only daemons with an empty node database can be killed with the epmd -kill command.

What is EPMD in Erlang?

EPMD (Erlang Port Mapper Daemon) messages are the messages sent between Erlang nodes and the empd process. The message formats are derived from the * lib/kernel/src/erl_epmd.* files as part of the Erlang distribution available from http://www.erlang.org/ Erlang is a functional programming language.


1 Answers

You can always just start epmd at boot time like any other daemon.

That said, epmd doesn't actually exit when you exit the erl instance that auto-started it. You have to manually kill it as far as I know.

At least on Linux and OS X, that seems to be true.

like image 110
David Budworth Avatar answered Oct 12 '22 00:10

David Budworth