dhcpd.pid

Glenn Satchell Glenn.Satchell at uniq.com.au
Wed Sep 5 23:30:08 UTC 2007


>Subject: dhcpd.pid
>Date: Wed, 5 Sep 2007 12:18:45 -0700
>From: "John Tabasz \(jtabasz\)" <jtabasz at cisco.com>
>
>I am using Solaris 2.8 and dhcp 3.0.2. All addresses are being assigned
>based on MAC address. There are no available lease ranges defined in the
>.conf file. 

dhcpd 3.0.2 is pretty old, you should consider upgrading to 3.0.6 or 3.1.0.

>I am getting a error message in /var/adm/messages for every lease
>request the server sees:
>
>Sep  5 11:41:05 SERVERNAME dhcpd: [ID 702911 local3.error] DHCPDISCOVER
>from 00:11:
>bb:ab:f0:00 via eri0: network TEST: no free leases
>Sep  5 11:41:06 SERVERNAME  dhcpd: [ID 702911 local3.error] DHCPDISCOVER
>from 00:1a:
>6d:83:c6:40 via eri0: network TEST: no free leases
>Sep  5 11:41:06 SERVERNAME  dhcpd: [ID 702911 local3.error] DHCPDISCOVER
>from 00:0e:
>d7:fe:d9:00 via eri0: network TEST: no free leases
>
>Then the server host, "SERVERNAME" shuts down, reboots actually for some
>reason I have yet to discover. 

Look in /var/adm/messages for a message containing the work 'panic'
just before the boot messages. It may be that you need to fix a
hardware problem or install some Solaris patches.

>When the Sun box comes back up, the dhcpd does not start because it
>thinks that dhcpd is already running. The file /etc/dhcpd.pid exists and
>has the created time stamp of the last time the server was started (not
>the current time).
>
>It turns out that these MAC addresses are not in the /etc/dhcpd.conf
>file. They are hammering the server with DHCPDISCOVER requests. 

The server is behaving correctly. You don't have any dynamic pools, so
there are no leases available to give to these potential clients.

>Why is the server not starting up as the sun box boots up? There is a
>/etc/rc2.d file that has worked in the past and works fine if run
>manually, unless the dhcp server is in this state. 
>If I rename or remove the /etc/dhcpd.pid file, then run the startup
>script manually, the dhcpd will start up. 

The rc2.d script is not part of the distributed dhcp package, so it
could have been written by someone at your site.

Add 'rm -f /etc/dhcpd.pid' to an appropriate place in your startup script.

>Shouldn't a pid file be located in a temporary location like /var/tmp?
>How do I arrange this without recompiling the package? 

/var/run is a good place for dhcpd.pid on solaris. This is from the
dhcpd.conf man page:

     The pid-file-name statement

       pid-file-name name;

       Name should be the name of the DHCP  server's  process  ID
       file.    This  is the file in which the DHCP server's pro-
       cess ID is stored when the server  starts.    By  default,
       this  is  /var/run/dhcpd.pid.    Like  the lease-file-name
       statement, this statement must appear in the  outer  scope
       of the configuration file.

>The unknown MAC addresses is another issue. 
>A related question is Can I selectively dump some error messages and
>retain others? 

The messages are written with different syslog levels. By using
daemon.notice, daemon.info, etc, in /etc/syslog.conf you can reduce the
volume of messages.

regards,
-glenn


More information about the dhcp-users mailing list