Unable to start named service on CentOS 7: loading from master file : file not found

Created:

2016-11-16 13:21:39 UTC

Modified:

2017-08-11 03:34:45 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to start named service on CentOS 7: loading from master file : file not found

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk Onyx for Linux
  • Plesk 12.0 for Linux

Symptoms

Unable to start named service on CentOS 7.

The following error message are shown:

# systemctl status named.service         
named.service - Berkeley Internet Name Domain (DNS)
Loaded: loaded (/usr/lib/systemd/system/named.service; disabled)
Active: failed (Result: exit-code) since Sa 2014-12-06 12:42:31 CET; 1h 6min ago
Process: 26473 ExecStartPre=/usr/sbin/named-checkconf -z /etc/named.conf (code=exited, status=1/FAILURE)
named-checkconf[26473]: _default/example1.com/IN: file not found
named-checkconf[26473]: zone example2.com/IN: loading from master file example2.com failed: file not found

or:

# systemctl status named.service
● named.service - Berkeley Internet Name Domain (DNS)
Loaded: loaded (/usr/lib/systemd/system/named.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2016-11-17 11:13:27 CET; 7s ago
Process: 2275 ExecStartPre=/bin/bash -c if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z /etc/named.conf; else echo "Checking of zone files is disabled"; fi (code=exited, status=1/FAILURE)
bash[2275]: zone 0.0.127.IN-ADDR.ARPA/IN: loading from master file localhost.rev failed: file not found
bash[2275]: zone 0.0.127.IN-ADDR.ARPA/IN: not loaded due to errors.
bash[2275]: _default/0.0.127.IN-ADDR.ARPA/IN: file not found

Cause

In CentOS 7, init system initialization was replaced with systemd . As BIND is managed by Plesk and does not interfere with original named startup script, Plesk is installing its own named-chroot script. It means that BIND shall not be started by using named script, instead of that named-chroot is started and managed by Plesk.

Resolution

  1. Disable named.service :

    # systemctl disable named.service
  2. Enable named-chroot.service :

    # systemctl enable named-chroot.service
    # ln -s '/usr/lib/systemd/system/named-chroot.service'
  3. Stop named.service :

    # systemctl disable named.service
  4. Start named-chroot.service :

    # systemctl start named-chroot.service
    # systemctl status named-chroot.service
    named-chroot.service - Berkeley Internet Name Domain (DNS)
    Loaded: loaded (/usr/lib/systemd/system/named-chroot.service; enabled)
    Active: active (running) since Wed 2015-01-07 22:57:33 CST; 27min ago
    Main PID: 12682 (named)
    CGroup: /system.slice/named-chroot.service
    ââ12682 /usr/sbin/named -u named -t /var/named/chroot -c /etc/named.conf -u named -n 2

    Jan 07 23:14:44 Other_example.com named[12682]: automatic empty zone: 8.E.F.IP6.ARPA
    Jan 07 23:14:44 Other_example.com named[12682]: automatic empty zone: 9.E.F.IP6.ARPA
    Jan 07 23:14:44 Other_example.com named[12682]: automatic empty zone: A.E.F.IP6.ARPA
    Jan 07 23:14:44 Other_example.com named[12682]: automatic empty zone: B.E.F.IP6.ARPA
    Jan 07 23:14:44 Other_example.com named[12682]: automatic empty zone: 8.B.D.0.1.0.0.2.IP6.ARPA
    Jan 07 23:14:44 Other_example.com named[12682]: reloading configuration succeeded
    Jan 07 23:14:44 Other_example.com named[12682]: reloading zones succeeded
    Jan 07 23:14:44 Other_example.com named[12682]: all zones loaded
    Jan 07 23:14:44 Other_example.com named[12682]: running
  5. Synchronize DNS zones with a DNS server:

# plesk repair dns

Have more questions? Submit a request
Please sign in to leave a comment.