Your message dated Thu, 7 May 2026 13:58:54 +0300 with message-id <caoq2pxen89pkjnrxc7wm1-i9z6+z-sxd_hudzc2b1bsgvjz...@mail.gmail.com> and subject line Re: Bug#1135795: [Pkg-erlang-devel] Bug#1135795: epmd.socket fails to bind to 127.0.0.1:4369 with “Address already in use” even when nothing is listening has caused the Debian Bug report #1135795, regarding epmd.socket fails to bind to 127.0.0.1:4369 with “Address already in use” even when nothing is listening to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 1135795: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1135795 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: erlang-base Version: 1:27.3.4.1+dfsg-1+deb13u1 Sure — here’s a concise bug report draft you can send to the Debian maintainer. I'm reporting an issue with the Debian epmd systemd socket/service setup. On my system, epmd initially appears to be listening on all interfaces: ss -tulpn | grep epmd tcp LISTEN 0 4096 *:4369 *:* users:(("epmd",pid=2368130,fd=3),("systemd",pid=1,fd=199)) I tried to restrict epmd to localhost by creating a systemd socket override: [Socket] ListenStream=127.0.0.1:4369 After that, I ran: systemctl daemon-reload systemctl restart epmd.socket epmd.service At that point, `pmd.socket failed to start with: epmd.socket: Failed to create listening socket (127.0.0.1:4369): Address already in use This was surprising because no process appeared to be holding port 4369 at that point. I checked with `ss`, and nothing was listening on 4369. However, after removing the socket override entirely, running: systemctl daemon-reload systemctl restart epmd.socket epmd.service epmd started successfully again. So the problem seems to be that overriding epmd.socket with "ListenStream=127.0.0.1:4369" causes a bind failure even when the port is not in use. It looks like either: - the packaged systemd socket setup does not support this override cleanly, - the socket unit and service interaction is not behaving as expected, - or there is some hidden conflict/state left behind by the existing epmd setup. System details: - Debian 13 - epmd auto-installed by ejabberd (apt install ejabberd) Expected behavior: - epmd.socket should bind to 127.0.0.1:4369 successfully when the port is free. Actual behavior: - epmd.socket fails with "Address already in use"
--- End Message ---
--- Begin Message ---Hi! On Thu, May 7, 2026 at 1:15 AM <[email protected]> wrote: > > > It's reasonable if you don't use distributed Erlang. > > Not sure I understand. When I ran "apt install ejabberd", it > auto-installed Erlang via apt. > As far as I know, ejabberd is a distributed XPP server, even if there is a single node, ejabberd uses distributed Erlang. > > > I can reproduce this, as far as I investigated, it is caused by the option > > BindIPv6Only=both > > in the socket file. When systemd binds to IPv6 address, it also listens to > > IPv4 > > packets, which makes address already in use. > > I was finally able to listen on "127.0.0.1" only, because opening 4369 > publicly is asking for trouble[1]. I guess you should file a bugreport for Erlang developers for that. As for now I don't know about any exploitable vulnerability in epmd. > > # ss -tulpn|grep epmd > tcp LISTEN 0 4096 127.0.0.1:4369 0.0.0.0:* > users:(("epmd",pid=2370007,fd=3),("systemd",pid=1,fd=199)) > > To do this, I had to: > > 1. Run: systemctl edit epmd.socket > 2. Add 2 lines line this: > > ### Editing /etc/systemd/system/epmd.socket.d/override.conf > ### Anything between here and the comment below will become the contents > of the drop-in file > > [Socket] > ListenStream= > ListenStream=127.0.0.1:4369 You've found another way of teaching epmd.socket to listen only on 12.7.0.0.1, good. > > Anyway, I don't think that's a bug in epmd.socket. It works as intended. > > I think there is a bug because when I edit like below, epmd failed to > restart. > > [Socket] > ListenStream=127.0.0.1:4369 I don't think that I can account for all possible ways the users chose to override the default socket settings. This particular way fails, but there are others, they are documented in /usr/share/doc/erlang-base/README.Debian. > > I need to add "ListenStream=" - unsure if this is a correct fix but some > people mentioned this on other forums. No, you don't. Please, read the readme in /usr/share/doc/erlang-base/README.Debian, it explains how to make the epmd socket listen only on the lo interface (localhost). As for now, I'm closing this bugreport. Cheers! -- Sergei Golovan
--- End Message ---

