Symptoms & scope
- The socket unit reports Address already in use.
- Another daemon already listens at the endpoint.
Relevant environment
systemd TCP or Unix socket activation; ss is provided by iproute2.
Recognizable messages (synthetic examples)
systemd[1]: example.socket: Failed to listen on sockets: Address already in useFind the listener owner before changing network or service policy.
Possible causes
These are possible explanations, not a confirmed diagnosis. Several independent faults can coexist.
- An application-owned listener may compete with systemd socket activation.
- Duplicate units, wildcard IPv4/IPv6 overlap or stale Unix socket nodes can conflict.
Diagnose safely
Run one command at a time in the relevant session. Read the explanation first. Uppercase placeholders need your own values; tools and privileges vary by distribution. These commands are displayed here and never executed by the website.
Check 1
Replace example.socket; read ListenStream and binding options.
systemctl cat example.socketInterpret the result: A wildcard IPv6 socket may also cover IPv4 depending on BindIPv6Only. Distinguish TCP from a Unix path.
Check 2
Read-only TCP listeners; seeing all process owners may require administrative read access.
ss -ltnpInterpret the result: Match address and port including wildcard listeners. The socket manager differs from an independent standalone daemon.
Check 3
Use for Unix endpoints; process details may be restricted.
ss -lxnpInterpret the result: Do not unlink a path with an active listener. An existing node without a listener requires lifecycle and ownership inspection.
Evidence-guided next steps
Choose one intended listener owner
If the application supports socket activation, configure its documented inherited-socket mode and remove the competing standalone listener. Otherwise disable the unused socket unit and let the daemon own the endpoint.
Precautions: Stopping a listener interrupts clients. Verify inherited file-descriptor support before enabling activation.
Recovery / rollback: Restore prior listener settings and unit enablement, then restart the original owner during maintenance.
Did this solution help you?
Resolve the verified endpoint collision
If distinct services need separate endpoints, change one binding and update clients or the proxy. Remove a stale Unix node only after confirming ownership and absence of a live listener.
Precautions: Record firewall and client assumptions. Unlinking an active socket makes a running service unreachable.
Recovery / rollback: Restore old binding and client settings; recreate a Unix socket by restarting its owner, not by creating a normal file.
Did this solution help you?
References & review
This guide was prepared from primary project or distribution sources and reviewed on the date shown. This is an editorial source check, not evidence that a fix was reproduced on your hardware. Diagnostic log examples are synthetic fixtures. Version-dependent details must be checked against your installed release.
- systemd.socket — upstream manual hosted by Debian (project or distribution documentation)
- systemd.service — upstream manual hosted by Debian (project or distribution documentation)