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:
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: |
|
|
Confirm the deletion when prompted. | |
3 | Reinstall PowerDNS using WHM: |
|
|
4 | After BIND installation completes, reselect PowerDNS and click Save. |
5 | Alternatively, you can reinstall PowerDNS from the command line using: |
|
|
|
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.