Quote:
Originally Posted by jmgibson1981
Code:
● bind9.service - BIND Domain Name Server
Loaded: loaded (/lib/systemd/system/bind9.service; enabled; vendor preset: enabled)
Drop-In: /run/systemd/generator/bind9.service.d
└─50-insserv.conf-$named.conf
Active: active (running) since Thu 2018-07-12 09:43:21 MST; 8h ago
Docs: man:named(8)
Process: 6034 ExecStop=/usr/sbin/rndc stop (code=exited, status=0/SUCCESS)
Main PID: 6042 (named)
Tasks: 7
Memory: 24.2M
CPU: 55.988s
CGroup: /system.slice/bind9.service
└─6042 /usr/sbin/named -f -u bind
Jul 12 18:12:40 failbox named[6042]: REFUSED unexpected RCODE resolving 'log.dmtry.com/A/IN': 216.239.34.99#53
Jul 12 18:12:40 failbox named[6042]: network unreachable resolving 'log.dmtry.com/A/IN': 2001:4860:4802:34::63#53
Jul 12 18:12:41 failbox named[6042]: REFUSED unexpected RCODE resolving 'log.dmtry.com/A/IN': 216.239.32.99#53
Jul 12 18:12:41 failbox named[6042]: REFUSED unexpected RCODE resolving 'log.dmtry.com/A/IN': 216.239.38.99#53
Jul 12 18:12:41 failbox named[6042]: REFUSED unexpected RCODE resolving 'log.dmtry.com/A/IN': 216.239.36.99#53
Jul 12 18:12:41 failbox named[6042]: network unreachable resolving 'log.dmtry.com/A/IN': 2001:4860:4802:32::63#53
Jul 12 18:12:41 failbox named[6042]: network unreachable resolving 'log.dmtry.com/A/IN': 2001:4860:4802:36::63#53
Jul 12 18:12:41 failbox named[6042]: network unreachable resolving 'log.dmtry.com/A/IN': 2001:4860:4802:38::63#53
Jul 12 18:12:41 failbox named[6042]: REFUSED unexpected RCODE resolving 'log.dmtry.com/A/IN': 216.239.34.99#53
Jul 12 18:12:41 failbox named[6042]: network unreachable resolving 'log.dmtry.com/A/IN': 2001:4860:4802:34::63#53
Have got a script running every so often checking a few services for certain keywords in them. If found it logs the status, then restarts the service. The above status causes my bind server to stop working. The service keeps running but it doesn't resolve dns hence the reason I restart it. What does the above mean, any way to prevent it? This is on Ubuntu 16.04 LTS
|
As bathory said, the entries re: log.dmtry.com are not an indication that your DNS is not working. When I try to resolve that domain name on either of the two networks I'm on, I get a SERVFAIL. Both networks use ISP DNS servers which I'm sure are working. Something in your configuration is causing that attempt several times a second...a typo in a zone file somewhere, perhaps?
See the line I've bolded in red which indicates that named is up, and has been for 8 hours.
The ExecStop line is about rndc, not about bind. I
think it's the program that starts the name server.
What keywords is your script looking for to indicate that named is down to cause a restart?
This is a systemd distro, yes?
Suggestion:
Stop named manually
Run the status command...identify the line that says the service is down/stopped/not running.
Start named
Modify your script to look only for that line/keyword.