Troubleshooting "Failed to Fetch Zone" Error in cPanel's DNS Zone Editor Make it Rain Paper

  • DNS, DNS Configuration, DNS Management
  • 0

Introduction

Encountering the error message "Failed to fetch zone" when using WHM or cPanel to edit a DNS zone can be frustrating. This issue usually indicates a problem with dnsadmin, which is responsible for managing DNS zones.

Common Causes

This error can arise from several scenarios, including:

  • The zone file lacking proper permissions.
  • The zone file or its cache file not opening correctly.

Zone files are typically located in the directory: /var/named/.

Reviewing the DNSAdmin Log

The best way to troubleshoot this error is to review the DNSAdmin log, which can be found at:

/usr/local/cpanel/logs/dnsadmin_log

Example Error

Here is an example of an error you might encounter:

warn [dnsadmin] Unable to save zone example_domain.com: (XID 7rgpvk) 
The system failed to rename “/var/named/cache/.tmp.cc5y2.domain.tld.db”
to “/var/named/cache/domain.tld.db” because of an error: Is a directory

In this case, the cache file for the zone could not open because it was mistakenly created as a directory. The issue can be resolved by moving the directory out of the way so the cache can rebuild.

Troubleshooting Steps

To resolve this type of error, follow these steps:

    1. Confirm that the domain's DNS zone file in /var/named/ is owned by the user and group: named.
    2. Ensure the zone file has permissions set to 600 (-rw------).
    3. Check that the folder /var/named/cache/ is owned by root with 700 (rwx------) permissions, and that the .db files inside are owned by root with 600 (-r-------) permissions.
    4. If issues persist, check the log using a command similar to the following, replacing domain.tld with your actual domain:
grep 'domain.tld' /usr/local/cpanel/logs/dnsadmin_log

By following these troubleshooting steps, you can effectively address the "Failed to fetch zone" error in cPanel's DNS Zone Editor, ensuring proper management of your DNS records.


Did this answer help?

« Back