Resolving DNS Zone Addition Errors in cPanel: "Could Not Store Zone Data" Issues Make it Rain Paper

  • DNS, DNS Configuration, DNS Management
  • 0

Overview

This article addresses the error encountered when adding DNS zones, specifically the message: "Sorry, an error occurred while adding DNS zone: Could not store zonedata for domain.tld on username." This error often arises in systems using PowerDNS and indicates that the required control script is missing. Follow the steps below to troubleshoot and resolve this issue.

Pre-requirements

  • Access to your cPanel/WHM server with root privileges.
  • Familiarity with DNS zone management and command-line operations.
  • Backup of existing DNS configurations, if applicable.

Understanding the Error

The error can occur when attempting to add an Addon Domain or Alias, and it typically appears as follows:

Sorry, an error occurred while adding dns zone: Could not store zonedata for domain.tld on username

This issue is often linked to a missing /usr/bin/pdns_control file, which is vital for managing DNS zones in PowerDNS. You can verify this by checking the error logs for entries similar to:

[dnsadmin] Error encountered by “/usr/bin/pdns_control” when running the command: “bind-add-zone -- domain.tld /var/named/domain.tld.db”

Steps to Resolve the Issue

Step Description
1 Log into your server via SSH with root privileges.
2 Delete the problematic zone file using the following command:
 
rm /var/named/domain.tld.db
  Confirm the deletion when prompted.
3 Reinstall PowerDNS using WHM:
 
  1. Navigate to Home >> Service Configuration >> Nameserver Selection.
  2. Select BIND.
  3. Check the box in the Warning box to confirm.
  4. Click the Save button.
4 After BIND installation completes, reselect PowerDNS and click Save.
5 Alternatively, you can reinstall PowerDNS from the command line using:
 
/scripts/setupnameserver bind
 
/scripts/setupnameserver powerdns

Gotchas to Avoid

  • Backup: Always back up your DNS configurations before making changes to avoid data loss.
  • Permission Issues: Ensure you have the necessary permissions to delete files and modify server settings.
  • Service Disruption: Be aware that changing nameservers may temporarily disrupt DNS resolution.

Resolving the "Could Not Store Zone Data" error requires careful management of DNS zone files and PowerDNS settings. By following the steps outlined in this article, you can effectively troubleshoot and fix this issue, ensuring your server can manage DNS zones without further complications.


Did this answer help?

« Back