[systemd-devel] Trying to set up DNS server.

Motokazu Nakai sagittariusg at gmail.com
Wed Jan 27 01:11:44 PST 2016


Hello Mantas,

Thank you very much for your help, and showing a way to solve the problem.

I used `journalctl -b -u named`, and then I could get lines of the logs,
and found errors.

I will list the the first beginning of errors below.

-- Logs begin at Sat 2016-01-16 14:05:45 JST, end at Wed 2016-01-27
17:30:01 JST. --
Jan 16 14:06:19 localhost.localdomain systemd[1]: Unit named.service cannot
be reloaded because it is inactive.
Jan 20 17:58:23 localhost.localdomain systemd[1]: Starting Berkeley
Internet Name Domain (DNS)...
Jan 20 17:58:23 localhost.localdomain bash[20675]: /etc/named.conf:70:
open: /etc/named.individualmoto.ddns.net.zone: file not found
Jan 20 17:58:23 localhost.localdomain systemd[1]: named.service: control
process exited, code=exited status=1
Jan 20 17:58:23 localhost.localdomain systemd[1]: Failed to start Berkeley
Internet Name Domain (DNS).
Jan 20 17:58:23 localhost.localdomain systemd[1]: Unit named.service
entered failed state.
Jan 23 11:26:22 localhost.localdomain systemd[1]: Starting Berkeley
Internet Name Domain (DNS)...
Jan 23 11:26:22 localhost.localdomain bash[29589]: /etc/named.conf:66:
unknown option 'sype'
Jan 23 11:26:22 localhost.localdomain bash[29589]: /etc/named.conf:74:
missing ';' before '}'
Jan 23 11:26:22 localhost.localdomain systemd[1]: named.service: control
process exited, code=exited status=1
Jan 23 11:26:22 localhost.localdomain systemd[1]: Failed to start Berkeley
Internet Name Domain (DNS).
Jan 23 11:26:22 localhost.localdomain systemd[1]: Unit named.service
entered failed state.
Jan 23 11:29:01 localhost.localdomain systemd[1]: Starting Berkeley
Internet Name Domain (DNS)...
Jan 23 11:29:01 localhost.localdomain bash[29657]: zone
individualmoto.ddns.net/IN: loaded serial 2016012023
Jan 23 11:29:01 localhost.localdomain bash[29657]: zone
1.168.192.in-addr.arpa/IN: loaded serial 2016012301
Jan 23 11:29:01 localhost.localdomain bash[29657]: zone
localhost.localdomain/IN: loaded serial 0
Jan 23 11:29:01 localhost.localdomain bash[29657]: zone localhost/IN:
loaded serial 0
Jan 23 11:29:01 localhost.localdomain bash[29657]: zone
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN:
loaded serial 0
Jan 23 11:29:01 localhost.localdomain bash[29657]: zone
1.0.0.127.in-addr.arpa/IN: loaded serial 0
Jan 23 11:29:01 localhost.localdomain bash[29657]: zone 0.in-addr.arpa/IN:
loaded serial 0
Jan 23 11:29:01 localhost.localdomain bash[29657]: zone
individualmoto.ddns.net/IN: loading from master file
Individualmoto.ddns.net.wan failed: file not found
Jan 23 11:29:01 localhost.localdomain bash[29657]: zone
individualmoto.ddns.net/IN: not loaded due to errors.
Jan 23 11:29:01 localhost.localdomain bash[29657]: external/
individualmoto.ddns.net/IN: file not found
Jan 23 11:29:01 localhost.localdomain bash[29657]: zone
120.217.194.125.in-addr.arpa/IN: loaded serial 2016012301
Jan 23 11:29:01 localhost.localdomain systemd[1]: named.service: control
process exited, code=exited status=1
Jan 23 11:29:01 localhost.localdomain systemd[1]: Failed to start Berkeley
Internet Name Domain (DNS).
Jan 23 11:29:01 localhost.localdomain systemd[1]: Unit named.service
entered failed state.
Jan 23 11:30:37 localhost.localdomain systemd[1]: Starting Berkeley
Internet Name Domain (DNS)...
Jan 23 11:30:37 localhost.localdomain bash[29758]: zone
individualmoto.ddns.net/IN: loaded serial 2016012023
Jan 23 11:30:37 localhost.localdomain bash[29758]: zone
1.168.192.in-addr.arpa/IN: loaded serial 2016012301
Jan 23 11:30:37 localhost.localdomain bash[29758]: zone
localhost.localdomain/IN: loaded serial 0
Jan 23 11:30:37 localhost.localdomain bash[29758]: zone localhost/IN:
loaded serial 0
Jan 23 11:30:37 localhost.localdomain bash[29758]: zone
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN:
loaded serial 0
Jan 23 11:30:37 localhost.localdomain bash[29758]: zone
1.0.0.127.in-addr.arpa/IN: loaded serial 0
Jan 23 11:30:37 localhost.localdomain bash[29758]: zone 0.in-addr.arpa/IN:
loaded serial 0

Jan 23 11:30:37 localhost.localdomain bash[29758]: zone
120.217.194.125.in-addr.arpa/IN: loaded serial 2016012301
Jan 23 11:30:37 localhost.localdomain systemd[1]: named.service: control
process exited, code=exited status=1
Jan 23 11:30:37 localhost.localdomain systemd[1]: Failed to start Berkeley
Internet Name Domain (DNS).
Jan 23 11:30:37 localhost.localdomain systemd[1]: Unit named.service
entered failed state.
Jan 23 11:37:35 localhost.localdomain systemd[1]: Starting Berkeley
Internet Name Domain (DNS)...




For the errors on the list, I checked the location in the actual file.

/etc/named.conf:70: open: /etc/named.individualmoto.ddns.net.zone: file not
found
Jan 23 11:26:22 localhost.localdomain bash[29589]: /etc/named.conf:66:
unknown option 'sype'
Jan 23 11:26:22 localhost.localdomain bash[29589]: /etc/named.conf:74:
missing ';' before '}'

This is the inside file of "/etc/named.conf" with number on the left side.

     63
     64         include "/etc/named.rfc1912.zones";
     65         include "/etc/named.root.key";
     66
     67
     68         zone "individualmoto.ddns.net" {
     69              type master;
     70              file "individualmoto.ddns.net.lan";
     71              allow-update { none; };
     72         };
     73
     74         zone "1.168.192.in-addr.arpa" {
     75              type master;
     76              file "1.168.192.db";
     77              allow-update { none; };
     78         };
     79 };

These errors happened a while ago, and fixed them.  I don't have these
mistakes in the file at all now.


For another error here, I checked the file.
dns_rdata_fromtext: individualmoto.ddns.net.wan:7: near 'IN': extra input
text
zone individualmoto.ddns.net/IN: loading from master file
individualmoto.ddns.net.wan failed: extra input text
zone individualmoto.ddns.net/IN: not loaded due to errors.
external/individualmoto.ddns.net/IN: extra input text


      1 $TTL     86400
      2 @        IN      SOA    individualmoto.ddns.net.
xxxxxxxxx.xmail.com.
(
      3                         2016012700     ; serial
      4                         3600           ; refresh (1 hour)
      5                         900            ; retry (15 minutes)
      6                         604800         ; expire (1 week)
      7                         86400          ; negative (1 day)
      8 )

I don't think any error related to line 7 is there, as the error message
says.

I don't know anything, but it seems old files I saved is remained?


Could you please help me how to fix this?

Kind regards,

Many thanks.









2016-01-27 17:20 GMT+09:00 Mantas Mikulėnas <grawity at gmail.com>:

> On Wed, Jan 27, 2016 at 10:00 AM, Motokazu Nakai <sagittariusg at gmail.com>
> wrote:
>
>> Hi
>>
>> I am trying to set up DNS server.  but I encountered error, and enable to
>> set up DNS server unfortunately.
>>
>> I have done creating these files below.  I checked inside files are
>> collect.  I don't know what is wrong.
>> I put the error message here.
>> Could you please provide me some ways to solve this problem?
>>
>> <Files I created>
>> "vi /etc/named.conf"
>> "vi /var/named/individualmoto.ddns.net.lan"
>> "vi /var/named/1.168.192.in-addr.arpa.db"
>> "vi /var/named/individualmoto.ddns.net.wan"
>> "vi /var/named/217.194.125.in-addr.arpa.db"
>>
>> And I hit "systemctl start named.service"
>>
>> Then I received this message below.
>> "Job for named.service failed. See 'systemctl status named.service' and
>> 'journalctl -xn' for details."
>>
>> To find what is wrong I hit 'systemctl status named.service' and
>> 'journalctl -xn'
>>
>> The result for 'systemctl status named.service' was this.
>>
>> 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 Wed 2016-01-27 16:10:11 JST;
>> 41min ago
>>   Process: 8356 ExecStop=/bin/sh -c /usr/sbin/rndc stop > /dev/null 2>&1
>> || /bin/kill -TERM $MAINPID (code=exited, status=1/FAILURE)
>>   Process: 17751 ExecReload=/bin/sh -c /usr/sbin/rndc reload > /dev/null
>> 2>&1 || /bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
>>   Process: 9723 ExecStart=/usr/sbin/named -u named $OPTIONS (code=exited,
>> status=0/SUCCESS)
>>   Process: 9206 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)
>>  Main PID: 9445 (code=exited, status=0/SUCCESS)
>>    CGroup: /system.slice/named.service
>>
>> Jan 27 16:10:11 localhost.localdomain bash[9206]: zone
>> localhost.localdomain/IN: loaded serial 0
>> Jan 27 16:10:11 localhost.localdomain bash[9206]: zone localhost/IN:
>> loaded serial 0
>> Jan 27 16:10:11 localhost.localdomain bash[9206]: zone
>> 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN:
>> loaded serial 0
>> Jan 27 16:10:11 localhost.localdomain bash[9206]: zone
>> 1.0.0.127.in-addr.arpa/IN: loaded serial 0
>> Jan 27 16:10:11 localhost.localdomain bash[9206]: zone 0.in-addr.arpa/IN:
>> loaded serial 0
>> Jan 27 16:10:11 localhost.localdomain bash[9206]: zone
>> individualmoto.ddns.net/IN: loaded serial 2016012700
>> Jan 27 16:10:11 localhost.localdomain bash[9206]: zone
>> 217.194.125.in-addr.arpa/IN: loaded serial 2016012700
>> Jan 27 16:10:11 localhost.localdomain systemd[1]: named.service: control
>> process exited, code=exited status=1
>> Jan 27 16:10:11 localhost.localdomain systemd[1]: Failed to start
>> Berkeley Internet Name Domain (DNS).
>> Jan 27 16:10:11 localhost.localdomain systemd[1]: Unit named.service
>> entered failed state.
>>
>
> The "Process: 9206" line shows that named.service tries to verify your
> configuration using `named-checkconf`, and that this check failed. Use
> `systemctl status named -n 100` or `journalctl -b -u named` to get more
> lines from the logs; they will show the actual errors. (Or, run
> `named-checkzone -z` manually.) The rest isn't a systemd problem.
>
> --
> Mantas Mikulėnas <grawity at gmail.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20160127/01674080/attachment.html>


More information about the systemd-devel mailing list