View previous topic :: View next topic |
Author |
Message |
nein Guru

Joined: 14 Nov 2003 Posts: 346 Location: Spain
|
Posted: Fri Jul 15, 2005 10:30 am Post subject: dhcpd not working at boot time [SOLVED] |
|
|
Hi,
I just noticed that the dhcpd server does not get up during boot time (I can see the !! symbols at the end of the corresponding boot line) but I can start it without any problems after the boot process finishes. I have checked the system logs and I see no error corresponding to dhcpd.
I have already installed the latest version of dhcpcd but it made no difference. Because I have not rebooted my computer during months I have no idea what update caused this problem.
Any ideas ?
Last edited by nein on Wed Jul 20, 2005 12:32 pm; edited 1 time in total |
|
Back to top |
|
 |
katsiki Apprentice


Joined: 14 Jun 2005 Posts: 233 Location: Pasadena, CA (USA)
|
Posted: Fri Jul 15, 2005 11:09 am Post subject: |
|
|
Did you configure /etc/conf.d/net for DHCP according to the 2005.0 Handbook? |
|
Back to top |
|
 |
nein Guru

Joined: 14 Nov 2003 Posts: 346 Location: Spain
|
Posted: Fri Jul 15, 2005 11:20 am Post subject: |
|
|
Thanks for your replay.
My system has been working for more than 1 year without problems and I have not changed anything in the net configuaration for a long time. I had a look at the info you pointed out but did not find anything that could be related to my problem. |
|
Back to top |
|
 |
katsiki Apprentice


Joined: 14 Jun 2005 Posts: 233 Location: Pasadena, CA (USA)
|
Posted: Fri Jul 15, 2005 11:34 am Post subject: |
|
|
I was taking a guess that if you had not updated for a long time, and just now emerged major changes, then maybe you need to run etc-update. Maybe your old configuration files are no longer valid. |
|
Back to top |
|
 |
nein Guru

Joined: 14 Nov 2003 Posts: 346 Location: Spain
|
Posted: Fri Jul 15, 2005 12:14 pm Post subject: |
|
|
I have read again my post I I think it is not clear at all.
My problem is that the dhcp *server* does not start at boot time but it starts after loggin in and starting it manually with /etc/init.d/dhcp start.
I have no problems with the client.
Thanks in advance |
|
Back to top |
|
 |
katsiki Apprentice


Joined: 14 Jun 2005 Posts: 233 Location: Pasadena, CA (USA)
|
Posted: Fri Jul 15, 2005 6:51 pm Post subject: |
|
|
I'm sorry! I had not read your post correctly. I wonder if there may be a minor scheduling problem with the kernel. I noticed that sysklogd sometimes needs to make use of a restart loop in its init.d script to attempt starting the klogd service a couple times at boot.
Maybe you can try diagnosing the problem by inserting a delay. I have never installed dhcpd, but maybe this entry of the default /etc/init.d/sysklogd runscript can help you to test.
Code: | start() {
start_daemon "syslogd" "${SYSLOGD}" || return 1
# klogd do not always start proper if started too early
sleep 1
start_daemon "klogd" "${KLOGD}" || {
if [[ -n $(pidof syslogd) ]] ; then
stop_daemon "syslogd"
fi
return 1
}
return 0
}
|
|
|
Back to top |
|
 |
katsiki Apprentice


Joined: 14 Jun 2005 Posts: 233 Location: Pasadena, CA (USA)
|
Posted: Sat Jul 16, 2005 1:55 am Post subject: |
|
|
I hope I didn't ruin your chances of getting another response, so... bump! |
|
Back to top |
|
 |
nein Guru

Joined: 14 Nov 2003 Posts: 346 Location: Spain
|
Posted: Mon Jul 18, 2005 9:53 am Post subject: |
|
|
Hi,
I think I found the problem. As soon as I remove the ${IFACE} parameter from the start-stop-daemon line in the start function in the init script it works fine. Because I make dhcp only listen to eth0, and eth0 is brought up after dhcp, the process does not complete successfully. Of course, after the boot process completes, eth0 is up and it works fine.
I have made some tests and the dhcp script fails if I bring net.eth0 down.
start() {
checkconfig || return 1
ebegin "Starting ${CHROOT:+chrooted }dhcpd"
start-stop-daemon --start --quiet --exec /usr/sbin/dhcpd \
-- -pf /var/run/dhcp/dhcpd.pid \
-user dhcp -group dhcp ${DHCPD_OPTS} \
${CHROOT:+-chroot ${CHROOT}} ${IFACE}
eend $?
} |
|
Back to top |
|
 |
katsiki Apprentice


Joined: 14 Jun 2005 Posts: 233 Location: Pasadena, CA (USA)
|
Posted: Mon Jul 18, 2005 10:53 am Post subject: |
|
|
Can I ask which kernel you're running, and which DHCP server package? |
|
Back to top |
|
 |
nein Guru

Joined: 14 Nov 2003 Posts: 346 Location: Spain
|
Posted: Mon Jul 18, 2005 11:02 am Post subject: |
|
|
2.6.10-gentoo-r6 and the latest stable dhcp server (all the rest of the packages are also the latest stable version)
* net-misc/dhcp
Latest version available: 3.0.1-r1
Latest version installed: 3.0.1-r1 |
|
Back to top |
|
 |
katsiki Apprentice


Joined: 14 Jun 2005 Posts: 233 Location: Pasadena, CA (USA)
|
Posted: Mon Jul 18, 2005 11:26 am Post subject: |
|
|
The changelog for dhcp-3.0.1-r1 lists fixing Bugzilla Bug 48207. I can't tell if this is relevant. Do you use more than one interface? Do you have a dhcrelay init file? |
|
Back to top |
|
 |
nein Guru

Joined: 14 Nov 2003 Posts: 346 Location: Spain
|
Posted: Mon Jul 18, 2005 12:30 pm Post subject: |
|
|
I am not using dhcrelay and I only use dhcp on one interface (eth0). I think the bug you pointed out is something different but I want to thank you for your interest.
I might be wrong, but, shouln't the dhcp daemon get started after all the net interfaces are up ? I does not (at least in my case) and that is what is causing the problem. |
|
Back to top |
|
 |
katsiki Apprentice


Joined: 14 Jun 2005 Posts: 233 Location: Pasadena, CA (USA)
|
Posted: Mon Jul 18, 2005 12:37 pm Post subject: |
|
|
Take a look at the section of the 2005.0 Handbook regarding init script dependencies and altering the order in which scripts are executed. Maybe something got tweaked in the upgrade. |
|
Back to top |
|
 |
nein Guru

Joined: 14 Nov 2003 Posts: 346 Location: Spain
|
Posted: Mon Jul 18, 2005 1:30 pm Post subject: |
|
|
Hi,
I more or less know how the init process works and in fact the dhcpd service depends on the "net" service. The net service is started before dhcp, but only bringing the loopback interface up. What i do not know is how to make dhcpd depend also on the rest of the net interface.
Edit: Maybe setting to RC_NET_STRICT_CHECKING to yes might help. I will try tomorrow and see what happens. Thanks, you suggestion did probably put me on the way to the solution |
|
Back to top |
|
 |
nein Guru

Joined: 14 Nov 2003 Posts: 346 Location: Spain
|
Posted: Wed Jul 20, 2005 12:31 pm Post subject: |
|
|
Hi again,
The RC_NET_STRICT_CHECKING did the trick. Now it works.
Thanks you very much for your help |
|
Back to top |
|
 |
katsiki Apprentice


Joined: 14 Jun 2005 Posts: 233 Location: Pasadena, CA (USA)
|
Posted: Thu Jul 21, 2005 8:21 pm Post subject: |
|
|
You're welcome! Thank you, too! I learned a lot through your efforts. I would not have figured this out without your help. |
|
Back to top |
|
 |
katsiki Apprentice


Joined: 14 Jun 2005 Posts: 233 Location: Pasadena, CA (USA)
|
Posted: Thu Jul 21, 2005 11:14 pm Post subject: |
|
|
BTW, can I ask which version of baselayout you are using? Have you seen this thread? |
|
Back to top |
|
 |
nein Guru

Joined: 14 Nov 2003 Posts: 346 Location: Spain
|
Posted: Fri Jul 22, 2005 7:48 am Post subject: |
|
|
I have been using the latest stable version of the baselayout. Now I am using 1.11.13 but when I noticed the problem I was using the previous stable version (do not remember the version number).
Edit: I just had a look at the thread you pointed out and it seems a much more severe problem thant the one I had. In fact, it might be that my problem was not related to a bug rather than a misconfiguration. It was just that I did not remember the existance of the variable to control the net service checking. Maybe it would be good to change the default value of this variable but on the other side this might cause problems to other people. |
|
Back to top |
|
 |
katsiki Apprentice


Joined: 14 Jun 2005 Posts: 233 Location: Pasadena, CA (USA)
|
Posted: Fri Jul 22, 2005 8:04 am Post subject: |
|
|
Looks like a developer chimed in since I had posted mention of that other thread. UberLord says "Sorry", see Bugzilla Bug 99663 concerning baselayout-1.12.0_pre1-r1. |
|
Back to top |
|
 |
Swisside n00b

Joined: 13 Feb 2005 Posts: 27
|
Posted: Mon Aug 29, 2005 5:15 pm Post subject: |
|
|
nein wrote: | Hi,
I more or less know how the init process works and in fact the dhcpd service depends on the "net" service. The net service is started before dhcp, but only bringing the loopback interface up. What i do not know is how to make dhcpd depend also on the rest of the net interface.
Edit: Maybe setting to RC_NET_STRICT_CHECKING to yes might help. I will try tomorrow and see what happens. Thanks, you suggestion did probably put me on the way to the solution |
Hi nein, I have the same problem and wanted to try your resolution. But I missed where you changed RC_NET_STRICT_CHECKING to yes. Where do I have to edit that? Thanks for the help. |
|
Back to top |
|
 |
gemini91 Guru

Joined: 27 Nov 2003 Posts: 317 Location: Naples, Fl
|
Posted: Tue Aug 30, 2005 12:09 am Post subject: |
|
|
/etc/conf.d/rc |
|
Back to top |
|
 |
Swisside n00b

Joined: 13 Feb 2005 Posts: 27
|
Posted: Tue Aug 30, 2005 6:27 am Post subject: |
|
|
Excellent, thank you gemini91! |
|
Back to top |
|
 |
|