How to Fix Failed to Start systemd-resolved.service in Ubuntu

The systemd-resolved service provides local network name resolution management for Ubuntu systems via a local DNS stub resolver listening on 127.0.0.53:53. It routes application DNS lookups to upstream nameservers configured by Netplan or NetworkManager. When systemd fails to launch the service during boot, DNS lookups break completely across the operating system: web browsers return ERR_NAME_NOT_RESOLVED, apt update fails with Temporary failure resolving, and systemctl status outputs: Failed to start systemd-resolved.service - Network Name Resolution.

Why Does systemd-resolved Fail to Start in Ubuntu?

The service fails when it cannot bind the DNS stub listener port, parse configuration files, or read symlink pointers. Common causes include:

  • Port 53 (DNS) Socket Contention: Another local DNS server (such as dnsmasq, bind9, unbound, or Pi-hole) is already bound to 0.0.0.0:53, preventing systemd-resolved from listening on port 53.
  • Corrupted or Broken /etc/resolv.conf Symlink: The critical /etc/resolv.conf file is replaced with a static unmanaged file or points to a non-existent stub path.
  • Syntax Errors in resolved.conf: Typographical errors or invalid DNS server IP addresses inside /etc/systemd/resolved.conf.
  • AppArmor Profile Denial: Security profile constraints blocking the systemd-resolve user from accessing socket descriptors.
  • Corrupted DNSSEC Certificate Stacks: Strict DNSSEC validation failing on upstream networks that strip DNSSEC records.

Method 1: Identify and Resolve Port 53 Socket Conflicts

Check if a competing DNS daemon is monopolizing port 53.

  1. Open your terminal and query processes listening on UDP/TCP port 53:
    sudo ss -tulpn | grep :53
  2. Check the process name in the output (e.g. dnsmasq, named, or pihole-FTL).
  3. If another DNS daemon is running, you must choose which service handles resolution:
    • If you require the standalone DNS daemon (e.g. Dnsmasq), disable systemd-resolved’s DNS stub listener by editing /etc/systemd/resolved.conf, setting DNSStubListener=no, and restarting.
    • If you want systemd-resolved to manage DNS, stop and disable the competing daemon:
      sudo systemctl stop dnsmasq
      sudo systemctl disable dnsmasq
  4. Start systemd-resolved:
    sudo systemctl start systemd-resolved.service

Method 2: Restore the Proper /etc/resolv.conf Symlink

Ubuntu requires /etc/resolv.conf to be a dynamic symbolic link to the systemd stub file.

  1. Inspect the current file properties:
    ls -l /etc/resolv.conf
  2. If it is a static file or broken link, remove it:
    sudo rm -f /etc/resolv.conf
  3. Recreate the official symbolic link pointing to the systemd stub resolver:
    sudo ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
  4. Restart the service:
    sudo systemctl restart systemd-resolved.service

Method 3: Disable Strict DNSSEC Validation

If your local ISP or router firewall corrupts DNSSEC packets, disable DNSSEC to restore resolution.

  1. Open the configuration file:
    sudo nano /etc/systemd/resolved.conf
  2. Locate the line #DNSSEC= under the [Resolve] section.
  3. Uncomment it and set it to no:
    [Resolve]
    DNS=1.1.1.1 8.8.8.8
    FallbackDNS=1.0.0.1 8.8.4.4
    DNSSEC=no
  4. Save and exit (Ctrl + O, Enter, Ctrl + X).
  5. Restart systemd-resolved:
    sudo systemctl restart systemd-resolved.service

Method 4: Query Systemd Journal for Detailed Parse Errors

Examine journal logs to identify exact configuration file syntax errors.

  1. View the journal trace:
    journalctl -u systemd-resolved.service -e --no-pager
  2. Check for line numbers indicating syntax warnings.
  3. Correct any typos in /etc/systemd/resolved.conf or drop-in files in /etc/systemd/resolved.conf.d/.

Method 5: Verify DNS Resolution via resolvectl

Confirm that the resolver is active and handling queries.

  1. Query status:
    resolvectl status
  2. Verify that your active interface (e.g. eth0 or wlan0) lists valid DNS servers.
  3. Test a live DNS query:
    resolvectl query google.com
  4. The command should return valid A and AAAA IP records with millisecond response times.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.