pfSense WAN dhcp client exiting (error)
-
There are many opportunities:
Deactivate and activate the WAN interface on the Pfense
pull out the network plug
restart the modemEverything leads to a DHCP Loop, but in these cases the Pfense was not restarted.
Only when the Pfense itself is restarted does the error do not occur until there is a problem with the modem or ISP again.
-
Ok, interesting. This is not a DHCP issue though, that's just a symptom. The WAN interface is actually losing link and that triggers everything else to restart.
What is the WAN connected to? Can you set it to a fixed link speed? That could be a good test if it's a link negotiation issue. You would have to set it both ends though. Or putting a switch in between would prevent it.
Was this working in some earlier pfSense version?
-
@Nosense-0 said in pfSense WAN dhcp client exiting (error):
Since we have intermediary disorders from our ISP, we absolutely need the "Service_Watchdog", we cannot do without that.
I don't see the relation between the uplink connection and the usage of "Service_Watchdog".
This is what "Service_Watchdog" is doing :
It wakes up every minute.
Checks all the process that you've listed.
If it finds one that's not running, it starts it.Btw : "Service_Watchdog" is a Netgate pfSense open source tool. I use=d the code the describe what it does.
It isn't smart or something like that.It can not and will not help you in getting a better ISP connection.
I'm actually quiet convinced that it only worse your uplink connection quality and worse, the entire pfSense stability.
Processes like Suricata, unbound, etc etc don't just suddenly die. They do get restarted (example) when an interface event arrives : they are told to stopped, the orderly, controlled way - and when stopped, they get started.
At that moment : "Service_Watchdog" is also doing it's thing, and when it wakes up it does the same thing : example "Suricata" is just about to get restarted so "Service_Watchdog"found it stopped : it starts it. But is was already in the starting phase.
The scenario is set for a lot of hard to debug race conditions.And things are even better / worse (you pick) : you are using other heavy weight processes like bandwidth, vnstat, pfBlockerng, and you have two independent sources of process restarts.
Just think about the mess that this can ... no, will create.Of course, I hope to be wrong. As I said above, its easy to test.
-
I have now read extensively here in the forum and it is not an isolated case.
As with the others, all proposed solutions did not bring a solution.
It seems as if it were a problem in a script. Therefore, I will now stay with a fixed IP for the time being, since everything works as it used to be.
When I have time I'll take a look at the scripts.
Until then, thank you for the help.
-
It has to be a combination of things. The dhclient failing to pull a lease or just restarting cannot bounce the NIC link.
-
I have now installed a router for testing between the ISP modem and the Pfsense and the router confirms that the Pfsense has received the IP address via DHCP.
Therefore, I am quite sure that something has to go wrong in the script from the Pfense.
Just have to find out and need a little luck...
-
Yup since setting it fixed avoids the issue it must be dhclient triggering something. But dhclient alone cannot cause the link to flap so something else much be in play.
If you're able to I would test a default config and see if that still hit's it.
-
@stephenw10 said in pfSense WAN dhcp client exiting (error):
If you're able to I would test a default config and see if that still hit's it.
It would be roughly as if the hotline recommend to reinstall Windows, logically then the error will disappear.
With Linux, I may have a little chance to find the mistake, so a new installation would only be considered as the very last one for me.
Thanks anyway
-
Not really found, but error is gone.
Probable cause Keyword: GATEWAY
I had set up two additional gateways to monitor two of my websites BUT the "Disable Gateway Monitoring Action" was activated.
In the script "/etc/rc.linkup" there was the following line for dynamic IP:
else {
log_error("Hotplug event detected for {$friendly}({$iface}) dynamic IP address {$staticv4}, ({$addrs})");
switch ($action) {
case "stop":
log_error("DEVD Ethernet detached event for {$staticv4}, {$iface}");So there had to be an error in the Pfsense LOG and I kept having this entry.
A little further down in the script it says:
if (empty($gw4ip)) {
$gw4ip = get_interface_gateway_last($iface, 'inet');Why “_last”?
That seemed strange to me and so I deleted all gateway entries and a separate view under STATUS/MONITOR that used a gateway.Switched everything to DHCP again and the error was gone.
Strange thing with the "_last"...
-
By the way, of course, the default gateway was set fixed (no automatic) to DHCP Gateway.
-
Can you test that with DHCP WAN?
The purpose of testing with a default config (not reinstalled) is to determine if the issue is with the config or something with the local setup. That would have removed those additional gateways likely showing it is a config issue.
That is interesting though, I would not expect that to make any difference there. It tries to use the 'last gateway' value there for a dynamic gateway if a new one cannot be pulled.
-
I tested this with WAN DHCP.
However, I now have a new problem.
I haven't changed the gateway configuration for years.
When I pull the network plug now, the gateway suddenly disappears in the dashboard and also under system/routing/gateways
Is that normal?
Where can you get a default config?
-
If it's dynamic and you have never set anything custom on it (which seems unlikely here!) then it might. Resaving the gateway to create a config entry for it should allow to show as present but down.
-
What a mess!
At a Thin Client, Pfense threw me out when I configured via WAN (RJ45) and a WLAN defined as a LAN before I could activate the WLAN (changed the WAN rule); However, did not work because the Pfense had not tolerated the WLAN stick :-(
An old PC reactivated, but had to buy network cards and wanted to give it an SSD, but no clon program worked :-(
Well on the PC now Pfense from newly installed and only the backup (XML file) recorded from the production machine and the error reappears and it loops without end :-)
Okay the test machine is of course not identical to production, so I had to delete a lot on the log, but the error remains identical.
There seems to be an automatic that automatically creates the gateway wan_dhcp and a script which classifies this gateway as invalid and deletes and then the automatism creates it again and so the whole thing turns in a loop.
Is just wondering what that is?
-
Protocol was already marked as spam :-(
-
So what error do you see exactly in this new setup?
-
Exactly what I had already sent:
Apr 6 21:53:17 TEST php-fpm[74527]: /rc.filter_configure_sync: The gateway: WAN_DHCP is invalid or unknown, not using it.
Apr 6 21:53:17 TEST php-fpm[74527]: /rc.filter_configure_sync: The gateway: WAN_DHCP is invalid or unknown, not using it.
Apr 6 21:53:17 TEST php-fpm[74527]: /rc.filter_configure_sync: The gateway: WAN_DHCP is invalid or unknown, not using it.
Apr 6 21:53:15 TEST check_reload_status[294]: Restarting IPsec tunnels
Apr 6 21:53:09 TEST php-fpm[65707]: /rc.linkup: HOTPLUG: Configuring interface wan
Apr 6 21:53:09 TEST php-fpm[65707]: /rc.linkup: DEVD Ethernet attached event for wan
Apr 6 21:53:09 TEST php-fpm[65707]: /rc.linkup: Hotplug event detected for WAN(wan) dynamic IP address (4: dhcp) -
Hmm, the log ordering there is odd since the WAN_DHCP gateway should be valid at that point having just connected the WAN.
Unless maybe you have another gateway named WAN_DHCP that's conflicting?
-
No, there is no other gateway, only the WAN_DHCP, which is automatically created by the firewall.
Hmm, has to search the backup file (.xml) of production, maybe something will happen.
But that will take a while. -
So if you save the gateway when it's present does that create the config entry? And does that prevent the invalid gateway logs?