[Solved] Bind doesn't work anymore | Named is Bind

Albert

Verified User
Joined
Oct 25, 2019
Messages
57
After updating to custombuild 2.0.0 (rev: 2496) and DirectAdmin V1.61.0, Bind doesn't work anymore :cry:

I failed in my research...

Any idea ?

~# service bind9 status
Code:
bind9.service - BIND Domain Name Server
   Loaded: loaded (/lib/systemd/system/bind9.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:named(8)

~# /etc/init.d/bind9 restart
Code:
/etc/init.d/bind9 restart
[....] Restarting bind9 (via systemctl): bind9.serviceJob for bind9.service failed because the control process exited with error code.
See "systemctl status bind9.service" and "journalctl -xe" for details.
failed!

~# systemctl status bind9.service
Code:
bind9.service - BIND Domain Name Server
   Loaded: loaded (/lib/systemd/system/bind9.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2020-05-24 05:21:01 CEST; 21min ago
     Docs: man:named(8)
  Process: 27770 ExecStart=/usr/sbin/named $OPTIONS (code=exited, status=1/FAILURE)
    Tasks: 0 (limit: 2319)
   Memory: 396.0K
   CGroup: /system.slice/bind9.service

May 24 05:21:01 vps123456.ovh.net named[27771]: listening on IPv4 interface eth0, 91.121.37.27#53
May 24 05:21:01 vps123456.ovh.net named[27771]: binding TCP socket: address in use
May 24 05:21:01 vps123456.ovh.net named[27771]: listening on IPv4 interface eth0, 91.121.45.207#53
May 24 05:21:01 vps123456.ovh.net named[27771]: binding TCP socket: address in use
May 24 05:21:01 vps123456.ovh.net named[27771]: unable to listen on any configured interfaces
May 24 05:21:01 vps123456.ovh.net named[27771]: loading configuration: failure
May 24 05:21:01 vps123456.ovh.net named[27771]: exiting (due to fatal error)
May 24 05:21:01 vps123456.ovh.net systemd[1]: bind9.service: Control process exited, code=exited, status=1/FAILURE
May 24 05:21:01 vps123456.ovh.net systemd[1]: bind9.service: Failed with result 'exit-code'.
May 24 05:21:01 vps123456.ovh.net systemd[1]: Failed to start BIND Domain Name Server.

~# nano /var/log/messages
Code:
May 24 03:33:00 vps123456 kernel: [ 1504.328879] Firewall: *ICMP_IN Blocked* IN=eth0 OUT= MAC=fa:16:3e:08:e5:ba:02:fa:6a:50:b3:70:08:00 SRC=92.222.186.1 DST=87.98.169.140 LEN=32 TOS=0x08 PREC=0x00 TTL=7 ID=1 DF PROTO=ICMP TYPE=8 CODE=0 ID=47744 SEQ=1
May 24 03:33:00 vps123456 kernel: [ 1504.695458] Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=fa:16:3e:08:e5:ba:02:fa:6a:50:b3:70:08:00 SRC=213.217.0.101 DST=51.38.215.43 LEN=40 TOS=0x00 PREC=0x00 TTL=241 ID=31311 PROTO=TCP SPT=42185 DPT=5381 WINDOW=1024 RES=0x00 SYN URGP=0
May 24 03:33:01 vps123456 kernel: [ 1505.179205] Firewall: *ICMP_IN Blocked* IN=eth0 OUT= MAC=fa:16:3e:08:e5:ba:02:fa:6a:50:b3:70:08:00 SRC=92.222.185.1 DST=91.121.45.207 LEN=32 TOS=0x08 PREC=0x00 TTL=5 ID=1 DF PROTO=ICMP TYPE=8 CODE=0 ID=39936 SEQ=1

Iptable and CSF
Ip's are unknown and not blocked

But Bind seems working in the same time !!!!!!

~# dig @localhost 91.121.37.27
Code:
; <<>> DiG 9.11.5-P4-5.1+deb10u1-Debian <<>> @localhost 91.121.37.27
; (2 servers found)

;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 55666
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available


;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 49bbdff1ebd4a0ec6cc0b5cc5ec9ee42b0e1fa583c7d7a2a (good)
;; QUESTION SECTION:
;91.121.37.27.                  IN      A

;; Query time: 4 msec
;; SERVER: ::1#53(::1)
;; WHEN: Sun May 24 05:47:14 CEST 2020
;; MSG SIZE  rcvd: 69
 
Last edited:
Have you try reboot server ?
or try kill all process like " bind " or any use by port 53

" unable to listen on any configured interfaces "
It seem port is used by other process like bind previous doesn't clean restart
 
Yes reboot the server have been done, and more than one time.. ;)

I agree with you, it seem port 53 is used by other process like bind OR like if a "second" Bind is installed on the same server !
But apparently Not as we can see below.
~# netstat -nlpt
Code:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:587             0.0.0.0:*               LISTEN      452/exim
tcp        0      0 127.0.0.1:3310          0.0.0.0:*               LISTEN      934/clamd
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN      435/dovecot
tcp        0      0 127.0.0.1:783           0.0.0.0:*               LISTEN      3840/perl
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN      435/dovecot
tcp        0      0 0.0.0.0:465             0.0.0.0:*               LISTEN      452/exim
tcp        0      0 91.121.37.27:53         0.0.0.0:*               LISTEN      8358/named
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      578/pure-ftpd
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      452/exim
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN      435/dovecot
tcp        0      0 0.0.0.0:995             0.0.0.0:*               LISTEN      435/dovecot
tcp6       0      0 :::3306                 :::*                    LISTEN      846/mysqld
tcp6       0      0 :::2222                 :::*                    LISTEN      580/directadmin
tcp6       0      0 :::80                   :::*                    LISTEN      923/httpd
tcp6       0      0 :::56180                :::*                    LISTEN      632/sshd
tcp6       0      0 :::53                   :::*                    LISTEN      8358/named
tcp6       0      0 :::21                   :::*                    LISTEN      578/pure-ftpd
tcp6       0      0 :::443                  :::*                    LISTEN      923/httpd
 
Seem like your bind with tcp4 has problem with that ip while tcp6 bind with localhost ip. and can work normally with tcp6

let debug in step by step
try rewrite_confs with directadmin

change your bind tcp4 to 0.0.0.0

in named.conf
remove all include domain with not localhost


other else you need to get some one to debug directly in server with like tool anydesk or teamviewer
 
We are not at the step to get some one to debug directly in the server with tools like anydesk or teamviewer.

Maybe, if you give me the command line to try what you are saying will be enough.

How to :
try rewrite_confs with directadmin

How to :
change your bind tcp4 to 0.0.0.0
 
try change bind tcp4

recreate named_zone
echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d40


I try to ping that port on ip: 91.121.37.27:53
It open normally but when bind fail to start shouldn't open that port.

try to stop bind service and ping that port
if you stop and can ping online port 53 that it's use by other in network on IP 91.121.37.27.
 
try change bind tcp4
This link doesn't show how to change tcp4 to tcp6
But Bind listen already on all interfaces and IP (default) with listen on all interfaces and IP (default) in /etc/bind/named.conf with :
listen-on { any; };

recreate named_zone
echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d40
This is will erase all existing DNS Zone ?
I would like avoid to erase my dns existing zones, that's an hard job to create again all dns zone for all domains name...

if you stop and can ping online port 53 that it's use by other in network on IP 91.121.37.27
Bind is offline already because the problem is "Bind don't start" ;-)
Any way I have done
Code:
 /etc/init.d/bind9 stop
and Bind stopped

~# ping 91.121.37.27:53
Code:
ping: 91.121.37.27:53: Name or service not known

~# ping -c 3 91.121.37.27
Code:
PING 91.121.37.27 (91.121.37.27) 56(84) bytes of data.
64 bytes from 91.121.37.27: icmp_seq=1 ttl=64 time=0.129 ms
64 bytes from 91.121.37.27: icmp_seq=2 ttl=64 time=0.104 ms
64 bytes from 91.121.37.27: icmp_seq=3 ttl=64 time=0.070 ms

--- 91.121.37.27 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 32ms
rtt min/avg/max/mdev = 0.070/0.101/0.129/0.024 ms
 
You shouldn't use ping to tell port

When you want to check some port opened please use eg.
Code:
telnet 91.121.37.27 53

That it hard to debug without checking with remote
Your bind start fail but I still got telnet to 53 on your IP and it's open port.

If it start fait. Port shouldn't open.
because your ipv6 can start normolly but your ipv4 is problem.

It hard to help without debug directly

Create ticket to directadmin support and let them help you directly.
You need to find your friend to check directly
 
I'd like to note CustomBuild does not manage Bind. You must be having a configuration issue. Check:
Code:
/usr/sbin/named-checkconf -z /etc/named.conf | grep -v loaded
 
Thanks Mister Custom Build

/usr/sbin/named-checkconf -z /etc/named.conf | grep -v loaded
Code:
~# /usr/sbin/named-checkconf -z /etc/named.conf | grep -v loaded
open: /etc/named.conf: file not found

How this file can disappear ?
How to create a new one ?

Or you mean /usr/sbin/named-checkconf -z /etc/bind/named.conf | grep -v loaded

Thanks
 
Thanks Mister Custom Build


Code:
~# /usr/sbin/named-checkconf -z /etc/named.conf | grep -v loaded
open: /etc/named.conf: file not found

How this file can disappear ?
How to create a new one ?

Or you mean /usr/sbin/named-checkconf -z /etc/bind/named.conf | grep -v loaded

Thanks
Oh, if that's debian - yes, you need to point it to another location. Please check /usr/sbin/named-checkconf -z /etc/bind/named.conf | grep -v loaded.
 
Oh, if that's debian - yes, you need to point it to another location. Please check /usr/sbin/named-checkconf -z /etc/bind/named.conf | grep -v loaded
It return nothing or any problems and seems that I do not have any configuration issues

Please give me a new direction to search

Apparently that's more with :
Code:
binding TCP socket: address in use
and
Code:
Process: 13969 ExecStart=/usr/sbin/named $OPTIONS (code=exited, status=1/FAILURE)
That's the error when I am trying to restart bind (/etc/init.d/bind9 restart)
 
The journalctl -xe command also not showing strange things?

Yes, with journalctl -xe command I have :
Code:
May 25 00:48:37 vps123456.ovh.net kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=fa:16:3e:08:e5:ba:32:cf:ac:97:ec:de:08:00 SRC=94.102.50.137 DST=91.121.37.27 LEN=40 TOS=0x00 PREC=0x00 TTL=245 ID=8462 PROTO=TCP SPT=51347 DPT=20031 WI
May 25 00:48:37 vps123456.ovh.net kernel: Firewall: *ICMP_IN Blocked* IN=eth0 OUT= MAC=fa:16:3e:08:e5:ba:32:cf:ac:97:ec:de:08:00 SRC=167.114.37.1 DST=91.121.37.27 LEN=32 TOS=0x08 PREC=0x00 TTL=4 ID=1 DF PROTO=ICMP TYPE=8 CODE=0 ID=35770
May 25 00:48:38 vps123456.ovh.net kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=fa:16:3e:08:e5:ba:32:cf:ac:97:ec:de:08:00 SRC=195.54.166.181 DST=51.68.71.112 LEN=40 TOS=0x00 PREC=0x00 TTL=242 ID=9732 PROTO=TCP SPT=45184 DPT=11799 W
May 25 00:48:39 vps123456.ovh.net kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=fa:16:3e:08:e5:ba:32:cf:ac:97:ec:de:08:00 SRC=194.26.29.51 DST=91.121.45.207 LEN=40 TOS=0x00 PREC=0x00 TTL=244 ID=56435 PROTO=TCP SPT=42711 DPT=2065 WI
May 25 00:48:40 vps123456.ovh.net kernel: Firewall: *ICMP_IN Blocked* IN=eth0 OUT= MAC=fa:16:3e:08:e5:ba:32:cf:ac:97:ec:de:08:00 SRC=92.222.186.1 DST=87.98.169.140 LEN=32 TOS=0x08 PREC=0x00 TTL=7 ID=1 DF PROTO=ICMP TYPE=8 CODE=0 ID=47432
May 25 00:48:41 vps123456.ovh.net kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=fa:16:3e:08:e5:ba:32:cf:ac:97:ec:de:08:00 SRC=185.175.93.6 DST=51.38.215.43 LEN=40 TOS=0x00 PREC=0x00 TTL=241 ID=10703 PROTO=TCP SPT=54229 DPT=3393 WIN
May 25 00:48:42 vps123456.ovh.net kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=fa:16:3e:08:e5:ba:32:cf:ac:97:ec:de:08:00 SRC=68.183.83.51 DST=87.98.169.132 LEN=40 TOS=0x00 PREC=0x00 TTL=234 ID=11980 PROTO=TCP SPT=45548 DPT=14315 W
May 25 00:48:42 vps123456.ovh.net kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=fa:16:3e:08:e5:ba:32:cf:ac:97:ec:de:08:00 SRC=194.26.29.227 DST=51.38.250.175 LEN=40 TOS=0x00 PREC=0x00 TTL=244 ID=12518 PROTO=TCP SPT=59109 DPT=29609
lines 932-1001/1001 (END)
 
I stopped CSF (csf -x) just be sure this problem doesn't come from the firewall
Bind doesn't start and still yell :
Code:
May 25 00:59:00 vps123456.ovh.net named[19806]: listening on IPv4 interface eth0, 91.121.37.27#53
May 25 00:59:00 vps123456.ovh.net named[19806]: binding TCP socket: address in use
May 25 00:59:00 vps123456.ovh.net named[19806]: unable to listen on any configured interfaces
May 25 00:59:00 vps123456.ovh.net named[19806]: loading configuration: failure
May 25 00:59:00 vps123456.ovh.net named[19806]: exiting (due to fatal error)
May 25 00:59:00 vps123456.ovh.net systemd[1]: bind9.service: Control process exited, code=exited, status=1/FAILURE
--
-- A start job for unit bind9.service has finished with a failure.
--
-- The job identifier is 1278 and the job result is failed.
May 25 00:59:01 vps123456.ovh.net CRON[19829]: pam_unix(cron:session): session opened for user root by (uid=0)
May 25 00:59:01 vps123456.ovh.net CRON[19830]: (root) CMD (/usr/local/directadmin/dataskq)
May 25 00:59:01 vps123456.ovh.net CRON[19829]: pam_unix(cron:session): session closed for user root
 
Last edited:
Just out of curiosity, cuold it be a hostname issue? Or did you always use vps123456.ovh.net as hostname? I'm must wondering if maybe bind9 is trying to start via vps12345.ovh.net and DA lets it start under host.domain.com.
If not, I'll leave things to smtalk, he's smarter anyway. ;)
 
Something seems to be already started on port 53. Check:
netstat -lnp | grep 53
 
Back
Top