DNSmanager 6 Knowledge Base
en En
es Es

PowerDNS service does not start after server reboot

Description

After a server reboot, the PowerDNS (pdns) service fails to start and enters a crash loop. The logs contain the following error:

Unable to bind to control socket at '/var/run/pdns-domain_com/pdns-domain.com.controlsocket', reason: Permission denied

This error occurs due to a mismatch in the control socket directory paths. The path is configured differently in the pdns configuration file and in the RuntimeDirectory parameter of the systemd service. As a result, the pdns process cannot find the required directory and crashes because systemd creates and removes its own directory.

Solution

To resolve the issue, synchronize the socket directory path in the pdns configuration with the path created by systemd:

  1. Connect to the server with the control panel via SSH. For more information about connecting via SSH, see Workstation setup.
  2. Check the pdns configuration file:

    1. Open the pdns configuration file for your domain, typically located at /etc/powerdns/pdns-domain.com.conf:

      cat /etc/powerdns/pdns-domain.com.conf
    2. Check the value of the socket-dir parameter:

      Example output
      socket-dir=/var/run/pdns-domain_com
  3. Compare this value with the path created by systemd:
    1. Open the systemd service file, typically located at /etc/systemd/system/pdns@domain.com.service:
      cat /etc/systemd/system/pdns@domain.com.service
    2. Check the value of the RuntimeDirectory parameter:
      Example parameter
      RuntimeDirectory=pdns-%i
      Comment
      Note
      In the provided examples, the paths differ. The correct path uses a dot as a separator, not an underscore.
  4. Fix the mismatch. If the values do not match, edit the pdns configuration file /etc/powerdns/pdns-domain.com.conf and specify the correct value for the socket-dir parameter:
    socket-dir=/var/run/pdns-domain.com
  5. Restart the service:
    systemctl restart pdns@domain.com.service
  6. Verify the service status:
    systemctl status pdns@domain.com.service
    Example output
    Active: active (running) since Wed 2025-09-24 10:50:58; 5min ago
    Expected output indicating an active service.
Useful tips

Related topics:

The article was last updated on 12.04.2025. The article was prepared by technical writers of ISPsystem