• I've been getting this error (posted bellow) for weeks and I cant figure out whats going on. This is causing connection errors on my network. I use DHCP relay on pfsense pointing at my DHCP and there is only a windows server 2012 R2 as a DHCP server on my network. The server 2012 is working great and the dhcp is doing its job.

    If a use a static IP it works.

    What I tried:

    • I have tried to manually create the file but the system just deletes it again.
    • I have tried to reboot the system, i've updated the system twice since the error started showing.

    I haven't treid to do a factory reset because its a lot of work with formatting and flashing the box and use a Serial console cable for connection.
    So if there is another way. I'd be glad to try that first and maby learn something from it.

    The ERROR:
    [10-Jan-2017 19:47:48 Europe/Oslo] PHP Warning:  file(/var/dhcpd/var/db/dhcpd.leases): failed to open stream: No such file or directory in /usr/local/bin/dhcpd_gather_stats.php on line 66
    [10-Jan-2017 19:47:48 Europe/Oslo] PHP Stack trace:
    [10-Jan-2017 19:47:48 Europe/Oslo] PHP  1. {main}() /usr/local/bin/dhcpd_gather_stats.php:0
    [10-Jan-2017 19:47:48 Europe/Oslo] PHP  2. file() /usr/local/bin/dhcpd_gather_stats.php:66

  • Banned

    Nice screenshot. Now

    • PHP warnings certainly do not cause "connection errors on my network"? (Plus, exactly what kind of errors is that?)
    • What are you doing where you are seeing this warning?

  • Hi and thanks for quick reply!

    Im sorry for the description. What I really mean is that I suspect the DHCP relay does not forward or recieve the IP request to the DHCP server. I suspect its stopping the forward because the "lease" file is missing. For the record, I can see the dhcp6.lease file.

    So by connection error I mean its not giving out IP address and that results in a sort of "connection error" aka this famous yellow triangle at my wifi icon.

    The error is shown in a yellow tab that shows up in my pfsense control panel with a link to a crash log. And all it gives me is the error I just posted in the first post.

  • Banned

    Still no idea what are you doing where to get the crash log. Anyway, there's not supposed to be any dhcpd.leases file anywhere if you run a DHCP relay (You cannot run DHCP server and DHCP relay on the same box.)

    How many interfaces you have?
    Did you enable the relay on proper interfaces and pointed it to the right DHCP server IP?
    Anything in firewall logs?
    Tried packet capture?

  • I know and the DHCP server on pfsense is not active due to the relay. Its not even possible to have a misconfig there because it automaticly shits down the DHCP server when the relay is on. here is a couple more shots. Hope it helps. thanks again…

    My server 2012 (DHCP) is on a static IP; on LAN interface
    Cant see anything in the firewall log about this.

    I did not try package capture. (not to good with anything else than sniffing password with wireshark. lol)

    My Dashboard

    Log View:

    DHCP Relay:

  • Banned

    There's no need to select LAN interface there.

    Other than that, there's really not much to play with beyond the additional checkbox. Plus this definitely works on 2.3.3. Did you turn off the Windows firewall on the server? You have proper DHCP scope inside  configured and enabled there?

  • I double checked the scope on my server2012 and it looks fine. I have to say its kinda strange because this worked for a couple weeks without any issues.

    I have to check one of the interfaces on DHCP relay because its required. KALILAN is just a seperate LAN for two machines running kali linux. So LAN is my main network. Should I mark LAN on the realy?


    Do I even need relay? Now I know this is a stupid and noob question but I'll ask it anyway.

  • Banned

    There is NOTHING to relay on LAN when your DHCP server is on LAN. pfSense is not involved at all.