Powerdns stop workin after update

hi. after i update cyberpanel to latest 2.4.2 version, i figured my powerdns service was stopped and can’t run again. can anyone help me?

# systemctl status pdns
● pdns.service - PowerDNS Authoritative Server
     Loaded: loaded (/lib/systemd/system/pdns.service; disabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Mon 2025-06-30 12:37:41 +0330; 878ms ago
       Docs: man:pdns_server(1)
             man:pdns_control(1)
             https://doc.powerdns.com
    Process: 97586 ExecStart=/usr/sbin/pdns_server --guardian=no --daemon=no --disable-syslog --log-timestamp=no ->
   Main PID: 97586 (code=exited, status=1/FAILURE)
        CPU: 93ms

and my powerdns installed in this path:

ls /etc/powerdns/
named.conf  pdns.conf  pdns.d

thank’s

Thanks for reporting this issue. After reviewing the upgrade code, I’ve identified the problem and have troubleshooting steps for you.

Root Cause: PowerDNS isn’t being restarted after package upgrades, and there may be a MySQL connection issue.

Troubleshooting Steps:

  1. Check MySQL Connection on Port 3306:

Verify MySQL is listening on port 3306

netstat -tlnp | grep 3306

Test MySQL connection

mysql -h 127.0.0.1 -P 3306 -u cyberpanel -p cyberpanel

  1. Verify PowerDNS Configuration:

Check config file permissions

ls -la /etc/powerdns/pdns.conf

Verify MySQL password in config matches actual password

grep gmysql-password /etc/powerdns/pdns.conf

  1. Check PowerDNS Error Logs:

View detailed error

journalctl -u pdns -n 50

Check syslog for PowerDNS errors

grep pdns /var/log/syslog | tail -20

  1. Manual Fix Steps:

Fix permissions if needed

sudo chown root:pdns /etc/powerdns/pdns.conf
sudo chmod 640 /etc/powerdns/pdns.conf

Try starting PowerDNS manually

sudo systemctl start pdns

If that fails, try running directly to see errors

sudo -u pdns /usr/sbin/pdns_server --daemon=no --guardian=no

  1. If MySQL Password Mismatch:
    - Get the correct password from /usr/local/CyberCP/CyberCP/settings.py
    - Update it in /etc/powerdns/pdns.conf (gmysql-password line)

Permanent Fix: We’ll add PowerDNS restart to the upgrade script in the next release.

Let me know which error you see in the logs, and I can provide more specific guidance.

here is the results:

# netstat -tlnp | grep 3306
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      718329/mariadbd

# ls -la /etc/powerdns/pdns.conf
-rwxr-xr-x 1 root root 14644 Jun 29 10:26 /etc/powerdns/pdns.conf

# grep pdns /var/log/syslog | tail -20
Jul  1 10:46:02 srv5976184519 systemd[1]: pdns.service: Main process exited, code=exited, status=1/FAILURE
Jul  1 10:46:02 srv5976184519 systemd[1]: pdns.service: Failed with result 'exit-code'.
Jul  1 10:46:04 srv5976184519 systemd[1]: pdns.service: Scheduled restart job, restart counter is at 63674.
Jul  1 10:46:04 srv5976184519 pdns_server[729014]: Loading '/usr/lib/x86_64-linux-gnu/pdns/libgmysqlbackend.so'
Jul  1 10:46:04 srv5976184519 pdns_server[729014]: This is a standalone pdns
Jul  1 10:46:04 srv5976184519 pdns_server[729014]: Listening on controlsocket in '/run/pdns/pdns.controlsocket'
Jul  1 10:46:04 srv5976184519 pdns_server[729014]: WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version.
Jul  1 10:46:04 srv5976184519 pdns_server[729014]: Unable to bind UDP socket to '0.0.0.0:53': Address already in use
Jul  1 10:46:04 srv5976184519 pdns_server[729014]: Fatal error: Unable to bind to UDP socket
Jul  1 10:46:04 srv5976184519 systemd[1]: pdns.service: Main process exited, code=exited, status=1/FAILURE
Jul  1 10:46:04 srv5976184519 systemd[1]: pdns.service: Failed with result 'exit-code'.
Jul  1 10:46:05 srv5976184519 systemd[1]: pdns.service: Scheduled restart job, restart counter is at 63675.
Jul  1 10:46:05 srv5976184519 pdns_server[729022]: Loading '/usr/lib/x86_64-linux-gnu/pdns/libgmysqlbackend.so'
Jul  1 10:46:05 srv5976184519 pdns_server[729022]: This is a standalone pdns
Jul  1 10:46:05 srv5976184519 pdns_server[729022]: Listening on controlsocket in '/run/pdns/pdns.controlsocket'
Jul  1 10:46:05 srv5976184519 pdns_server[729022]: WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version.
Jul  1 10:46:05 srv5976184519 pdns_server[729022]: Unable to bind UDP socket to '0.0.0.0:53': Address already in use
Jul  1 10:46:05 srv5976184519 pdns_server[729022]: Fatal error: Unable to bind to UDP socket
Jul  1 10:46:05 srv5976184519 systemd[1]: pdns.service: Main process exited, code=exited, status=1/FAILURE
Jul  1 10:46:05 srv5976184519 systemd[1]: pdns.service: Failed with result 'exit-code'.

# sudo chown root:pdns /etc/powerdns/pdns.conf

# sudo chmod 640 /etc/powerdns/pdns.conf

# sudo systemctl start pdns
Job for pdns.service failed because the control process exited with error code.
See "systemctl status pdns.service" and "journalctl -xeu pdns.service" for details.

# sudo -u pdns /usr/sbin/pdns_server --daemon=no --guardian=no
Jul 01 10:47:16 Loading '/usr/lib/x86_64-linux-gnu/pdns/libgmysqlbackend.so'
Jul 01 10:47:16 This is a standalone pdns
Jul 01 10:47:16 Unable to create socket directory (/var/run/pdns/) and it does not exist yet

also the mysql password is correct.

i update to new release too but the problem still there.

# journalctl -u pdns -n 50
Jul 01 11:08:05 srv5976184519 systemd[1]: Stopped PowerDNS Authoritative Server.
Jul 01 11:08:05 srv5976184519 systemd[1]: Starting PowerDNS Authoritative Server...
Jul 01 11:08:05 srv5976184519 pdns_server[57186]: Loading '/usr/lib/x86_64-linux-gnu/pdns/libgmysqlbackend.so'
Jul 01 11:08:05 srv5976184519 pdns_server[57186]: This is a standalone pdns
Jul 01 11:08:05 srv5976184519 pdns_server[57186]: Listening on controlsocket in '/run/pdns/pdns.controlsocket'
Jul 01 11:08:05 srv5976184519 pdns_server[57186]: WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed i>
Jul 01 11:08:05 srv5976184519 pdns_server[57186]: Unable to bind UDP socket to '0.0.0.0:53': Address already in use
Jul 01 11:08:05 srv5976184519 pdns_server[57186]: Fatal error: Unable to bind to UDP socket
Jul 01 11:08:05 srv5976184519 systemd[1]: pdns.service: Main process exited, code=exited, status=1/FAILURE
Jul 01 11:08:05 srv5976184519 systemd[1]: pdns.service: Failed with result 'exit-code'.
Jul 01 11:08:05 srv5976184519 systemd[1]: Failed to start PowerDNS Authoritative Server.
Jul 01 11:08:06 srv5976184519 systemd[1]: pdns.service: Scheduled restart job, restart counter is at 443.
Jul 01 11:08:06 srv5976184519 systemd[1]: Stopped PowerDNS Authoritative Server.
Jul 01 11:08:06 srv5976184519 systemd[1]: Starting PowerDNS Authoritative Server...
Jul 01 11:08:06 srv5976184519 pdns_server[57189]: Loading '/usr/lib/x86_64-linux-gnu/pdns/libgmysqlbackend.so'
Jul 01 11:08:06 srv5976184519 pdns_server[57189]: This is a standalone pdns
Jul 01 11:08:06 srv5976184519 pdns_server[57189]: Listening on controlsocket in '/run/pdns/pdns.controlsocket'
Jul 01 11:08:06 srv5976184519 pdns_server[57189]: WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed i>
Jul 01 11:08:06 srv5976184519 pdns_server[57189]: Unable to bind UDP socket to '0.0.0.0:53': Address already in use
Jul 01 11:08:06 srv5976184519 pdns_server[57189]: Fatal error: Unable to bind to UDP socket
Jul 01 11:08:06 srv5976184519 systemd[1]: pdns.service: Main process exited, code=exited, status=1/FAILURE
Jul 01 11:08:06 srv5976184519 systemd[1]: pdns.service: Failed with result 'exit-code'.
Jul 01 11:08:06 srv5976184519 systemd[1]: Failed to start PowerDNS Authoritative Server.
Jul 01 11:08:07 srv5976184519 systemd[1]: pdns.service: Scheduled restart job, restart counter is at 444.
Jul 01 11:08:07 srv5976184519 systemd[1]: Stopped PowerDNS Authoritative Server.
Jul 01 11:08:07 srv5976184519 systemd[1]: Starting PowerDNS Authoritative Server...
Jul 01 11:08:08 srv5976184519 pdns_server[57192]: Loading '/usr/lib/x86_64-linux-gnu/pdns/libgmysqlbackend.so'
Jul 01 11:08:08 srv5976184519 pdns_server[57192]: This is a standalone pdns
Jul 01 11:08:08 srv5976184519 pdns_server[57192]: Listening on controlsocket in '/run/pdns/pdns.controlsocket'
Jul 01 11:08:08 srv5976184519 pdns_server[57192]: WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed i>
Jul 01 11:08:08 srv5976184519 pdns_server[57192]: Unable to bind UDP socket to '0.0.0.0:53': Address already in use
Jul 01 11:08:08 srv5976184519 pdns_server[57192]: Fatal error: Unable to bind to UDP socket
Jul 01 11:08:08 srv5976184519 systemd[1]: pdns.service: Main process exited, code=exited, status=1/FAILURE
Jul 01 11:08:08 srv5976184519 systemd[1]: pdns.service: Failed with result 'exit-code'.
lines 1-34
# sudo netstat -tuln | grep :53
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN
udp        0      0 127.0.0.53:53           0.0.0.0:*

I see the issue now - port 53 is already in use by systemd-resolved (127.0.0.53). This is preventing PowerDNS from starting.

Quick Fix:

  1. Disable systemd-resolved (Recommended for DNS servers)

Stop and disable systemd-resolved

sudo systemctl stop systemd-resolved
sudo systemctl disable systemd-resolved

Remove the symlink

sudo rm /etc/resolv.conf

Create a new resolv.conf

sudo echo “nameserver 8.8.8.8” > /etc/resolv.conf
sudo echo “nameserver 8.8.4.4” >> /etc/resolv.conf

Start PowerDNS

sudo systemctl start pdns

  1. Verify the Fix

Check if port 53 is now free

sudo netstat -tlnp | grep :53

Check PowerDNS status

sudo systemctl status pdns

Test DNS resolution

dig @localhost example.com

Why This Happened After Update

Some system updates re-enable systemd-resolved, which conflicts with PowerDNS. CyberPanel’s installer usually disables it, but system updates can revert this change.

Permanent Solution

Add this to prevent systemd-resolved from starting:

Mask the service permanently

sudo systemctl mask systemd-resolved

Try the first solution - disabling systemd-resolved should immediately resolve your issue since PowerDNS needs port 53 to function as your DNS server.

yes. that was the problem and with your help it’s solved now. thank you so much.

and the new panel design is so beautiful. thank you again.

1 Like

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.