1. Apparently, since I updated from 5.1 to 5.2, dhcpd no longer wants to stay running. The config is sound, and I can start it from the command-line with the "-d" flag and it serves up leases. But without the -d flag, it just silently dies...
2. Syslog contains this little snippet:
dhcpd: Internet Systems Consortium DHCP Server V3.0.5-RedHat
Figured you'd want to know... ;)
-I
On Sun, July 6, 2008 6:57 pm, Ian Forde wrote:
- Apparently, since I updated from 5.1 to 5.2, dhcpd no longer wants to
stay running. The config is sound, and I can start it from the command-line with the "-d" flag and it serves up leases. But without the -d flag, it just silently dies...
Mine has been working without any problems before and after the 5.2 update. You might want to consider posting your configuration file.
Marko
On Sun, 2008-07-06 at 19:12 -0400, Marko A. Jennings wrote:
On Sun, July 6, 2008 6:57 pm, Ian Forde wrote:
- Apparently, since I updated from 5.1 to 5.2, dhcpd no longer wants to
stay running. The config is sound, and I can start it from the command-line with the "-d" flag and it serves up leases. But without the -d flag, it just silently dies...
Mine has been working without any problems before and after the 5.2 update. You might want to consider posting your configuration file.
Well, I stripped it down as much as I could - same problem exists... (IP addresses and domain name changed, of course...)
ddns-update-style none; ignore client-updates;
subnet 10.0.0.0 netmask 255.255.255.0 { range dynamic-bootp 10.0.0.101 10.0.0.200; default-lease-time 86400; max-lease-time 604800; option subnet-mask 255.255.255.0; option broadcast-address 10.0.0.255; option routers 10.0.0.1; option domain-name-servers 10.0.0.75, 10.0.0.76; option domain-name "mydomain.com"; }
But like I was saying before, if it were a config problem, it wouldn't have been able to start on the command-line in non-daemon mode. Same problem when I downloaded it from www.isc.org (3.0.7) and rolled a source build. So there's definitely something strange (or obvious that I'm missing) going on...
-I
On Sun, July 6, 2008 6:57 pm, Ian Forde wrote:
- Apparently, since I updated from 5.1 to 5.2, dhcpd no longer wants to
stay running. The config is sound, and I can start it from the command-line with the "-d" flag and it serves up leases. But without the -d flag, it just silently dies...
What exit code does it return when you execute it from the command line without the "-d" flag?
On Sun, 2008-07-06 at 19:34 -0400, Marko A. Jennings wrote:
On Sun, July 6, 2008 6:57 pm, Ian Forde wrote:
- Apparently, since I updated from 5.1 to 5.2, dhcpd no longer wants to
stay running. The config is sound, and I can start it from the command-line with the "-d" flag and it serves up leases. But without the -d flag, it just silently dies...
What exit code does it return when you execute it from the command line without the "-d" flag?
0
In fact, here's the output... (IP, hostname, and Mac info changed...)
[root@myhost etc]# dhcpd Internet Systems Consortium DHCP Server V3.0.5-RedHat Copyright 2004-2006 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ Wrote 0 leases to leases file. Listening on LPF/eth0/00:00:de:ad:be:ef/10.0.0/24 Sending on LPF/eth0/00:00:de:ad:be:ef/10.0.0/24 Sending on Socket/fallback/fallback-net [root@myhost etc]# echo $? 0 [root@myhost etc]# !ps ps -ef | grep dhcpd root 15058 11173 0 16:36 pts/0 00:00:00 grep dhcpd [root@myhost etc]#
-I
On Sun, 6 Jul 2008, Ian Forde wrote:
Wrote 0 leases to leases file. Listening on LPF/eth0/00:00:de:ad:be:ef/10.0.0/24 Sending on LPF/eth0/00:00:de:ad:be:ef/10.0.0/24
??? This network 'name' literal (containing the '/'): "10.0.0/24" _looks_ wrong to me (it causes the 'punctuation' in the logfile entry to contain an extra '/'). Shouldn't this be, rather something, like: "FIRST-LAN" I do not see a formal restriction on the characterset allowed there; this appears:
Name should be the name of the shared network. This name is used when printing debugging messages, so it should be descriptive for the shared network. The name may have the syntax of a valid domain name (although it will never be used as such), or it may be any arbitrary name, enclosed in quotes.
I suggest you follow the charset of a valid 'domain name' and see if the problem stops.
-- Russ herrold
Jul 7 10:10:51 nfs dhcpd: Listening on LPF/eth0/00:01:02:05:54:ac/FIRST-LAN
shared-network FIRST-LAN { option routers 10.16.1.1; # router being our router; option domain-name "first.lan"; default-lease-time 6000 ; max-lease-time 144000 ; option subnet-mask 255.255.255.0; allow booting; allow bootp; next-server 10.16.1.112 ; subnet 10.16.1.0 netmask 255.255.255.0 { group { default-lease-time 3600; max-lease-time 12000; host nt { hardware ethernet 00:60:97:71:26:52 ; fixed-address 10.16.1.2 ; } } } }
Hey,
On Sun, Jul 6, 2008 at 7:39 PM, Ian Forde ian@duckland.org wrote:
In fact, here's the output... (IP, hostname, and Mac info changed...)
[root@myhost etc]# dhcpd Internet Systems Consortium DHCP Server V3.0.5-RedHat Copyright 2004-2006 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ Wrote 0 leases to leases file. Listening on LPF/eth0/00:00:de:ad:be:ef/10.0.0/24 Sending on LPF/eth0/00:00:de:ad:be:ef/10.0.0/24 Sending on Socket/fallback/fallback-net [root@myhost etc]# echo $? 0 [root@myhost etc]# !ps ps -ef | grep dhcpd root 15058 11173 0 16:36 pts/0 00:00:00 grep dhcpd [root@myhost etc]#
Try to strace it:
[root@myhost etc]# strace -f -tt -s 1024 -o /tmp/dhcpd_strace.txt dhcpd
Then check /tmp/dhcpd_strace.txt (I suggest starting from the bottom) and see why it exited or died. The strace might give you a good clue of what happened, and even if it tried to log anything (unsuccessfully?) before being terminated.
HTH, Filipe
On Sun, 2008-07-06 at 15:57 -0700, Ian Forde wrote:
- Apparently, since I updated from 5.1 to 5.2, dhcpd no longer wants to
stay running. The config is sound, and I can start it from the command-line with the "-d" flag and it serves up leases. But without the -d flag, it just silently dies...
Well, *that* sucked. I had to start the daemon with a '-p 67' option to get it to stick. So I stuck that into /etc/sysconfig/dhcpd as:
DHCPDARGS="-p 67"
and it started. Which led me down the "strace with and without the -p option and compare the output" path...
Turns out that without the -p option, it looks up the port number to use. nsswitch.conf in my case had "services: files ldap", which caused it to fail. I changed it to "services: files" and it worked. What kills me is that dhcpd died silently... and I have absolutely no desire to put services into my ldap directory...
So I've taken out the -p argument, and all is well...
Thanks for the assist though!
-I
On Sun, 6 Jul 2008, Ian Forde wrote:
On Sun, 2008-07-06 at 15:57 -0700, Ian Forde wrote:
- Apparently, since I updated from 5.1 to 5.2, dhcpd no longer wants to
stay running. The config is sound, and I can start it from the command-line with the "-d" flag and it serves up leases. But without the -d flag, it just silently dies...
Well, *that* sucked. I had to start the daemon with a '-p 67' option to get it to stick. So I stuck that into /etc/sysconfig/dhcpd as:
DHCPDARGS="-p 67"
and it started. Which led me down the "strace with and without the -p option and compare the output" path...
Turns out that without the -p option, it looks up the port number to use. nsswitch.conf in my case had "services: files ldap", which caused it to fail. I changed it to "services: files" and it worked. What kills me is that dhcpd died silently... and I have absolutely no desire to put services into my ldap directory...
So I've taken out the -p argument, and all is well...
Thanks for the assist though!
Would you be so kind to report this problem to CentOS' bugtracker (and probably Red Hat's Bugzilla) ?
This obviously is an error that can bite other people as well and the least we can do is bring this to Red Hat's attention.
Ian Forde wrote:
On Sun, 2008-07-06 at 15:57 -0700, Ian Forde wrote:
- Apparently, since I updated from 5.1 to 5.2, dhcpd no longer wants to
stay running. The config is sound, and I can start it from the command-line with the "-d" flag and it serves up leases. But without the -d flag, it just silently dies...
Well, *that* sucked. I had to start the daemon with a '-p 67' option to get it to stick. So I stuck that into /etc/sysconfig/dhcpd as:
DHCPDARGS="-p 67"
and it started. Which led me down the "strace with and without the -p option and compare the output" path...
Turns out that without the -p option, it looks up the port number to use. nsswitch.conf in my case had "services: files ldap", which caused it to fail. I changed it to "services: files" and it worked. What kills me is that dhcpd died silently... and I have absolutely no desire to put services into my ldap directory...
So I've taken out the -p argument, and all is well...
Thanks for the assist though!
This also may have to do with the nss_ldap issue ... try my nss_ldap from the testing repo (if you have nss_ldap installed).
http://dev.centos.org/centos/5/
Thanks, Johnny Hughes