pxebootsrv fail to launch dhcp if NetManager already stopped

Questions related to network booting via PXE
steph123456
Posts: 17
Joined: 16 Oct 2010, 08:37

pxebootsrv fail to launch dhcp if NetManager already stopped

Postby steph123456 » 16 Oct 2010, 18:04

Hi,

It seems that if NetworkManager is already stopped, pxebootsrv fails to launch dhcp server.

I did:
# net-setup eth0
to set a static ip,...
# vi /etc/conf.d/pxebootsrv
to set my parameters
# /etc/init.d/pxebootsrv start

[email protected] /root % /etc/init.d/pxebootsrv start
* Starting the pxe-boot-server ...
* Stopping NetworkManager ... [ ok ]
* Starting dhcpd ...
* start-stop-daemon: failed to start `/usr/sbin/dhcpd' [ !! ]
* ERROR: dhcpd failed to start
* Cannot start /etc/init.d/dhcpd, check /var/log/messages
* ERROR: pxebootsrv failed to start
[email protected] /root %

And, if I check
# ifconfig
I only get lo interface.
eth0 is down.


/var/log/messages:

Oct 16 20:06:01 sysresccd dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Oct 16 20:06:01 sysresccd dhcpd: Wrote 0 class decls to leases file.
Oct 16 20:06:01 sysresccd dhcpd: Wrote 0 leases to leases file.
Oct 16 20:06:01 sysresccd dhcpd:
Oct 16 20:06:01 sysresccd dhcpd: Not configured to listen on any interfaces!
Oct 16 20:06:01 sysresccd dhcpd: exiting.
Oct 16 20:06:01 sysresccd /etc/init.d/dhcpd[2308]: start-stop-daemon: failed to start `/usr/sbin/dhcpd'
Oct 16 20:06:01 sysresccd /etc/init.d/dhcpd[2290]: ERROR: dhcpd failed to start
Oct 16 20:06:01 sysresccd /etc/init.d/pxebootsrv[2311]: Cannot start /etc/init.d/dhcpd, check /var/log/messages
Oct 16 20:06:01 sysresccd /etc/init.d/pxebootsrv[2058]: ERROR: pxebootsrv failed to start



Is it a bug?


Regards.
--
Stephane.

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: pxebootsrv fail to launch dhcp if NetManager already sto

Postby gernot » 16 Oct 2010, 18:29

Stopping Networkmanager shut down all networkinterfaces.
Use as first step /etc/init.d/Networkmanager stop or boot with "nonm".

gernot

garPikeX
Posts: 14
Joined: 19 May 2010, 10:22

Re: pxebootsrv fail to launch dhcp if NetManager already sto

Postby garPikeX » 22 Oct 2010, 13:46

I ran into exactly the same problem as steph123456. pxebootsrv explicitely stops the NetworkManager on line 155 (sysresccd 1.6.2), which shuts down the network-interfaces, hence inhibiting dhcpd and almost probably any subsequent network-daemon from starting.

Two questions arise therefrom:

1) Is it really necessary to stop NetworkManager in pxebootsrv? The comment states, it is to avoid conflicts, but what conflicts? I dropped that line and at least pxebooting still works as a charm (with NetworkManager still running)!

2) Is it a bug or a feature that NetworkManager shuts down all network-interfaces when stopped?

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: pxebootsrv fail to launch dhcp if NetManager already sto

Postby gernot » 22 Oct 2010, 15:58

garPikeX wrote:2) Is it a bug or a feature that NetworkManager shuts down all network-interfaces when stopped?

I think its a feature because the shutdown is documented in the syslog.

It looks like the best is to remove the Networkmanager shutdown because the shutdown brake the Interface in ervery case. I think a warnmessage would be the better way.

gernot


Return to “Network Boot via PXE”

Who is online

Users browsing this forum: No registered users and 4 guests