Services & systemd

Socket activation cannot bind its listening address

A .socket unit fails because another listener owns its endpoint. Identify the owner and intended activation model before changing bindings or stopping it.

On this page
  1. Symptoms & scope
  2. Possible causes
  3. Diagnose safely
  4. Evidence-guided next steps
  5. References & review
  6. Related problems

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 use

Find 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.socket

Interpret 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 -ltnp

Interpret 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 -lxnp

Interpret 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?

Share this solution#

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?

Share this solution#

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.