Named. Service Is Not Active

How do I fix named.service is not active, cannot reload.? The output for /etc/init.d/named status is

● named.service - BIND Domain Name Server
     Loaded: loaded (/lib/systemd/system/named.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2020-05-15 16:24:00 UTC; 2h 42min ago
       Docs: man:named(8)
    Process: 55460 ExecStart=/usr/sbin/named -f $OPTIONS (code=exited, status=1/FAILURE)
   Main PID: 55460 (code=exited, status=1/FAILURE)

May 15 16:24:00 sturtz named[55460]: listening on IPv4 interface lo, 127.0.0.1#53
May 15 16:24:00 sturtz named[55460]: creating TCP socket: address in use
May 15 16:24:00 sturtz named[55460]: listening on IPv4 interface enp0s25, 192.168.0.5#53
May 15 16:24:00 sturtz named[55460]: creating TCP socket: address in use
May 15 16:24:00 sturtz named[55460]: unable to listen on any configured interfaces
May 15 16:24:00 sturtz named[55460]: loading configuration: failure
May 15 16:24:00 sturtz named[55460]: exiting (due to fatal error)
May 15 16:24:00 sturtz systemd[1]: named.service: Main process exited, code=exited, status=1/FAILURE
May 15 16:24:00 sturtz systemd[1]: named.service: Failed with result 'exit-code'.
May 15 19:02:52 sturtz systemd[1]: named.service: Unit cannot be reloaded because it is inactive.

I can't figure out the error or how to fix it. I am running Ubuntu Server 20.04 LTS, I installed it yesterday, I have asked about Bind9 setup Here When I run sudo ss -tulpn | grep :53:

sudo: unable to resolve host sturtz: Name or service not known
udp     UNCONN   0        0                                 192.168.0.5:53                                           0.0.0.0:*                                   users:(("named",pid=34374,fd=30))                                              
udp     UNCONN   0        0                                 192.168.0.5:53                                           0.0.0.0:*                                   users:(("named",pid=34374,fd=31))                                              
udp     UNCONN   0        0                                   127.0.0.1:53                                           0.0.0.0:*                                   users:(("named",pid=34374,fd=24))                                              
udp     UNCONN   0        0                                   127.0.0.1:53                                           0.0.0.0:*                                   users:(("named",pid=34374,fd=25))                                              
udp     UNCONN   0        0                               127.0.0.53%lo:53                                           0.0.0.0:*                                   users:(("systemd-resolve",pid=826,fd=12))                                      
udp     UNCONN   0        0                                     0.0.0.0:5353                                         0.0.0.0:*                                   users:(("mdns-publisher",pid=1229,fd=5))                                       
udp     UNCONN   0        0                                       [::1]:53                                              [::]:*                                   users:(("named",pid=34374,fd=36))                                              
udp     UNCONN   0        0                                       [::1]:53                                              [::]:*                                   users:(("named",pid=34374,fd=35))                                              
udp     UNCONN   0        0          [fe80::223:24ff:fe08:581f]%enp0s25:53                                              [::]:*                                   users:(("named",pid=34374,fd=40))                                              
udp     UNCONN   0        0          [fe80::223:24ff:fe08:581f]%enp0s25:53                                              [::]:*                                   users:(("named",pid=34374,fd=41))                                              
udp     UNCONN   0        0                                        [::]:5353                                            [::]:*                                   users:(("mdns-publisher",pid=1229,fd=6))                                       
tcp     LISTEN   0        10                                192.168.0.5:53                                           0.0.0.0:*                                   users:(("named",pid=34374,fd=34),("named",pid=34374,fd=33),("named",pid=34374,fd=32))
tcp     LISTEN   0        10                                  127.0.0.1:53                                           0.0.0.0:*                                   users:(("named",pid=34374,fd=29),("named",pid=34374,fd=28),("named",pid=34374,fd=27))
tcp     LISTEN   0        4096                            127.0.0.53%lo:53                                           0.0.0.0:*                                   users:(("systemd-resolve",pid=826,fd=13))                                      
tcp     LISTEN   0        10         [fe80::223:24ff:fe08:581f]%enp0s25:53                                              [::]:*                                   users:(("named",pid=34374,fd=44),("named",pid=34374,fd=43),("named",pid=34374,fd=42))
tcp     LISTEN   0        10                                      [::1]:53                                              [::]:*                                   users:(("named",pid=34374,fd=39),("named",pid=34374,fd=38),("named",pid=34374,fd=37))
9

1 Answer

So you had two problems:

(1) Stale named processes running which we killed with sudo killall -9 named and then started with sudo systemctl start named.service

(2) Configuration issues - the forwarders bit for DNS needs you to have actual IP addresses and not hostnames. This said, you're running your site via CloudFlare, why do you need your own DNS for this?

Regardless both issues are fixed. Refer to the chat room referred to in comments for the detailed discussions on this.

6

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest