LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   I am unable to start named.service using systemctl (https://www.linuxquestions.org/questions/linux-server-73/i-am-unable-to-start-named-service-using-systemctl-4175618415/)

blason 11-26-2017 11:37 AM

I am unable to start named.service using systemctl
 
Hi Guys,

I am unable to start the named.service using systemctl parameters on centOS 7.4. but If I am starting with command line it starts properly.

Can someone please help?

● named.service - Berkeley Internet Name Domain (DNS)
Loaded: loaded (/usr/lib/systemd/system/named.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2017-11-26 23:06:04 IST; 6s ago
Process: 1589 ExecStartPre=/bin/bash -c if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z "$NAMEDCONF"; else echo "Checking of zone files is disabled"; fi (code=exited, status=1/FAILURE)

Nov 26 23:05:56 dnsdf.isnlab.in bash[1589]: zone 12aww7mdklwvh1sgd2kk1lwsr3.net/IN: loaded serial 2006060301
Nov 26 23:05:56 dnsdf.isnlab.in bash[1589]: zone 12b0jv17vnwgdb6bmxf13yuq1e.net/IN: loaded serial 2006060301
Nov 26 23:05:56 dnsdf.isnlab.in bash[1589]: zone 12b5sba8fsvv29jmm68o6rwk.org/IN: loaded serial 2006060301
Nov 26 23:05:56 dnsdf.isnlab.in bash[1589]: zone 12b8ko6forrxv1oml8251kfizkh.com/IN: loaded serial 2006060301
Nov 26 23:05:56 dnsdf.isnlab.in bash[1589]: zone 12bc8ds10wet991cms4qtnwlfzl.org/IN: loaded serial 2006060301
Nov 26 23:05:56 dnsdf.isnlab.in bash[1589]: zone 12bdyz8slslfbr1dhi81x20kcq.net/IN: loaded serial 2006060301
Nov 26 23:06:04 dnsdf.isnlab.in systemd[1]: named.service: control process exited, code=exited status=1
Nov 26 23:06:04 dnsdf.isnlab.in systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
Nov 26 23:06:04 dnsdf.isnlab.in systemd[1]: Unit named.service entered failed state.
Nov 26 23:06:04 dnsdf.isnlab.in systemd[1]: named.service failed.

#######################################

Nov 26 23:05:56 dnsdf.isnlab.in bash[1589]: zone 12aw0kr4m7qoc13wzvhwnf813v.org/IN: loaded serial 2006060301
Nov 26 23:05:56 dnsdf.isnlab.in bash[1589]: zone 12aww7mdklwvh1sgd2kk1lwsr3.net/IN: loaded serial 2006060301
Nov 26 23:05:56 dnsdf.isnlab.in bash[1589]: zone 12b0jv17vnwgdb6bmxf13yuq1e.net/IN: loaded serial 2006060301
Nov 26 23:05:56 dnsdf.isnlab.in bash[1589]: zone 12b5sba8fsvv29jmm68o6rwk.org/IN: loaded serial 2006060301
Nov 26 23:05:56 dnsdf.isnlab.in bash[1589]: zone 12b8ko6forrxv1oml8251kfizkh.com/IN: loaded serial 2006060301
Nov 26 23:05:56 dnsdf.isnlab.in bash[1589]: zone 12bc8ds10wet991cms4qtnwlfzl.org/IN: loaded serial 2006060301
Nov 26 23:05:56 dnsdf.isnlab.in bash[1589]: zone 12bdyz8slslfbr1dhi81x20kcq.net/IN: loaded serial 2006060301
Nov 26 23:06:04 dnsdf.isnlab.in systemd[1]: named.service: control process exited, code=exited status=1
Nov 26 23:06:04 dnsdf.isnlab.in systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
-- Subject: Unit named.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman.../systemd-devel
--
-- Unit named.service has failed.
--
-- The result is failed.
Nov 26 23:06:04 dnsdf.isnlab.in systemd[1]: Unit named.service entered failed state.
Nov 26 23:06:04 dnsdf.isnlab.in systemd[1]: named.service failed.
Nov 26 23:06:04 dnsdf.isnlab.in polkitd[639]: Unregistered Authentication Agent for unix-process:1579:182365 (system bus name :1.40, object path /org/freedesktop/Policy

petelq 11-27-2017 05:39 AM

I hope I'm not insulting your intelligence but just to be sure, you have enabled the service first, have you?
Code:

systemctl enable named.service && systemctl start named.service

ondoho 11-28-2017 12:01 PM

Quote:

Originally Posted by petelq (Post 5785718)
I hope I'm not insulting your intelligence but just to be sure, you have enabled the service first, have you?
Code:

systemctl enable named.service && systemctl start named.service

i don't think this could have anything to do with the error shown.

"enable" means: start service next time systemd is restarted (usually after a reboot), and from then on always.
"start" means: start service now, but without the reboot thing.

op's description has been unclear about this: "unable to start the named.service using systemctl parameters. but If I am starting with command line it starts properly" - i have no idea what that means.
but the error posted is clearly an error, and not just the service not starting. meaning, it clearly tries to start.

scasey 11-28-2017 12:10 PM

Quote:

Originally Posted by blason (Post 5785475)
Active: failed (Result: exit-code) since Sun 2017-11-26 23:06:04 IST; 6s ago
Process: 1589 ExecStartPre=/bin/bash -c if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z "$NAMEDCONF"; else echo "Checking of zone files is disabled"; fi (code=exited, status=1/FAILURE)

Isn't this saying that if "$DISABLE_ZONE_CHECKING" == "yes" to fail to start?
Is $DISABLE_ZONE_CHECKING set to yes? [I don't know where that variable is set off the top of my head]

blason 11-30-2017 12:59 PM

Well what I mean is; if I tries to start with /usr/sbin/named -u named -c /etc/named.com -n 4 ..it starts perfectly.
Not sure if this is happening due to permission issue or what but I am complete clueless here :(

voleg 12-01-2017 12:57 PM

Sounds familiar.
Mine mistake was that service to run was:
Code:

# systemctl start named-chroot.service
because I've installed it chroot variant and configured it to run as chroot.
However I was trying to start original named and this was wrong.

VietPublic 09-30-2018 01:29 PM

My solution :
edit /var/named/mydomain.com.hosts
remove below line
mydomain.com. IN NS mydomain.com.


All times are GMT -5. The time now is 04:59 PM.