# dhcpd won't start

## elmar283

Since I updated @world (sudo emerge -av --deep --update --newuse @world) and I updated the /etc/conf.d/dhcpd file, /etc/init.d/dhcpd won't start anymore.

There was a change in the chroot dir, but it doesn't matter wether or not I put the origional dir back or disable chroot.

So what's wrong?

This are my config files:

```
Last login: Thu Sep 29 14:59:11 on ttys000

arthurdent:~ elmarotter$ ssh elmarotter@masterserver

Password: 

Last login: Thu Sep 29 14:59:18 CEST 2011 from 192.168.0.4 on pts/0

elmarotter@masterserver ~ $ nano -w /etc/conf.d/dhcpd

  GNU nano 2.2.5                                                   Bestand: /etc/conf.d/dhcpd                                                                                                              

# /etc/conf.d/dhcpd: config file for /etc/init.d/dhcpd

# If you require more than one instance of dhcpd you can create symbolic

# links to dhcpd service like so

#   cd /etc/init.d

#   ln -s dhcpd dhcpd.foo

#   cd ../conf.d

#   cp dhcpd dhcpd.foo

# Now you can edit dhcpd.foo and specify a different configuration file.

# You'll also need to specify a pidfile in that dhcpd.conf file.

# See the pid-file-name option in the dhcpd.conf man page for details.

# If you wish to run dhcpd in a chroot, uncomment the following line

DHCPD_CHROOT="/var/lib/dhcp/chroot"

# DHCPD_CHROOT="/var/run/dhcp/chroot" #OLD conf

# All file paths below are relative to the chroot.

# You can specify a different chroot directory but MAKE SURE it's empty.

# Specify a configuration file - the default is /etc/dhcp/dhcpd.conf

# DHCPD_CONF="/etc/dhcp/dhcpd.conf"

# Configure which interface or interfaces to for dhcpd to listen on.

# List all interfaces space separated. If this is not specified then

# we listen on all interfaces.

DHCPD_IFACE="eht0"

# Insert any other dhcpd options - see the man page for a full list.

# DHCPD_OPTS=""
```

```

Last login: Thu Sep 29 14:59:11 on ttys000

arthurdent:~ elmarotter$ ssh elmarotter@masterserver

Password: 

Last login: Thu Sep 29 14:59:18 CEST 2011 from 192.168.0.4 on pts/0

elmarotter@masterserver ~ $ nano -w /etc/conf.d/dhcpd

elmarotter@masterserver ~ $ nano -w /etc/dhcpd

elmarotter@masterserver ~ $ nano -w /etc/dhcp

dhcp/        dhcpcd.conf  

elmarotter@masterserver ~ $ nano -w /etc/dhcp/dhc

dhclient.conf  dhcpd.conf     

elmarotter@masterserver ~ $ nano -w /etc/dhcp/dhcpd.conf 





  GNU nano 2.2.5                                                  Bestand: /etc/dhcp/dhcpd.conf                                                                                                            

default-lease-time 3600;

max-lease-time 86400;

authorative;

log-facility local7;

ddns-update-style interim;

ddns-rev-domainname "in-addr.arpa";

option time-servers ntp.xs4all.nl;

option domain-name-servers 192.168.0.1;

option domain-name "eotter1979.xs4all.nl";

shared-network eotter1979.xs4all.nl {

        option time-servers ntp.xs4all.nl;

        option domain-name-servers 192.168.0.1;

        option domain-name "eotter1979.xs4all.nl";

        option broadcast-address 192.168.0.255;

        option subnet-mask 255.255.255.0;

        option routers 192.168.0.1;

        max-lease-time 86400;

        default-lease-time 3600;

        # Default

        subnet 192.168.0.0 netmask 255.255.255.0 {

                option time-servers ntp.xs4all.nl;

                option domain-name-servers 192.168.0.1;

                option domain-name "eotter1979.xs4all.nl";

                option broadcast-address 192.168.0.255;

                option subnet-mask 255.255.255.0;

                option routers 192.168.0.1;

                dynamic-bootp-lease-length 86400;

                server-name "eotter1979.xs4all.nl";

                max-lease-time 86400;

                default-lease-time 3600;

                range 192.168.0.100 192.168.0.250;

                }

  # ArthurDent

        host arthurdent {

                option ntp-servers ntp.xs4all.nl;

                option time-servers ntp.xs4all.nl;

                option domain-name-servers 192.168.0.1;

                option domain-name "eotter1979.xs4all.nl";

                option broadcast-address 192.168.0.255;

                option subnet-mask 255.255.255.0;

                option routers 192.168.0.1;

                option host-name "arthurdent";

                server-name "eotter1979.xs4all.nl";

                max-lease-time 86400;

                default-lease-time 3600;

                hardware ethernet 00:1e:c2:ac:d5:79;

                fixed-address 192.168.0.4;

                }

        # DeepThought

        host deepthought {

                option ntp-servers ntp.xs4all.nl;

                option time-servers ntp.xs4all.nl;

                option domain-name-servers 192.168.0.1;

                option domain-name "eotter1979.xs4all.nl";

                option broadcast-address 192.168.0.255;

                option subnet-mask 255.255.255.0;

                option routers 192.168.0.1;

                option host-name "deepthought";

                dynamic-bootp-lease-length 86400;

                server-name "eotter1979.xs4all.nl";

                max-lease-time 86400;

                default-lease-time 3600;

                hardware ethernet 00:16:cb:a3:4e:a4;

                fixed-address 192.168.0.3;

                }

  # PikkaBird

        host PikkaBird {

                option ntp-servers ntp.xs4all.nl;

                option time-servers ntp.xs4all.nl;

                option domain-name-servers 192.168.0.1;

                option domain-name "eotter1979.xs4all.nl";

                option broadcast-address 192.168.0.255;

                option subnet-mask 255.255.255.0;

                option routers 192.168.0.1;

                option host-name "PikkaBird";

                dynamic-bootp-lease-length 86400;

                server-name "eotter1979.xs4all.nl";

                max-lease-time 86400;

                default-lease-time 3600;

                hardware ethernet 00:1B:63:F3:6E:F8;

                fixed-address 192.168.0.2;

                }

        # DeepThoughtWireless

        host DeepThoughtWireless {

                option ntp-servers ntp.xs4all.nl;

                option time-servers ntp.xs4all.nl;

                option domain-name-servers 192.168.0.1;

                option domain-name "eotter1979.xs4all.nl";

                option broadcast-address 192.168.0.255;

                option subnet-mask 255.255.255.0;

                option routers 192.168.0.1;

 option host-name "DeepThoughtWireless";

                dynamic-bootp-lease-length 86400;

                server-name "eotter1979.xs4all.nl";

                max-lease-time 86400;

                default-lease-time 3600;

                hardware ethernet 00:16:cb:05:aa:44;

                fixed-address 192.168.0.5;

                }

        }

```

```

elmarotter@masterserver ~ $ sudo /etc/init.d/dhcpd start

Wachtwoord: 

 * Starting chrooted dhcpd ...

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

 * ERROR: dhcpd failed to start

elmarotter@masterserver ~ $ 

```

If I put chroot out again:

```
elmarotter@masterserver ~ $ sudo /etc/init.d/dhcpd start

 * Caching service dependencies ...                                                                                                                                                                  [ ok ]

 * Starting dhcpd ...

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

 * ERROR: dhcpd failed to start

```

----------

## elmar283

I forgot to post the error on /var/log/messages

```

Sep 29 18:06:05 masterserver sshd[32509]: Accepted keyboard-interactive/pam for elmarotter from 192.168.0.4 port 54103 ssh2

Sep 29 18:06:05 masterserver sshd[32509]: pam_unix(sshd:session): session opened for user elmarotter by (uid=0)

Sep 29 18:06:18 masterserver sudo: elmarotter : TTY=pts/2 ; PWD=/home/elmarotter ; USER=root ; COMMAND=/etc/init.d/dhcpd start

Sep 29 18:06:18 masterserver sudo: pam_unix(sudo:session): session opened for user root by elmarotter(uid=1000)

Sep 29 18:06:18 masterserver dhcpd: Internet Systems Consortium DHCP Server 4.2.2 Gentoo-r2

Sep 29 18:06:18 masterserver dhcpd: Copyright 2004-2011 Internet Systems Consortium.

Sep 29 18:06:18 masterserver dhcpd: All rights reserved.

Sep 29 18:06:18 masterserver dhcpd: For info, please visit https://www.isc.org/software/dhcp/

Sep 29 18:06:18 masterserver dhcpd: WARNING: Host declarations are global.  They are not limited to the scope you declared them in.

Sep 29 18:06:18 masterserver dhcpd: Internet Systems Consortium DHCP Server 4.2.2 Gentoo-r2

Sep 29 18:06:18 masterserver dhcpd: Copyright 2004-2011 Internet Systems Consortium.

Sep 29 18:06:18 masterserver dhcpd: All rights reserved.

Sep 29 18:06:18 masterserver dhcpd: For info, please visit https://www.isc.org/software/dhcp/

Sep 29 18:06:18 masterserver dhcpd: WARNING: Host declarations are global.  They are not limited to the scope you declared them in.

Sep 29 18:06:18 masterserver dhcpd: Internet Systems Consortium DHCP Server 4.2.2 Gentoo-r2

Sep 29 18:06:18 masterserver dhcpd: Copyright 2004-2011 Internet Systems Consortium.

Sep 29 18:06:18 masterserver dhcpd: All rights reserved.

Sep 29 18:06:18 masterserver dhcpd: For info, please visit https://www.isc.org/software/dhcp/

Sep 29 18:06:18 masterserver dhcpd: Wrote 0 deleted host decls to leases file.

Sep 29 18:06:18 masterserver dhcpd: Wrote 0 new dynamic host decls to leases file.

Sep 29 18:06:18 masterserver dhcpd: Wrote 14 leases to leases file.

Sep 29 18:06:18 masterserver dhcpd: 

Sep 29 18:06:18 masterserver dhcpd: No subnet declaration for eht0 (no IPv4 addresses).

Sep 29 18:06:18 masterserver dhcpd: ** Ignoring requests on eht0.  If this is not what

Sep 29 18:06:18 masterserver dhcpd:    you want, please write a subnet declaration

Sep 29 18:06:18 masterserver dhcpd:    in your dhcpd.conf file for the network segment

Sep 29 18:06:18 masterserver dhcpd:    to which interface eht0 is attached. **

Sep 29 18:06:18 masterserver dhcpd: 

Sep 29 18:06:18 masterserver dhcpd: 

Sep 29 18:06:18 masterserver dhcpd: Not configured to listen on any interfaces!

Sep 29 18:06:18 masterserver dhcpd: 

Sep 29 18:06:18 masterserver dhcpd: This version of ISC DHCP is based on the release available

Sep 29 18:06:18 masterserver dhcpd: on ftp.isc.org.  Features have been added and other changes

Sep 29 18:06:18 masterserver dhcpd: have been made to the base software release in order to make

Sep 29 18:06:18 masterserver dhcpd: it work better with this distribution.

Sep 29 18:06:18 masterserver dhcpd: 

Sep 29 18:06:18 masterserver dhcpd: Please report for this software via the Gentoo Bugzilla site:

Sep 29 18:06:18 masterserver dhcpd:     http://bugs.gentoo.org/

Sep 29 18:06:18 masterserver dhcpd: 

Sep 29 18:06:18 masterserver dhcpd: exiting.

Sep 29 18:06:18 masterserver /etc/init.d/dhcpd[32543]: start-stop-daemon: failed to start `/usr/sbin/dhcpd'

Sep 29 18:06:18 masterserver /etc/init.d/dhcpd[32524]: ERROR: dhcpd failed to start

```

----------

## Hu

Is interface eht0 up and configured properly?  Unless you intentionally renamed your interface, your setting for DHCPD_IFACE is misspelled.

----------

## cach0rr0

in other words:

```

DHCPD_IFACE="eht0"

```

is not likely to be particularly successful

----------

