I seem to have some problems, I have around 8 domains on my hosting, once per 2-3 hours two of them freeze, i have to restart the BIND in order to make them work.
I was reading trough the logs when i found only this:
named[21853]: the working directory is not writable
BIND worked normally untill this friday, what could be the problem?
Well, that’s an unusual issue… though if that error was the cause of the problems you’re having, it seems like all your domains should be having the same problem.
However, here’s a few questions regarding all that –
What distro/version are you using?
What do you get when running: ps auxw | grep named
I’m taking a guess that you’re running CentOS – if that’s true, what does this command show: ls -ld /var/named/chroot/var/
Yeah, it’s quite interesting, from 8 domains only 2 stop working and I don’t know why. I did not touched the server for the last two weeks, and it worked fine until last friday.
Here are some informations about the server:
[root@xxx ~]# w
19:36:45 up 217 days, 10:44, 1 user, load average: 0.02, 0.05, 0.03
[root@xxx ~]# cat /etc/issue
CentOS release 5.2 (Final)
Kernel \r on an \m
[root@xxx ~]# ps auxw | grep named
root 4786 0.0 0.2 3928 556 pts/0 D+ 19:39 0:00 grep named
named 21853 0.0 1.1 50384 2952 ? Ssl 12:33 0:00 /usr/sbin/named -u named
[root@xxx ~]# ls -ld /var/named/chroot/var/
drwxr-x--- 4 root named 4096 Dec 14 08:22 /var/named/chroot/var/
[root@xxx ~]#
Is it possible that the two failing domains are dynamic domains? As in they can be updated via the DDNS protocol? In that case, BIND would have to write a journal file to its working directory, while in case of static domains no write accesses need to be done to the zone files except you change config. That might explain why only two of your eight domains have problems.
In your ls output, it indeed looks like the working directory is not group-writable. I’m assuming that under CentOS /var/named/chroot/var is the directory where the zone files (and journals) are stored, which is /var/lib/bind under Ubuntu (BIND does not run chrooted there).