Job for named service failed because the control process exited with error code

mo4tech.com (Moment For Technology) is a global community with thousands techies from across the global hang out!Passionate technologists, be it gadget freaks, tech enthusiasts, coders, technopreneurs, or CIOs, you would find them all here.

[[email protected] ~]#systemctl restart named

Job for named.service failed because the control process exited with error code.

Solution: 1. Look at the log, what is the problem? Is it an error when editing the document

[[email protected] ~]#cat /var/log/messages #cat /var/log/messages #cat /var/log/messagesCopy the code

You can see that the syntax in our HTTPD main configuration file is incorrect. Change it to succeed.

This kind of restart service error is mostly due to the configuration file error, if not to check the log to know where the fault!

The following is my DNS forward and reverse resolution experiment.

Forward analysis:

1. Install the DNS

yum -y install bind-chroot
yum -y install bind-utils
Copy the code

2. Modify the main configuration file

vim /etc/named.conf
listen-on port 53(any)
allow-query(any)
Copy the code

3. Edit the area configuration file

vim /etc/named.rfc1912.zones zone "caq.com" IN { type master; file "caq.com.zone"; allow-update {none; }; };Copy the code

4. Create the forward zone database file

[[email protected] ~]# cd /var/named/ [[email protected] named]# cp -a named.localhost caq.com.zone [[email protected] named]# vi  caq.com.zone $TTL 1D caq.com. IN SOA caq.com. root.caq.com. ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; Minimum caq.com. IN NS ns1.caq.com.ns1.caq.com. IN A 192.168.10.10 www.caq.com. IN A 192.168.10.10 lwork.caq.com 192.168.10.10Copy the code

5. Restart the service

systemctl restart named
Copy the code

Test 6.

[[email protected] named]# nslookup ns1.caq.com 
Server:         127.0.0.1
Address:        127.0.0.1#53

Name:   ns1.caq.com Address: 192.168.10.10
Address: 192.168.10.10
Copy the code

Reverse DNS

Step 1: Edit the region configuration file

[[email protected] named]# vi /etc/named.rfc192. zones "0.168.192.in-add.arpa" in {type master; file "test.arpa"; };Copy the code

Step 2: Edit the data configuration file

[[email protected] named]# vi test.arpa
$TTL 1D
@       IN SOA  ns1.caq.com. root.caq.com. (
                                        0       ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
        IN      NS      ns1.caq.com.
83      IN PTR  ns1.caq.com.
83      IN PTR  www.caq.com.
Copy the code

Step 3: Verify the analytical results

[[email protected] named]# nslookup  192.168.0.83 83.0.168.192.in-add.arpa name = www.caq.com name = ns1.caq.com.Copy the code

To complete! La la la la la la LA I’m a dog, I wish you happiness!

  • #1

I have a CentOS 7.5 VPS that’s running DirectAdmin. When I try to start named by issuing `systemctl start named` it says:

Job for named.service failed because the control process exited with error code. See «systemctl status named.service» and «journalctl -xe» for details.

This is what systemctl status named.service says:

● named.service — Berkeley Internet Name Domain (DNS)
Loaded: loaded (/etc/systemd/system/named.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2020-02-05 07:22:06 +0100; 29s ago
Process: 12793 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)

And this is the response that `whereis named` gives:
named: /usr/sbin/named /etc/named.conf /etc/named /usr/share/man/man8/named.8.gz

And this is output of `where is bind`:
bind: /usr/lib64/bind /usr/share/man/man1/bind.1.gz

Meanwhile, my /etc/init.d/ directory has no file called named in it. It has only one executable file which is called functions. Any help is appreciated.

  • #2

Hello,

What do you see?

Code:

grep named /var/log/messages

  • #3

Hello,

What do you see?

Code:

grep named /var/log/messages

Hi
Thanks for your help. It showed thousands of line, so I decided to copy only the last lines which have been created at the same time and have been repeated several times in /var/log/messages:

Code:

Feb  5 12:46:06 server bash: zone server.[domain].[tld]/IN: loading from master file /var/named/server.[domain].[tld].db failed: file not found
Feb  5 12:46:06 server systemd: named.service: control process exited, code=exited status=1
Feb  5 12:46:06 server systemd: Unit named.service entered failed state.
Feb  5 12:46:06 server systemd: named.service failed.

I have replaced my domain address to remove identifying information. Other than that, the file is exactly as it is.

One more thing that might be helpful is that server.[domain].[tld] is also my hostname in DirectAdmin. When I log in using the admin user, it is the only domain in the DNS Administration page that says it has no local data.

  • #4

I removed server.[domain].[tld] which seemed to be causing the problem as a separate domain in the DNS Administration page in DirectAdmin and now bind is working. Although, `service named status` gives:

Code:

Feb 05 15:57:53 server.[domain].[tld] named[15821]: network unreachable resolving './DNSKEY/IN': 2001:dc3::35#53

Feb 05 15:57:53 server.[domain].[tld] named[15821]: network unreachable resolving './NS/IN': 2001:dc3::35#53

Feb 05 15:57:53 server.[domain].[tld] named[15821]: network unreachable resolving './DNSKEY/IN': 2001:503:ba3e...0#53

Feb 05 15:57:53 server.[domain].[tld] named[15821]: network unreachable resolving './NS/IN': 2001:503:ba3e::2:30#53

Feb 05 15:57:53 server.[domain].[tld] named[15821]: network unreachable resolving './DNSKEY/IN': 2001:500:200::b#53

Feb 05 15:57:53 server.[domain].[tld] named[15821]: network unreachable resolving './NS/IN': 2001:500:200::b#53

Feb 05 15:57:53 server.[domain].[tld] named[15821]: network unreachable resolving './DNSKEY/IN': 2001:503:c27:...0#53

Feb 05 15:57:53 server.[domain].[tld] named[15821]: network unreachable resolving './NS/IN': 2001:503:c27::2:30#53

Feb 05 15:57:53 server.[domain].[tld] named[15821]: managed-keys-zone: Key 20326 for zone . acceptance timer c...sted

Feb 05 15:57:53 server.[domain].[tld] named[15821]: resolver priming query complete

Is this normal?

  • #5

For future reference, it turns out that was an IPv6 issue. I added

to /etc/sysconfig/named and now everything seems to be working as expected.

  • #6

You might re-create server.[domain].[tld] in directadmin DNS manager. It does no harm if it exists, but if it’s missing you might have various issues.

  • #7

You might re-create server.[domain].[tld] in directadmin DNS manager. It does no harm if it exists, but if it’s missing you might have various issues.

Thanks.

Does it suffice to add an A record with «server» as Name and the IP address of my server as Value inside [domain].[tld]?

  • #8

For future reference, it turns out that was an IPv6 issue. I added

to /etc/sysconfig/named and now everything seems to be working as expected.

Why not config your ipv6 to also work with named?

  • #9

Why not config your ipv6 to also work with named?

I don’t know how to do that. But isn’t IPv6 still an experimental thing?
I don’t know even my own server’s IPv6 and I haven’t bothered to find out what it is. Should I start using IPv6 or is it still too early for that?

  • #10

Does it suffice to add an A record with «server» as Name and the IP address of my server as Value inside [domain].[tld]?

Yes

I don’t know even my own server’s IPv6 and I haven’t bothered to find out what it is. Should I start using IPv6 or is it still too early for that?

That’s fully up to you. There is no much sense to use IPv6 without IPv4 yet.

  • #11

Ipv6 config in bind:

Code:

options{
 listen-on-v6 port 53 { any; };
}

You can check if your host has an ipv6 with ifconfig:

Code:

$ ifconfig

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 1xx.1xx.1xx.1xx  netmask 255.255.255.0  broadcast 1xx.1xx.1xx.2xx
        inet6 2axx:xx8:aac7:53:xxxx:xxxx:xxxx:xxxx  prefixlen 64  scopeid 0x0<global>
        ether 52:54:xx:xx:xx:xx  txqueuelen 1000  (Ethernet)
        RX packets 97800754  bytes 12464740882 (11.6 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 48551708  bytes 457623533957 (426.1 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

inet6 is your ipv6.

You still indeed need ipv4 to be reachable. But Ipv6 is comming. For example, gmail connects by ipv6 with exim if you publish an AAAA record.
When i check my named.log, i see some query comming on the ipv6. Most of them for AAAA records.

With the low cost of setting, i provide it.

Topic: Job for named.service failed because the control process exited with error code.  (Read 54975 times)

0 Members and 1 Guest are viewing this topic.

Offline

*

after i setup dns and try to restart DNS i get this message

Job for named.service failed because the control process exited with error code. See «systemctl status named.service» and «journalctl -xe» for details.

Any solution ?


Logged


after restart click on the status button and then paste that info here


Logged


Offline

*

this is the information.

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 Wed 2017-03-29 11:23:53 EDT; 20s ago
  Process: 889 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)

Mar 29 11:23:53 agapechristianchatroom.com bash[889]: zone NS2.AGAPECHRISTIANCHATROOM.COM/IN: loaded serial 2013071600
Mar 29 11:23:53 agapechristianchatroom.com bash[889]: zone agapechristianchatroom.com/IN: NS ‘NS1.AGAPECHRISTIANCHATROOM.COM’ has no address records (A or AAAA)
Mar 29 11:23:53 agapechristianchatroom.com bash[889]: zone agapechristianchatroom.com/IN: NS ‘NS2.AGAPECHRISTIANCHATROOM.COM’ has no address records (A or AAAA)
Mar 29 11:23:53 agapechristianchatroom.com bash[889]: zone agapechristianchatroom.com/IN: not loaded due to errors.
Mar 29 11:23:53 agapechristianchatroom.com bash[889]: _default/agapechristianchatroom.com/IN: bad zone
Mar 29 11:23:53 agapechristianchatroom.com bash[889]: zone whatstruelove.com/IN: loaded serial 2013071600
Mar 29 11:23:53 agapechristianchatroom.com systemd[1]: named.service: control process exited, code=exited status=1
Mar 29 11:23:53 agapechristianchatroom.com systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
Mar 29 11:23:53 agapechristianchatroom.com systemd[1]: Unit named.service entered failed state.
Mar 29 11:23:53 agapechristianchatroom.com systemd[1]: named.service failed.


Logged


Greetings Friend, error is clear, you must create an A record for those dns

NS1.AGAPECHRISTIANCHATROOM.COM ‘has no address records (A or AAAA)


Logged


Offline

*

do i need to create A records on domain registrar ? because on domain registrar A records is already there and on hosting where centos web panel is installed A records is there.

What shall i do now ?

Can you confirm.


Logged


Offline

*

i figured out problem by deleting nameserver from centos web panel front page right bottom site by clicking on change and retyping nameservers in small letters.

this is a bug in centos web panel, i think caps doesnt works and it doesnt bind dns.


Logged


i figured out problem by deleting nameserver from centos web panel front page right bottom site by clicking on change and retyping nameservers in small letters.

this is a bug in centos web panel, i think caps doesnt works and it doesnt bind dns.

This one solved the problem for me.


Logged


Offline

*

● 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 2021-05-09 13:11:51 CEST; 5s ago
  Process: 11823 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)

May 09 13:11:51 vmi577947.contaboserver.net bash[11823]: _default/ns1.slmbilisim.net/IN: file not found
May 09 13:11:51 vmi577947.contaboserver.net bash[11823]: zone cosareryapi.com/IN: loaded serial 2021050844
May 09 13:11:51 vmi577947.contaboserver.net bash[11823]: zone ns2.slmyonetim.com/IN: loaded serial 2021050860
May 09 13:11:51 vmi577947.contaboserver.net bash[11823]: zone vmi577947.contaboserver.net/IN: loaded serial 2021050858
May 09 13:11:51 vmi577947.contaboserver.net bash[11823]: zone ns3.slmbilisim.net/IN: loaded serial 2013071600
May 09 13:11:51 vmi577947.contaboserver.net bash[11823]: zone ns4.slmbilisim.net/IN: loaded serial 2013071600
May 09 13:11:51 vmi577947.contaboserver.net systemd[1]: named.service: control process exited, code=exited status=1
May 09 13:11:51 vmi577947.contaboserver.net systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
May 09 13:11:51 vmi577947.contaboserver.net systemd[1]: Unit named.service entered failed state.
May 09 13:11:51 vmi577947.contaboserver.net systemd[1]: named.service failed.


Logged


This document (000020820) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 15 SP4

Situation

After upgraded to SLES 15 SP4 from a previous service pack, named.service will not start and produces the following errors.

# systemctl start named.service
Job for named.service failed because the control process exited with error code.
See "systemctl status named.service" and "journalctl -xeu named.service" for details.
# journalctl -xeu named.service
...
Oct 20 12:01:55 host15sp4 named[4111]: isc_stdio_open '/var/log/named_querylog' failed: permission denied
Oct 20 12:01:55 host15sp4 named[4111]: configuring logging: permission denied
Oct 20 12:01:55 host15sp4 named[4111]: loading configuration: permission denied
Oct 20 12:01:55 host15sp4 named[4111]: exiting (due to fatal error)
Oct 20 12:01:55 host15sp4 systemd[1]: named.service: Control process exited, code=exited, status=1/FAILURE
...

Query logging for bind is enabled and configured to log to a file in /var/log/ by having a configuration similar to the following in the file /etc/named.conf.

logging {
        # Log queries to a file limited to a size of 100 MB.
        channel query_logging {
                file "/var/log/named_querylog"
                        versions 3 size 100M;
                print-time yes;                 // timestamp log entries
        };
        category queries {
                query_logging;
        };

The following line in /etc/sysconfig/named is currently present, or was present when bind was run in the previous service pack.

NAMED_RUN_CHROOTED="yes"

Resolution

Edit the file /etc/named.conf by changing

# Log queries to a file limited to a size of 100 MB.
        channel query_logging {
                file "/var/log/named_querylog"

to

# Log queries to a file limited to a size of 100 MB.
        channel query_logging {
                file "/var/lib/named/log/named_querylog"

This will cause logs to be written to /var/lib/named/log/named_querylog instead of the previous location, /var/lib/named/var/log/named_querylog.

Cause

In previous service packs, the default configuration ran bind in a chroot jail in /var/lib/named. Changes were made for SLES 15 SP4 with regards to this chroot setup.

The logging path from /etc/named.conf used to be evaluated relative to this chroot location, but is now evaluated relative to the system root.

The default configuration on previous service packs set /var/log/named_querylog as the destination for logs. In the previous chroot environment, this caused logs to be written to /var/lib/named/var/log/named_querylog. With the SLES 15 SP4 changes to bind, this same setting causes logs to be written to /var/log/named_querylog.

Logs are written by the user named. This user does not have permission to write to this new location by default which creates the errors observed.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented «AS IS» WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000020820
  • Creation Date:
    20-Oct-2022
  • Modified Date:21-Oct-2022
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

Job for network.service failed because the control process exited with error code. See “systemctl status network.service” and “journalctl -xe” for details.

1、 The xshell is down and the reconnection failed. First Ping to see if the network is connected. Second, restart the network service and find an error. Third, view the error information according to the prompt. Fourth, solutions. First, check whether the configuration file is wrong. Second, there may be a conflict with the network manager service. Just close the service directly

3. If the two methods 1 and 2 still fail, try to delete all the other irrelevant network card location files under/etc/sysconfig/network scripts to avoid unnecessary influence. 5. Verify the network

Standby for a while, found that xshell connection failed, found that network connection failed, and restart failed.

1、 The xshell is down and the reconnection failed. Ping first to see if the network is connected

[[email protected] ~]# ping www.google.com
ping: www.google.com: Unknown name or service

2、 Restart the network service and find an error

[[email protected] ~]# systemctl restart network
Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.

3、 Check the error information according to the prompt

[[email protected] ~]# systemctl status network.service
● network.service - LSB: Bring up/down networking
   Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
   Active: failed (Result: exit-code) since 四 2021-06-03 05:23:42 CST; 23s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 8821 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)

6月 03 05:23:42 db01 network[8821]: RTNETLINK answers: File exists
6月 03 05:23:42 db01 network[8821]: RTNETLINK answers: File exists
6月 03 05:23:42 db01 network[8821]: RTNETLINK answers: File exists
6月 03 05:23:42 db01 network[8821]: RTNETLINK answers: File exists
6月 03 05:23:42 db01 network[8821]: RTNETLINK answers: File exists
6月 03 05:23:42 db01 network[8821]: RTNETLINK answers: File exists
6月 03 05:23:42 db01 systemd[1]: network.service: control process exited, code=e...s=1
6月 03 05:23:42 db01 systemd[1]: Failed to start LSB: Bring up/down networking.
6月 03 05:23:42 db01 systemd[1]: Unit network.service entered failed state.
6月 03 05:23:42 db01 systemd[1]: network.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

4、 Solutions

1. Check whether the configuration file is wrong

[[email protected] ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
NAME=ens33
UUID=b5672928-cbbb-4428-a752-8bd9c14098e7
····
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.10.102
PREFIX=24
GATEWAY=192.168.10.2
DNS1=114.114.114.114
DNS2=8.8.8.8
DNS3=119.29.29.29
[[email protected] ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:0c:29:3f:0f:29 brd ff:ff:ff:ff:ff:ff
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 52:54:00:3a:15:b7 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN group default qlen 1000
    link/ether 52:54:00:3a:15:b7 brd ff:ff:ff:ff:ff:ff

2. There may be a conflict with the NetworkManager service. Just close the service directly

[[email protected] ~]# systemctl stop NetworkManager
[[email protected] ~]# systemctl restart network

3. If both methods 1 and 2 fail after verification, try to delete all other irrelevant network card location files under/etc/sysconfig/network scripts to avoid unnecessary influence

[[email protected] network-scripts]# ls
ifcfg-ens33      ifdown-ipv6      ifdown-tunnel  ifup-isdn    ifup-TeamPort
ifcfg-ens33.bak  ifdown-isdn      ifup           ifup-plip    ifup-tunnel
ifcfg-lo         ifdown-post      ifup-aliases   ifup-plusb   ifup-wireless
ifdown           ifdown-ppp       ifup-bnep      ifup-post    init.ipv6-global
ifdown-bnep      ifdown-routes    ifup-eth       ifup-ppp     network-functions
ifdown-eth       ifdown-sit       ifup-ib        ifup-routes  network-functions-ipv6
ifdown-ib        ifdown-Team      ifup-ippp      ifup-sit
ifdown-ippp      ifdown-TeamPort  ifup-ipv6      ifup-Team

5、 Verification Network

[[email protected] ~]# ping www.google.com
PING www.baidu.com (39.156.66.14) 56(84) bytes of data.
64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=1 ttl=128 time=55.8 ms
64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=2 ttl=128 time=42.8 ms
^C
--- www.baidu.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 42.825/49.312/55.800/6.491 ms
[[email protected] ~]# 

Понравилась статья? Поделить с друзьями:
  • Jdk not found unity как исправить
  • Jdk directory is not set or invalid unity как исправить
  • Jd gui internal error
  • Jcb электростанция ошибки
  • Jcb ошибка e119