DNS service named failed to start

General support questions
Post Reply
ebert2020
Posts: 2
Joined: 2020/07/24 20:49:17

DNS service named failed to start

Post by ebert2020 » 2020/07/24 20:57:16

# systemctl restart named.service


// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

options {
listen-on port 53 { 127.0.0.1; 192.168.1.247; };
// listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
secroots-file "/var/named/data/named.secroots";
recursing-file "/var/named/data/named.recursing";
allow-query { localhost; 192.168.1.0/24; };

/*
- If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
- If you are building a RECURSIVE (caching) DNS server, you need to enable
recursion.
- If your recursive DNS server has a public IP address, you MUST enable access
control to limit queries to your legitimate users. Failing to do so will
cause your server to become part of large scale DNS amplification
attacks. Implementing BCP38 within your network would greatly
reduce such attack surface
*/
recursion no;

dnssec-enable yes;
dnssec-validation yes;

managed-keys-directory "/var/named/dynamic";

pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";

/* https://fedoraproject.org/wiki/Changes/CryptoPolicy */
include "/etc/crypto-policies/back-ends/bind.config";
};

logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};

zone "." IN {
type hint;
file "named.ca";
};
//forward zone
zone "tech.com" IN {
type master;
file "tech.com.db";
allow-update { none; };
allow-query { any; };
};

//backward zone
zone "1.168.192.in-addr.arpa" IN {
type master;
file "tech.rev";
allow-update { none; };
allow-query { any; };


include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";




-- Unit named.service has begun starting up.
Jul 24 16:37:13 pisom bash[6275]: /etc/named.rfc1912.zones:13: unknown option 'zone'
Jul 24 16:37:13 pisom bash[6275]: /etc/named.rfc1912.zones:19: unknown option 'zone'
Jul 24 16:37:13 pisom bash[6275]: /etc/named.rfc1912.zones:25: unknown option 'zone'
Jul 24 16:37:13 pisom bash[6275]: /etc/named.rfc1912.zones:31: unknown option 'zone'
Jul 24 16:37:13 pisom bash[6275]: /etc/named.rfc1912.zones:37: unknown option 'zone'
Jul 24 16:37:13 pisom bash[6275]: /etc/named.root.key:1: unknown option 'managed-keys'
Jul 24 16:37:13 pisom bash[6275]: /etc/named.conf:81: '}' expected near end of file
Jul 24 16:37:13 pisom systemd[1]: named.service: Control process exited, code=exited status=1
Jul 24 16:37:13 pisom systemd[1]: named.service: Failed with result 'exit-code'.
Jul 24 16:37:13 pisom systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
-- Subject: Unit named.service has failed
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
--
-- Unit named.service has failed.
Last edited by ebert2020 on 2020/07/27 15:51:52, edited 1 time in total.

User avatar
TrevorH
Forum Moderator
Posts: 29051
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: DNS service named failed to start

Post by TrevorH » 2020/07/24 21:16:32

Jul 24 16:37:13 pisom bash[6275]: /etc/named.rfc1912.zones:13: unknown option 'zone'
Jul 24 16:37:13 pisom bash[6275]: /etc/named.rfc1912.zones:19: unknown option 'zone'
Jul 24 16:37:13 pisom bash[6275]: /etc/named.rfc1912.zones:25: unknown option 'zone'
Jul 24 16:37:13 pisom bash[6275]: /etc/named.rfc1912.zones:31: unknown option 'zone'
Jul 24 16:37:13 pisom bash[6275]: /etc/named.rfc1912.zones:37: unknown option 'zone'
Jul 24 16:37:13 pisom bash[6275]: /etc/named.root.key:1: unknown option 'managed-keys'
Fix those maybe?
Jul 24 16:37:13 pisom bash[6275]: /etc/named.conf:81: '}' expected near end of file
There also appears to be an uneven number of open/close braces in your config
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

pjsr2
Posts: 483
Joined: 2014/03/27 20:11:07

Re: DNS service named failed to start

Post by pjsr2 » 2020/07/25 12:46:13

You can run

Code: Select all

named-checkconf
to check your configuration files.

ebert2020
Posts: 2
Joined: 2020/07/24 20:49:17

Re: DNS service named failed to start

Post by ebert2020 » 2020/07/27 15:46:12

-- Unit named.service has begun starting up.
Jul 24 16:37:13 pisom bash[6275]: /etc/named.rfc1912.zones:13: unknown option 'zone'
Jul 24 16:37:13 pisom bash[6275]: /etc/named.rfc1912.zones:19: unknown option 'zone'
Jul 24 16:37:13 pisom bash[6275]: /etc/named.rfc1912.zones:25: unknown option 'zone'
Jul 24 16:37:13 pisom bash[6275]: /etc/named.rfc1912.zones:31: unknown option 'zone'
Jul 24 16:37:13 pisom bash[6275]: /etc/named.rfc1912.zones:37: unknown option 'zone'
Jul 24 16:37:13 pisom bash[6275]: /etc/named.root.key:1: unknown option 'managed-keys'
Jul 24 16:37:13 pisom bash[6275]: /etc/named.conf:81: '}' expected near end of file
Jul 24 16:37:13 pisom systemd[1]: named.service: Control process exited, code=exited status=1
Jul 24 16:37:13 pisom systemd[1]: named.service: Failed with result 'exit-code'.
Jul 24 16:37:13 pisom systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
-- Subject: Unit named.service has failed
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
--
-- Unit named.service has failed.
[/quote]

? named.service - Berkeley Internet Name Domain (DNS)
Loaded: loaded (/usr/lib/systemd/system/named.service; disabled; vendor preset: disabled)
Active: active (running) since Mon 2020-07-27 11:26:53 EDT; 15min ago
Process: 9416 ExecStop=/bin/sh -c /usr/sbin/rndc stop > /dev/null 2>&1 || /bin/kill -TERM $MA>
Process: 9432 ExecStart=/usr/sbin/named -u named -c ${NAMEDCONF} $OPTIONS (code=exited, statu>
Process: 9429 ExecStartPre=/bin/bash -c if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr>
Main PID: 9433 (named)
Tasks: 5 (limit: 23756)
Memory: 53.8M
CGroup: /system.slice/named.service
mq9433 /usr/sbin/named -u named -c /etc/named.conf

Jul 27 11:26:53 pisom named[9433]: configuring command channel from '/etc/rndc.key'
Jul 27 11:26:53 pisom named[9433]: command channel listening on 127.0.0.1#953
Jul 27 11:26:53 pisom named[9433]: configuring command channel from '/etc/rndc.key'
Jul 27 11:26:53 pisom named[9433]: command channel listening on ::1#953
Jul 27 11:26:53 pisom named[9433]: managed-keys-zone: loaded serial 21
Jul 27 11:26:53 pisom named[9433]: zone 1.168.192.in-addr.arpa/IN: loaded serial 2020011800
Jul 27 11:26:53 pisom named[9433]: zone tech.com/IN: loaded serial 2020011800
Jul 27 11:26:53 pisom named[9433]: all zones loaded
Jul 27 11:26:53 pisom named[9433]: running
Jul 27 11:26:53 pisom systemd[1]: Started Berkeley Internet Name Domain (DNS).
lines 1-22/22 (END)



-> Hei Thank you very much for helping on my project i have it running now.fixed

Post Reply

Return to “CentOS 7 - General Support”