PowerDNS replication failing (TCP nameserver had error, cycling backend: GSQLBackend unable to lookup)

Written by - 0 comments

Published on - Listed in Linux MySQL Databases DNS PowerDNS


As I'm currently in the midst of upgrading a PowerDNS cluster, I came across a replication error between the Primary (formerly known as Master) and the Secondary (previously Slave) DNS servers.

PowerDNS

After creating a new DNS record on the Primary (10.10.10.53), the change was not replicated to the Secondary (10.20.20.53).

Logs on the Primary showed:

Sep 17 15:12:39 ip-10-10-10-53 pdns_server[3104867]: Received NOTIFY for example.com from 10.10.10.53 but slave support is disabled in the configuration
Sep 17 15:12:40 ip-10-10-10-53 pdns_server[3104867]: AXFR-out zone 'example.com', client '10.20.20.53', transfer initiated
Sep 17 15:12:40 ip-10-10-10-53 pdns_server[3104867]: TCP nameserver had error, cycling backend: GSQLBackend unable to lookup 'example.com|SOA':Could not prepare statement: SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and type=? and name=?: The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior.
Sep 17 15:12:40 ip-10-10-10-53 pdns_server[3104867]: Received unsuccessful notification report for 'example.com' from 10.10.10.53:53, error: Query Refused

On the Secondary, the logs showed:

Sep 17 15:12:40 ip-10-20-20-53 pdns_server[48671]: XFR-in zone: 'example.com', primary: '10.10.10.53', unable to xfr zone (ResolverException): Remote nameserver closed TCP connection (This was attempt number 1. Excluding zone from slave-checks until 1726578820)

The relevant information is found on the Primary. The GSQLBackend (in this case using MySQL) was unable to run the mentioned SELECT query.

It turned out that on the Primary, MySQL was upgraded from 5.7 to 8.0 in order to support the database schema change in PowerDNS 4.7 - but after the MySQL restart, PowerDNS itself required a restart, too.

After a restart of the pdns service, the DNS replication worked correctly again:

root@ip-10-10-10-53:~# systemctl restart pdns
root@ip-10-10-10-53:~# tail -f /var/log/syslog
Sep 17 15:17:00 ip-10-10-10-53 pdns_server[3244998]: Received NOTIFY for example.com from 10.10.10.53 but slave support is disabled in the configuration
Sep 17 15:17:00 ip-10-10-10-53 pdns_server[3244998]: AXFR-out zone 'example.com', client '10.20.20.53', transfer initiated

Similar success log entry on the Secondary:

root@ip-10-20-20-53:~# tail -f /var/log/syslog
Sep 17 15:17:00 ip-10-20-20-53 pdns_server[48671]: AXFR-in zone: 'example.com', primary: '10.10.10.53', zone committed with serial 2024091702


Add a comment

Show form to leave a comment

Comments (newest first)

No comments yet.

RSS feed

Blog Tags:

  AWS   Android   Ansible   Apache   Apple   Atlassian   BSD   Backup   Bash   Bluecoat   CMS   Chef   Cloud   Coding   Consul   Containers   CouchDB   DB   DNS   Database   Databases   Docker   ELK   Elasticsearch   Filebeat   FreeBSD   Galera   Git   GlusterFS   Grafana   Graphics   HAProxy   HTML   Hacks   Hardware   Icinga   Influx   Internet   Java   KVM   Kibana   Kodi   Kubernetes   LVM   LXC   Linux   Logstash   Mac   Macintosh   Mail   MariaDB   Minio   MongoDB   Monitoring   Multimedia   MySQL   NFS   Nagios   Network   Nginx   OSSEC   OTRS   Office   PGSQL   PHP   Perl   Personal   PostgreSQL   Postgres   PowerDNS   Proxmox   Proxy   Python   Rancher   Rant   Redis   Roundcube   SSL   Samba   Seafile   Security   Shell   SmartOS   Solaris   Surveillance   Systemd   TLS   Tomcat   Ubuntu   Unix   VMWare   VMware   Varnish   Virtualization   Windows   Wireless   Wordpress   Wyse   ZFS   Zoneminder