DHCP wont start after a power outage
-
@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 ).
-
@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 -
@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"
-
@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.
-
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 :
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 ?
-
@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? -
@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.
-
@bmeeks thank you!
-
@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 :
-
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?
-
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-VThe 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 ;) -
@gertjan well, I don't have a UPS yet, I ordered one and I am still waiting for it to arrive
-
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. -
@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...)
-
@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.