[From nobody Thu May  7 12:01:05 2026
Received: (at submit) by bugs.debian.org; 6 May 2026 00:54:19 +0000
X-Spam-Checker-Version: SpamAssassin 4.0.1-bugs.debian.org_2005_01_02
 (2024-03-25) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-15.0 required=4.0 tests=BAYES_00,
 BODY_INCLUDES_PACKAGE,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,
 DKIM_VALID_EF,HAS_PACKAGE,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,
 RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=ham
 autolearn_force=no version=4.0.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 28; hammy, 150; neutral, 55; spammy,
 0. spammytokens: hammytokens:0.000-+--systemctl,
 0.000-+--H*RU:198.252.153.129,
 0.000-+--Hx-spam-relays-external:mx1.riseup.net,
 0.000-+--Hx-spam-relays-external:198.252.153.129, 0.000-+--UD:socket
Return-path: &lt;marvology@riseup.net&gt;
Received: from mx1.riseup.net ([198.252.153.129]:35132)
 by buxtehude.debian.org with esmtps
 (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
 (Exim 4.96) (envelope-from &lt;marvology@riseup.net&gt;)
 id 1wKQWp-00BdUB-1p for submit@bugs.debian.org;
 Wed, 06 May 2026 00:54:19 +0000
Received: from mx0.riseup.net (mx0-pn.riseup.net [10.0.1.42])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by mx1.riseup.net (Postfix) with ESMTPS id 4g9H2f43HfzDqwD
 for &lt;submit@bugs.debian.org&gt;; Wed,  6 May 2026 00:54:18 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riseup.net; s=squak;
 t=1778028858; bh=wQSnHQw87a0mLk9w6ElaW3JfxoBd9dBBDZuVPsJ8Mis=;
 h=Date:From:To:Subject:From;
 b=h6SAsNy24/3IMiVmYgg1gq1vhIAv21tUSRl/jbcR/DP5XnGDtNnnCNhpvqIg11yOU
 0r1gqT5yWUq8L+Zfutxd2CBkrlI9JcVMSWyBDag3kGyFH97B341RPB+jOI5zWRxTu+
 lFQnNoYwhXBmTKryy+873MdqLtwJF1EjfXPjoDvU=
Received: from fews04-sea.riseup.net (fews04-sea-pn.riseup.net [10.0.1.154])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by mx0.riseup.net (Postfix) with ESMTPS id 4g9H2c6wrWz9sJf
 for &lt;submit@bugs.debian.org&gt;; Wed,  6 May 2026 00:54:16 +0000 (UTC)
X-Riseup-User-ID: 397B68D588E83F67F10A5A5725D7034B4D339BB38C887021E02CE9D61360AA60
Received: from [127.0.0.1] (localhost [127.0.0.1])
 by fews04-sea.riseup.net (Postfix) with ESMTPSA id 4g9H2P59Zcz5w0K
 for &lt;submit@bugs.debian.org&gt;; Wed,  6 May 2026 00:54:05 +0000 (UTC)
MIME-Version: 1.0
Date: Wed, 06 May 2026 00:54:05 +0000
From: marvology@riseup.net
To: submit@bugs.debian.org
Subject: =?UTF-8?Q?epmd=2Esocket_fails_to_bind_to_127=2E0=2E0=2E1=3A4369_?=
 =?UTF-8?Q?with_=E2=80=9CAddress_already_in_use=E2=80=9D_even_when_nothing?=
 =?UTF-8?Q?_is_listening?=
Message-ID: &lt;284ef9df0bf17daa164f6cf68220de14@riseup.net&gt;
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Delivered-To: submit@bugs.debian.org

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:((&quot;epmd&quot;,pid=2368130,fd=3),(&quot;systemd&quot;,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
&quot;ListenStream=127.0.0.1:4369&quot; 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 &quot;Address already in use&quot;
]