This error message appeared while I was troubleshooting a DHCP server:
% /etc/init.d/dhcp3-server restart 2>&1 | nl
1 dhcpd self-test failed. Please fix the config file.
2 The error was:
3 Internet Systems Consortium DHCP Server V3.1.0
4 Copyright 2004-2007 Internet Systems Consortium.
5 All rights reserved.
6 For info, please visit http://www.isc.org/sw/dhcp/
7 /etc/dhcp3/dhcpd.conf line 0: expecting a parameter or declaration
8 #}
9 ^
10 Configuration file errors encountered -- exiting
Line #7 refers to "etc/dhcp3/dhcpd.conf line 0"; the zero seems meaningless.
My config file exists and is not empty:
% wc /etc/dhcp3/dhcpd.conf
108 533 3569 /etc/dhcp3/dhcpd.conf
The error parser might have some kind of fencepost error. I had been
trying to narrow down an error by commenting things out, and when it was
all comments, the "line 0" error appeared.
If an all comments file should return an error, any line number is
misleading; suggested replacement for line #7 above:
error in /etc/dhcp3/dhcpd.conf: all comments or white space, nothing to do.
Hope this helps...