Unable to get DHCP server to restart after restart - Ubuntu 12.04

  • [FONT=Tahoma]I am running Fog 1.2.0 on Ubuntu 12.04[/FONT]. I am running Fog locally, not over a network. When I shut the Fog server machine down and restarted it, I lost my DHCP service and the machine I am trying to image is not making a PXE connection and tells me there is no DHCP service running. After Googling and trying some potential solutions I found, I am still not having any luck getting the server to start.

    [FONT=Tahoma]Here’s what I have tried so far:[/FONT]

    [FONT=Tahoma]I went into /etc/dhcp/dhcpd.conf and changed the subnet mask to what I set it as when I originally installed Fog and its DHCP service.[/FONT]

    [FONT=Tahoma]I have tried typing “sudo service isc-dhcp-server start” and I get:

    stop: Unknown Instance:
    isc-dhcp-server start/running, process 6852[/FONT]

    [FONT=Tahoma]s[/FONT][FONT=Tahoma]o I tried “sudo netstat –ump” to check and see if DHCP was running and I got:[/FONT]
    [FONT=Tahoma]netstat: invalid option – ‘m’ and a usage menu.[/FONT]

    [FONT=Tahoma]I also tried “sudo /etc/init.d/dhcp-server start” , response was “command not found”[/FONT]

    [FONT=Tahoma]Also tried “systemctl start dhcpd.service ”, response was “command not found”[/FONT]
    [FONT=Tahoma] [/FONT]

    [FONT=Tahoma]Any help would be greatly appreciated![/FONT]

  • Well,

    I’d strongly recommend figuring out why. Eventually the machine will go down, whether you want it to or not. A storm could knock power out for hours, some jack— could hit a power pole with a garbage truck or something… and I’m willing to bet that none of us have more than some server-grade backup batteries that can hold out for hours…

    It’s better to fix it now on YOUR time, rather than fix it later on CHANCE’s time.

  • I tried the switch idea with a few different configurations, some using a crossover cable, some not. It didn’t change anything.

    However, running the [I]sudo service isc-dhcp-server restart[/I] command followed by the [I]sudo service tftpd-hpa restart[/I] [B]got me going again![/B] I ran both of those commands previously and they didn’t get me running, not sure how or why they worked this time. I am afraid to shut down and restart to test them out now that I have Fog up and running again. I’m just going to avoid powering the machine off for as long as I can!

    Thanks for all the help everyone!

  • What is the exact output when you try to restart DHCP?
    [CODE]sudo service isc-dhcp-server restart[/CODE]

    And, let us know the output of this (after running the above line):
    [CODE]sudo service isc-dhcp-server status[/CODE]

    And, I’d [B]still[/B] recommend using a mini switch and some regular straight-through patch cables to test this with…

  • I remember reading something about how DHCP needs to see that the port it should be operating on is indeed connected/active… Maybe I’m wrong… maybe that applies to dnsmasq I don’t remember.

    Do you have an old switch? or hub or mini switch to test with?

  • [quote=“Tom Elliott, post: 46461, member: 7271”]My guess is tftp isn’t running. Try [code]sudo service tftpd-hpa restart[/code][/quote]

    Hi Tom. Unfortunately, this didn’t solve my issue. I have attached the logs you have mentioned in your sig if you’d like to take a look at them.

    I am running [FONT=Tahoma]Fog 1.2.0 on Ubuntu 12.04. [/FONT]

    [url="/_imported_xf_attachments/1/1935_PageTown Fog logs.zip?:"]PageTown Fog logs.zip[/url]

  • My guess is tftp isn’t running. Try [code]sudo service tftpd-hpa restart[/code]

  • Using a crossover cable didn’t make any difference. I’m still getting the “No DHCP or ProxyDHCP offers were received” on the PXE boot screen.

    Any other ideas?

  • I disabled the firewall per Joseph Hale’s suggestion. I’ll go ahead and try a crossover cable.

  • [quote=“PageTown, post: 46457, member: 29454”]I didn’t need one before. Everything worked fine until I powered the server off. What’s changed?[/quote]

    The [U]only[/U] way that setup would have worked before is if you were using a crossover cable.

    So, assuming this is a cross over cable, and after the reboot, then some service must not have started up, or some other service that you don’t want DID start up… like firewall.

  • I didn’t need one before. Everything worked fine until I powered the server off. What’s changed?

  • Then you need a cross over cable, sir. [url]http://en.wikipedia.org/wiki/Ethernet_crossover_cable[/url]

  • I am running Fog on an Asus K50I laptop. One end of my cable is plugged into its ethernet port. The other, the target computer.

  • [quote=“PageTown, post: 46443, member: 29454”]I am using a standard Cat5e cable. I used the same cable to upload and deploy images before the restart so I don’t think it’s the issue.

    What is the standard Cat5e cable connected to? one end goes to the target-machine… the other end goes to what? What device?

  • I am using a standard Cat5e cable. I used the same cable to upload and deploy images before the restart so I don’t think it’s the issue.

    Here’s what’s in my etc/dhcp/dhcpd.conf file:

    DHCP Server Configuration file.

    see /usr/share/doc/dhcp*/dhcpd.conf.sample

    This file was created by FOG

    use-host-decl-names on;
    ddns-update-style interim;
    ignore client-updates;

    subnet netmask {
    option subnet-mask;
    range dynamic-bootp;
    default-lease-time 21600;
    max-lease-time 43200;
    option domain-name-servers;
    option routers;
    filename “undionly.kpxe”;

  • Are you using a crossover cable? if not, what device are you using to connect the fog server and the client?

  • Well if you’re running on an isolated network and are handling DHCP, then you dictate what subnet to use.

    However, this subnet must match the subnet mask that is assigned to the interface that’s handling DHCP.

    Since this machine is on an isolated network, gateway and DNS are not required.
    I see the FOG server AND what appears to be a client asking who has

    Also, the FOG server is trying to send traffic to and If this is an isolated network, those requests shouldn’t exist, and FOG shouldn’t be trying to communicate with anything in that range.

    Also, I see lots of DHCP discover requests, but zero responses.

    I’d say DHCP is misconfigured. Look through your config again. There’s some examples on various sites for setup. I think there are some examples in the WiKi too.

  • Excellent. Here it is.


  • It kind of looks like my DHCP might be giving out the wrong Netmask.
    On my Ubuntu wired connection and when I set up Fog, I used the following info:
    Static IP:

  • you can compress the file as a .zip and upload…