Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    DHCP wont start after a power outage

    Scheduled Pinned Locked Moved DHCP and DNS
    [help]
    17 Posts 4 Posters 1.9k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ofir29200O Offline
      ofir29200
      last edited by

      hi,
      I have a pfsense VM running on windows server 2012 r2 on hyper-v, and 4 ethernet adapters:
      WAN 1
      WAN 2
      LAN
      LAN 2
      it worked perfectly for months, until this morning when I had a power outage.
      pfsense didn't boot anymore, and it got stuck at starting DNS resolver.
      I reinstalled pfsense and recovered the config file, then pfsense booted regularly, but none of my devices received an IP address, and after setting my PC with a static IP, I got to the pfsense GUI.
      when I checked the DHCPD Service, I saw it was stopped, and when i pressed the start button, it would just spin for a few moments, then return to the start button.
      when I checked the logs, it showed this:

      Jun 25 23:04:20	dhcpd	52549	exiting.
      Jun 25 23:04:20	dhcpd	52549	process and the information we find helpful for debugging.
      Jun 25 23:04:20	dhcpd	52549	before submitting a bug. These pages explain the proper
      Jun 25 23:04:20	dhcpd	52549	If you think you have received this message due to a bug rather
      Jun 25 23:04:20	dhcpd	52549	can't parse standard name service updater!
      Jun 25 23:04:20	dhcpd	52549	^
      Jun 25 23:04:20	dhcpd	52549	option server.ddns-hostname
      Jun 25 23:04:20	dhcpd	52549	standard name service update routine line 2: no option space named server.
      Jun 25 23:04:20	dhcpd	52549	For info, please visit https://www.isc.org/software/dhcp/
      Jun 25 23:04:20	dhcpd	52549	All rights reserved.
      Jun 25 23:04:20	dhcpd	52549	Copyright 2004-2021 Internet Systems Consortium.
      

      Does anyone have a solution for my problem?

      bingo600B GertjanG 3 Replies Last reply Reply Quote 0
      • bingo600B Offline
        bingo600 @ofir29200
        last edited by

        @ofir29200
        Restore your backup of the config file , not the recovered one.

        If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

        pfSense+ 23.05.1 (ZFS)

        QOTOM-Q355G4 Quad Lan.
        CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
        LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

        ofir29200O 1 Reply Last reply Reply Quote 0
        • GertjanG Offline
          Gertjan @ofir29200
          last edited by

          @ofir29200 said in DHCP wont start after a power outage:

          I had a power outage

          And you loose you afternoon, or even more.
          Get an UPS, have pfSense shut down probably upon power outage - and your host system while your at it.

          Automate a daily config.xml backup. As soon as you have them, you won't need them. ( and the other way around ).

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          1 Reply Last reply Reply Quote 0
          • ofir29200O Offline
            ofir29200 @bingo600
            last edited by

            @bingo600 I just restored an old backup I have from a month ago (it's practically the same, but without my new ssl certificates)
            And I still got the same thing in the logs of the DHCP when I try to start it

            bingo600B 1 Reply Last reply Reply Quote 0
            • bingo600B Offline
              bingo600 @ofir29200
              last edited by bingo600

              @ofir29200
              I then have no idea, what to do then.
              What version of pfSense have you (re)installed.

              And maybe a little bit more of the log would be helpfull.

              Maybe ... (I don't use pfSense DHCP server at home , just relay .. So just an idea)
              You could also "Edit out" the DHCPD section , before restoring the config:

              Open your config file , and delete everything in between the below tags

              	<dhcpd>
              
              	</dhcpd>
              	<dhcpdv6>
              
              	</dhcpdv6>
              

              Then restore ....

              Now you should be able to redo all dhcp from "scratch"

              If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

              pfSense+ 23.05.1 (ZFS)

              QOTOM-Q355G4 Quad Lan.
              CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
              LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

              ofir29200O 1 Reply Last reply Reply Quote 0
              • ofir29200O Offline
                ofir29200 @bingo600
                last edited by

                @bingo600 I have pfsense 2.6.0 on FreeBSD 12.3

                I tried your suggestion to clean the DHCP from the config, but after I reconfigured the DHCP for my 2 interfaces, it did not work, and it still showed me the same thing in the logs.

                1 Reply Last reply Reply Quote 0
                • GertjanG Offline
                  Gertjan @ofir29200
                  last edited by

                  This :

                  @ofir29200 said in DHCP wont start after a power outage:

                  Jun 25 23:04:20 dhcpd 52549 can't parse standard name service updater!

                  comes from this https://github.com/isc-projects/dhcp/blob/31e68e5e3b863a4859562e0bb808888d74af7497/server/dhcpd.c

                  Are you using nsupdate == you've instructed dhcpd to update a DNS zone when a lease is handed out ?

                  Image :

                  c38eda11-b313-4168-bf6c-42670cc20a31-image.png

                  disable that part for a while.

                  Also check /var/dhcpd/etc/dhcpd.conf for the offending line.

                  Btw : The title : "DHCP wont start after a power outage " : you mean the DHCP server dhcpd, not the DHCP-client (on the WAN interface), right ?

                  No "help me" PM's please. Use the forum, the community will thank you.
                  Edit : and where are the logs ??

                  ofir29200O 1 Reply Last reply Reply Quote 1
                  • ofir29200O Offline
                    ofir29200 @Gertjan
                    last edited by

                    @gertjan yea, I mean the DHCP Server.

                    As for my problem, I managed to solve it.
                    After thinking about it, I factory reset pfsense, and set I up again without restoring, but for my surprise it won't start after a factory reset.
                    And now, after changing to a brand new VHD file, and reinstalling pfsense again, and restoring the original config I tried to restore before this post, and now everything works.
                    As for @Gertjan advice, I have ordered an UPS for my server. Does anyone have a solution for making windows shut down the VM before shutting down windows?

                    bmeeksB GertjanG 2 Replies Last reply Reply Quote 0
                    • bmeeksB Offline
                      bmeeks @ofir29200
                      last edited by bmeeks

                      @ofir29200 said in DHCP wont start after a power outage:

                      Does anyone have a solution for making windows shut down the VM before shutting down windows?

                      A quick Google search turned up a number of links with examples. Here is one of them: http://woshub.com/hyper-v-vm-automatic-startup-boot-order/.

                      Note this only works if you are doing a normal shutdown of your Windows Hyper-V host. If the host loses power, then there is no automatic shutdown of the VMs. That's why it was suggested to get a UPS and configure it to signal Windows when on battery and the battery is about to expire (usually via a USB connection between the Windows host and the UPS). The UPS monitoring daemon in Windows will then signal the Hyper-V host to begin a normal controlled shutdown. That will in turn trigger the settings above to shutdown all the VMs before shutting down the Hyper-V host.

                      ofir29200O 1 Reply Last reply Reply Quote 0
                      • ofir29200O Offline
                        ofir29200 @bmeeks
                        last edited by

                        @bmeeks thank you!

                        1 Reply Last reply Reply Quote 0
                        • GertjanG Offline
                          Gertjan @ofir29200
                          last edited by Gertjan

                          @ofir29200 said in DHCP wont start after a power outage:

                          Does anyone have a solution for making windows shut down the VM before shutting down windows?

                          Yep, I'm using it.

                          See here : https://networkupstools.org/projects.html#_a_href_http_sourceforge_net_projects_winnutclient_windows_nut_client_a

                          I've used the older Windows NUT client, and now testing WinNUT-Client

                          Edit :

                          9eeb9bfa-b0aa-4449-9a12-55123d52b372-image.png

                          No "help me" PM's please. Use the forum, the community will thank you.
                          Edit : and where are the logs ??

                          1 Reply Last reply Reply Quote 0
                          • ofir29200O Offline
                            ofir29200
                            last edited by

                            well, it happened again!
                            but this time, the whole VM got stuck, so I had to reset it, and now I have to reinstall everything again...

                            Does anyone have a fix for this?

                            GertjanG 1 Reply Last reply Reply Quote 0
                            • GertjanG Offline
                              Gertjan @ofir29200
                              last edited by Gertjan

                              @ofir29200

                              Did you test ?

                              I've been running pfSense in a VM for a couple of years @home.
                              The host was a simple W10 Pro using the build in Hyper-V

                              The host was using the old WINNUT. I'm using the newer, shown above, since a couple of weeks.
                              Weather in France gave the the opportunity to test this set-up : it shuts down the system just fine.

                              And, I presume, as I never really tested it : This is how it should work :

                              @bmeeks said in DHCP wont start after a power outage:

                              The UPS monitoring daemon in Windows will then signal the Hyper-V host to begin a normal controlled shutdown. That will in turn trigger the settings above to shutdown all the VMs before shutting down the Hyper-V host.

                              When a (host) OS receives a shut down command, all running services and programs will receive a shut down down command.
                              This will include the Hyper-V process. So it should 'warn' it's VMs. The VL OS, pfense, in this case, will receive the event and proceed with a shut down.
                              Easy to test of this is the case : open a console, SSH or even the Hyper Console, and look at the command line. System shut down commands are broadcast on the command line.

                              You could also install the NUT package in pfSense, have it listening to a network 'UPS source', and have it shut down in 30 seconds.
                              Use also (see above) WINNUT on the host OS system, and have that one shut down in 60 seconds.
                              And as usual : test your set up.

                              A corrupted VM : I never manage to break a VM ...

                              @ofir29200 said in DHCP wont start after a power outage:

                              Does anyone have a fix for this?

                              A fix ?
                              Well, maybe, as soon as some one knows what is broken ;)

                              No "help me" PM's please. Use the forum, the community will thank you.
                              Edit : and where are the logs ??

                              ofir29200O 1 Reply Last reply Reply Quote 0
                              • ofir29200O Offline
                                ofir29200 @Gertjan
                                last edited by

                                @gertjan well, I don't have a UPS yet, I ordered one and I am still waiting for it to arrive

                                GertjanG 1 Reply Last reply Reply Quote 0
                                • GertjanG Offline
                                  Gertjan @ofir29200
                                  last edited by

                                  @ofir29200

                                  Well, if your power goes down often, or is just plain bafd, you can't really 'work' with anything that is a "computer".
                                  With computer I means : a device with a disk and a complex file system.
                                  When the file system goes bad, you can loose its content.

                                  No "help me" PM's please. Use the forum, the community will thank you.
                                  Edit : and where are the logs ??

                                  ofir29200O 1 Reply Last reply Reply Quote 0
                                  • ofir29200O Offline
                                    ofir29200 @Gertjan
                                    last edited by

                                    @gertjan I had a power outage at the beginning of 2020, and my windows 10 PC was running 1 year straight without a power outage (but then it became unresponsive, so I had to reboot it...)

                                    GertjanG 1 Reply Last reply Reply Quote 0
                                    • GertjanG Offline
                                      Gertjan @ofir29200
                                      last edited by

                                      @ofir29200 said in DHCP wont start after a power outage:

                                      10 PC was running 1 year straight without a power outage (but then it became unresponsive, so I had to reboot it...)

                                      That's pretty darn good for a consumer grade desktop OS.
                                      Still, as this is consumer desktop OS, after the reboot I would bet heavily on "issues" after such a period.
                                      You were also skipping major security updates .... that's something I wouldn't even dare to do.

                                      No "help me" PM's please. Use the forum, the community will thank you.
                                      Edit : and where are the logs ??

                                      1 Reply Last reply Reply Quote 0
                                      • First post
                                        Last post
                                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.