# Bind does not start [SOLVED]

## lordlouf

Hello,

since my last update of Gentoo, Bind (named) does not start anymore. I updated to 9.4.0 from 9.3.4-r2 then downgraded back to 9.3.4-r2 without solving the problem. 

When I start named, I got the following output:

```

 * Starting named ...                                                                                        [ !! ]
```

The Daemon log is like that:

```
Apr 20 17:49:26 ns named[14591]: starting BIND 9.3.4 -u named -n 1 -d 255

Apr 20 17:49:26 ns named[14591]: loading configuration from '/etc/bind/named.conf'

Apr 20 17:49:26 ns named[14591]: no IPv6 interfaces found

Apr 20 17:49:26 ns named[14591]: listening on IPv4 interface eth0, 213.251.175.144#53

Apr 20 17:49:26 ns named[14591]: listening on IPv4 interface lo, 127.0.0.1#53

Apr 20 17:49:26 ns named[14591]: command channel listening on 127.0.0.1#953

Apr 20 17:49:26 ns named[14591]: fflush() to pid file '/var/run/named.pid' failed

Apr 20 17:49:26 ns named[14591]: exiting (due to early fatal error)

```

What can I do?

thanksLast edited by lordlouf on Fri Apr 20, 2007 4:20 pm; edited 2 times in total

----------

## moocha

What is the output of

```
ls -la /var/run/named
```

?

----------

## lordlouf

it's:

```
total 8

drwxr-xr-x 2 named named 4096 avr 20 17:47 .

drwxrwxrwx 8 root  root  4096 avr 20 17:49 ..
```

and for /var/run:

```
-rw-r--r--  1 named  named     0 avr 20 17:49 named.pid

```

thanks

----------

## moocha

It's almost certainly your named.conf. You probably specified

```
pid-file "/var/run/named.pid";
```

instead of

```
pid-file "/var/run/named/named.pid";
```

(note the missing named directory).

Please note that if you're running a chrooted named your configuration file will be under /chroot/dns/etc/bind and the PID file directory will be /chroot/dns/var/run/named.

----------

## lordlouf

I have just made the change in my named.conf, and I have the same error:

```
Apr 20 18:31:18 ns named[17262]: fflush() to pid file '/var/run/named/named.pid' failed
```

And here is the result of the ls command:

```
ns conf.d # ls -la /var/run/named

total 8

drwxr-xr-x 2 named named 4096 avr 20 18:31 .

drwxrwxrwx 8 root  root  4096 avr 20 17:49 ..

-rw-r--r-- 1 named named    0 avr 20 18:31 named.pid
```

----------

## moocha

Zero-sized file, but it gets created so it's not a permission issue.

Have you by any chance run out of space on the file system hosting /var? A quick

```
df -h
```

should tell you. If that's not it, the next suspect would be (pretty severe) file system corruption, in which case you should try booting from a LiveCD and fsck it.

----------

## lordlouf

Thanks a lot, it was that, although I have no idea how my file system could have filled up like that.

----------

## moocha

Glad to hear it's solved. Possibly filled up by /var/tmp/portage (try rm -rf-ing that directory first, it's safe to delete).

----------

## PaulBredbury

You mean:

```
rm -rf /var/tmp/portage/*
```

----------

## moocha

 *PaulBredbury wrote:*   

> You mean:
> 
> ```
> rm -rf /var/tmp/portage/*
> ```
> ...

 Unnecessary. portage will recreate it with the correct permissions the first time it's needed anyway, so there's no need to bother with wildcards as root (I've learned it the hard way the first time I accidentally inserted a space before the *...  :Very Happy: )

----------

