Epmd and systemd

Posted on Feb 3, 2017

By default the epmd on (open)SUSE only listens on 127.0.0.1. Which in itself is a sane default policy. We don’t expose any services directly to everyone just because we install and run them. But if you want to cluster erlang services you need it to listen on more addresses.

$ export EDITOR=vim
$ systemctl edit epmd.socket

Add the following content:

[Socket]
# unset all ports defined in the global file, in our case this is 127.0.0.1:4369
ListenStream=
# add our new ports
ListenStream=[::]:4369

Then run:

systemctl daemon-reload     
systemctl restart epmd.socket epmd.service

Verify our work:

$ ss -tulpen | grep epmd   
tcp    LISTEN     0      128      :::4369                 :::* \
   users:(("epmd",pid=30655,fd=3),("systemd",pid=1,fd=27))     \
   ino:31224577 sk:30 v6only:0 <->