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

1

9

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.

Usm answered 26/6, 2013 at 15:50 Comment(1)
This answer might apply to this question as well.Mainland
F
6

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.

Frederigo answered 26/6, 2013 at 23:26 Comment(1)
I'm starting my Erlang daemons with systemd, so epmd will get killed when I shut the main daemon down. It'd be nice to prevent a daemon from ever starting up epmd to avoid any mistakes but for now starting up epmd separately before any other Erlang daemon is working for me.Usm

© 2022 - 2024 — McMap. All rights reserved.