Skip to content

How to Fix PowerDNS Slave Replication Error

DodaTech Updated 2026-06-24 2 min read

In this tutorial, you'll learn about How to Fix PowerDNS Slave Replication Error. We cover key concepts, practical examples, and best practices.

PowerDNS slave server fails to replicate zones from the master, showing failed: AXFR not allowed or Timeout waiting for UDP packet — the master is not configured to allow transfers or the notification setup is incomplete.

The Problem

Failed to retrieve zone 'example.com' from master 192.0.2.1:
AXFR not allowed

Step-by-Step Fix

Step 1: Configure master to allow AXFR

# /etc/powerdns/pdns.conf on master
allow-axfr-ips=192.0.2.2  # Slave IP
also-notify=192.0.2.2
master=yes
slave=no

Step 2: Configure slave

# /etc/powerdns/pdns.conf on slave
slave=yes
master=no
superslave=yes  # If using auto-provisioning

Step 3: Set up supermaster auto-provisioning

# On slave
superslave=yes

# In database
# INSERT INTO supermasters VALUES ('192.0.2.1', 'ns1.example.com', 'admin');

Step 4: Test zone transfer

# From slave
pdns_control retrieve example.com

Step 5: Check replication status

pdns_control list-zones

Expected:

example.com    slave    native    2024062401    In sync with master

Step 6: Monitor replication logs

sudo tail -f /var/log/powerdns/pdns.log | grep -i "axfr\|transfer\|slave"

Prevention Tips

  • Use TSIG-signed AXFR for secure zone transfers
  • Set also-notify to notify slaves of zone changes
  • Monitor zone serial numbers on master vs slave
  • Use supermaster for automatic slave provisioning

Common Mistakes with slave replicate

  1. Non-exhaustive pattern matches that compile with warnings then crash at runtime
  2. Misunderstanding that String is [Char] with poor performance for large text operations
  3. Using foldl instead of foldl' causing stack overflow on large lists

These mistakes appear frequently in real-world POWERDNS code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.

Practice Exercise

Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.

This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.

FAQ

### Why does PowerDNS slave say "AXFR not allowed"?

The master server's allow-axfr-ips does not include the slave IP. Add the slave's IP to this setting on the master and restart pdns. Also verify that the master has master=yes enabled.

How does PowerDNS supermaster work?

A supermaster is a trusted master that can auto-provision zones on slaves. When the slave receives a notification from the supermaster IP for a zone it does not have, it creates the zone as a slave and immediately initiates a zone transfer.

How do I trigger a manual zone transfer to a PowerDNS slave?

Use pdns_control retrieve example.com on the slave. This forces an immediate AXFR from the configured master. Check the logs for transfer status and verify the zone serial was updated.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro