# named fails to start

## cwc

* start-stop-daemon: failed to start `/usr/sbin/named'     

Name was update but it fails to start?

Any ideas?  

Is there a link to problem solve named?

```

azzerare ~ # /etc/init.d/named reload      

 * Reloading named.conf and zone files ...

 * Checking named configuration ...                                                                                                                     [ ok ]

 * WARNING: -o/--oknodo is deprecated and will be removed in the future

 * start-stop-daemon: fopen `/var/run/named/named.pid': No such file or directory     

azzerare ~ # /etc/init.d/named checkzones

 * Checking named configuration and zones ...

zone localhost/IN: loaded serial 2008122601

zone 127.in-addr.arpa/IN: loaded serial 2008122601

zone casa/IN: loaded serial 101222                                                                                                                      [ ok ]

azzerare ~ # 

azzerare ~ # /etc/init.d/named checkconfig 

 * Checking named configuration ...                                                                                                                     [ ok ]

azzerare ~ # 

```

----------

## Veldrin

my guess is, that you serial in casa is to short - it should be 10 digits long e.g yyyymmddxx

V.

----------

## Princess Nell

Check the logs - not sure where Gentoo named logs to by default, /var/log/messages? Or whatever log file you have defined in named.conf.

I'd love to know where those

 *Quote:*   

> 
> 
> WARNING: -o/--oknodo is deprecated and will be removed in the future 
> 
> 

 

lines come from, I've found them in /root/dead.letter.

Serial numbers can be wrong, but not in this case. All that matters is that is an unsigned 32-bit value. See RFC1035. Using the date is just a common convention.

----------

## cwc

azzerare ~ # more dead.letter 

azzerare : Jun  9 17:21:46 : cwc : user NOT in sudoers ; TTY=pts/0 ; PWD=/home/cwc ; USER=root ; COMMAND=/bin/bash

azzerare : Jun  9 11:35:41 : cwc : user NOT in sudoers ; TTY=pts/0 ; PWD=/home/cwc ; USER=root ; COMMAND=/bin/bash

azzerare ~ # 

I set the serial number to: 2011071201  and looked at this file:  dead.letter

What should go in the named.pid file?

----------

## Princess Nell

Ah, sorry, the dead.letter file has nothing at all to do with named.  :Smile: 

The named.pid file contains the process id of the running named process. If there is no running named process but you have a named.pid file, remove it and then try to restart named. Again, check the logs. As checkconfig and checkzone found no config or zone file errors, you could be looking at a permissions problem of sorts.

----------

## cwc

It looks like named has not run since Jan 1, 2011

Here are the last few lines of /var/log/named/named.log:

23-Dec-2010 07:24:30.961 security: info: client 192.168.1.14#39766: query (cache) 'mukbletnvo/A/IN' denied

23-Dec-2010 07:24:30.961 security: info: client 192.168.1.14#38424: query (cache) 'pikzlpdgkm/A/IN' denied

23-Dec-2010 07:24:30.961 security: info: client 192.168.1.14#53784: query (cache) 'qipshgngvi/A/IN' denied

23-Dec-2010 07:24:30.961 security: info: client 192.168.1.14#58183: query (cache) 'mukbletnvo/A/IN' denied

23-Dec-2010 07:24:30.962 security: info: client 192.168.1.14#39854: query (cache) 'mukbletnvo/A/IN' denied

29-Dec-2010 19:58:02.171 general: info: shutting down

29-Dec-2010 19:58:02.188 general: notice: stopping command channel on 127.0.0.1#953

29-Dec-2010 19:58:02.226 network: info: no longer listening on 127.0.0.1#53

29-Dec-2010 19:58:02.226 network: info: no longer listening on 192.168.1.14#53

29-Dec-2010 19:58:02.252 general: notice: exiting

01-Jan-2011 07:03:27.181 general: info: zone 127.in-addr.arpa/IN: loaded serial 2008122601

01-Jan-2011 07:03:27.190 general: info: zone casa/IN: loaded serial 101222

01-Jan-2011 07:03:27.190 general: info: zone localhost/IN: loaded serial 2008122601

01-Jan-2011 07:03:27.190 general: error: managed-keys-zone ./IN: loading from master file managed-keys.bind failed: file not found

01-Jan-2011 07:03:27.191 general: info: managed-keys-zone ./IN: loaded serial 0

01-Jan-2011 07:03:27.192 general: notice: running

01-Jan-2011 07:03:27.192 notify: info: zone casa/IN: sending notifies (serial 101222)

----------

## Princess Nell

Is there a log from when you try to start it?

----------

## cwc

 *Princess Nell wrote:*   

> Is there a log from when you try to start it?

 

I replaced the named.conf with the original without my zone file link and named started fine.  (Should have done this from the start)

I then added a link to my internal zone and it worked again.

I need to do a bit of problem solving then post back.

work calls  :Sad: 

My zone files need work!

There is no log file so there is a problem there also.

Thanks for the lines.

----------

## KibeR_ShuriK

```

localhost ~ # /etc/init.d/named restart

 * Starting named ...

 * Checking named configuration ...             [ ok ]

named: user 'named' unknown

 * start-stop-daemon: failed to start `/usr/sbin/named'     [ !! ]

 * ERROR: named failed to start

localhost ~ # useradd -d /home/bind -M -s /sbin/nologin named

localhost ~ # /etc/init.d/named restart

 * Starting named ...

 * Checking named configuration ...       [ ok ]

 * start-stop-daemon: failed to start `/usr/sbin/named'      [ !! ]

 * ERROR: named failed to start

localhost ~ # chown named -R /etc/bind/

localhost ~ # chown named -R /var/bind 

localhost ~ # chown named -R /var/log/named/

localhost ~ # chown named -R /var/run/named/

localhost ~ # /etc/init.d/named restart

 * Starting named ...

 * Checking named configuration ...       [ ok ]

localhost ~ # 

```

```

localhost ~ # killall named

named: no process found

localhost ~ # /etc/init.d/named restart

 * Caching service dependencies ...                                                                                                                         [ ok ]

 * Starting named ...

 * Checking named configuration ...                                                                                                                         [ ok ]

 * start-stop-daemon: failed to start `/usr/sbin/named'                                                                                                     [ !! ]

 * ERROR: named failed to start

localhost ~ # named

localhost ~ # host localhost 127.0.0.1

Using domain server:

Name: 127.0.0.1

Address: 127.0.0.1#53

Aliases: 

localhost has address 127.0.0.1

localhost has IPv6 address ::1

localhost ~ # killall named

localhost ~ # host localhost 127.0.0.1

;; connection timed out; no servers could be reached

```

 :Smile: 

----------

