# Can't stop bind



## megapearl (Mar 8, 2022)

Hi,

I can't stop the bind proces, it is waiting for pid forever.

```
root@mainserver:/usr/local/etc/namedb # uname -a
FreeBSD mainserver.flissinger.local 13.0-RELEASE-p7 FreeBSD 13.0-RELEASE-p7 #0: Mon Jan 31 18:24:03 UTC 2022     [EMAIL]root@amd64-builder.daemonology.net[/EMAIL]:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64
```


```
root@mainserver:/usr/local/etc/namedb # service named stop
Stopping named.
Waiting for PIDS: 8360^C
root@mainserver:/usr/local/etc/namedb # ps aux|grep named
bind       8360   0.0  0.2   57040   20308  -  Ss   20:21      0:00.33 /usr/local/sbin/named -u bind -c /usr/local/etc/namedb/named.conf
```


```
root@mainserver:/usr/local/etc/namedb # pkg info|grep bind
bind-tools-9.16.25             Command line tools from BIND: delv, dig, host, nslookup...
bind918-9.18.0                 BIND DNS suite with updated DNSSEC and DNS64
```


```
root@mainserver:/usr/local/etc/namedb # tail /var/log/named.log
Mar  8 20:26:28 <local1.info> fileserver named[8360]: 08-Mar-2022 20:26:28.861 general: info: received control channel command 'stop'
Mar  8 20:26:28 <local1.info> fileserver named[8360]: 08-Mar-2022 20:26:28.861 network: info: no longer listening on 10.0.0.2#53
Mar  8 20:26:28 <local1.info> fileserver named[8360]: 08-Mar-2022 20:26:28.862 network: info: no longer listening on 2001:470:7f85::2#53
Mar  8 20:26:28 <local1.info> fileserver named[8360]: 08-Mar-2022 20:26:28.862 network: info: no longer listening on ::1#53
Mar  8 20:26:28 <local1.info> fileserver named[8360]: 08-Mar-2022 20:26:28.862 network: info: no longer listening on 127.0.0.1#53
Mar  8 20:26:28 <local1.info> fileserver named[8360]: 08-Mar-2022 20:26:28.863 general: info: shutting down: flushing changes
Mar  8 20:26:28 <local1.notice> fileserver named[8360]: 08-Mar-2022 20:26:28.863 general: notice: stopping command channel on 127.0.0.1#953
Mar  8 20:26:28 <local1.notice> fileserver named[8360]: 08-Mar-2022 20:26:28.863 general: notice: stopping command channel on ::1#953
```
The only way to kill the process is with kill -9 <PID>

How to troubleshoot?

Having this problem on 2 servers running the same setup.
When I start with the standard named.conf.sample the problem is gone.

When I add 1 domain to that file the problem returns:


```
// My Zones
zone "mydomainwashere.com" {
        type master;
        file "/usr/local/etc/namedb/master/mydomainwashere.com";
        auto-dnssec maintain;
        inline-signing yes;
        allow-transfer { key "some-key"; };
        allow-query { any; };
        notify explicit;
        also-notify { some_ip_was_here; };
};
```

/usr/local/etc/namedb/master/mydomainwashere.com is readable by the bind user.

I already tried to remove bind via the ports tree and reinstall it.

Howto troubleshoot?


----------

