hassio-addons / addon-pi-hole

Pi-hole - Home Assistant Community Add-ons
https://addons.community
MIT License
123 stars 39 forks source link

"Currently active DHCP leases" list is empty #113

Closed RedFoxy closed 4 years ago

RedFoxy commented 4 years ago

Hello! Just I move from a local installation of Pi-Hole to my home assistant under docker, it goes ok but I notice something about DHCP engine. I use Pi-Hole as DNS and DHCP server, I've a lot o static ip address assigned by the DHCP server, after I install pi-hole in my home assistant, I noticed that the "Currently active DHCP leases" list was EMPTY and it was never updated, but the dhcp goes on, so I tryed to add a static dhcp, but when I try I got follow error:

PHP error (2): fopen(/etc/dnsmasq.d/04-pihole-static-dhcp.conf): failed to open stream: No such file or directory in /var/www/html/admin/scripts/pi-hole/php/savesettings.php:66

Than I tryed to add another static lease but it goes without error, but I still have the "Currently active DHCP leases" list empty

addons-assistant[bot] commented 4 years ago

:wave: Thanks for opening your first issue here! If you're reporting a :bug: bug, please make sure you include steps to reproduce it. Also, logs, error messages and information about your hardware might be usefull.

sinclairpaul commented 4 years ago

Can you please post the addon logs, in particular the startup showing the version.

RedFoxy commented 4 years ago

Now I've only a lot of log of normal use without errors, so just I restart it to get the startup log:

` [i] Target: zeustracker.abuse.ch (blocklist.php?download=domainblocklist) [i] Status: Pending...

[✓] Status: Retrieval successful

[i] Target: s3.amazonaws.com (simple_tracking.txt) [i] Status: Pending...

[✓] Status: No changes detected

[i] Target: s3.amazonaws.com (simple_ad.txt) [i] Status: Pending...

[✓] Status: No changes detected

[i] Target: hosts-file.net (ad_servers.txt) [i] Status: Pending...

[✓] Status: No changes detected

[i] Consolidating blocklists...

[✓] Consolidating blocklists [i] Extracting domains from blocklists...

[✓] Extracting domains from blocklists [i] Number of domains being pulled in by gravity: 139059 [i] Removing duplicate domains...

[✓] Removing duplicate domains [i] Number of unique domains trapped in the Event Horizon: 116839 [i] Nothing to whitelist! [i] Parsing domains into hosts format...

[✓] Parsing domains into hosts format [i] Cleaning up stray matter...

[✓] Cleaning up stray matter

[✓] DNS service is running [✓] Pi-hole blocking is Enabled [cont-init.d] pihole.sh: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done. [11:19:16] INFO: Starting PHP-FPM... [11:19:16] INFO: Starting Pi-Hole FTL... [2019-12-10 11:19:16.445 882] Using log file /var/log/pihole-FTL.log [2019-12-10 11:19:16.446 882] ########## FTL started! ########## [2019-12-10 11:19:16.446 882] FTL branch: master [2019-12-10 11:19:16.446 882] FTL version: v4.3.1 [2019-12-10 11:19:16.446 882] FTL commit: b60d63f-dirty [2019-12-10 11:19:16.446 882] FTL date: 2019-05-25 21:37:26 +0200 [2019-12-10 11:19:16.446 882] FTL user: pihole [2019-12-10 11:19:16.446 882] Starting config file parsing (/etc/pihole/pihole-FTL.conf) [2019-12-10 11:19:16.446 882] SOCKET_LISTENING: only local [2019-12-10 11:19:16.446 882] AAAA_QUERY_ANALYSIS: Show AAAA queries [2019-12-10 11:19:16.446 882] MAXDBDAYS: max age for stored queries is 365 days [2019-12-10 11:19:16.446 882] RESOLVE_IPV6: Resolve IPv6 addresses [2019-12-10 11:19:16.446 882] RESOLVE_IPV4: Resolve IPv4 addresses [2019-12-10 11:19:16.446 882] DBINTERVAL: saving to DB file every minute [2019-12-10 11:19:16.446 882] DBFILE: Using /etc/pihole/pihole-FTL.db [2019-12-10 11:19:16.446 882] MAXLOGAGE: Importing up to 24.0 hours of log data [2019-12-10 11:19:16.446 882] PRIVACYLEVEL: Set to 0 [2019-12-10 11:19:16.451 882] IGNORE_LOCALHOST: Show queries from localhost [2019-12-10 11:19:16.451 882] BLOCKINGMODE: Null IPs for blocked domains [2019-12-10 11:19:16.451 882] ANALYZE_ONLY_A_AND_AAAA: Disabled. Analyzing all queries [2019-12-10 11:19:16.451 882] DBIMPORT: Importing history from database [2019-12-10 11:19:16.451 882] PIDFILE: Using /var/run/pihole-FTL.pid [2019-12-10 11:19:16.451 882] PORTFILE: Using /var/run/pihole-FTL.port [2019-12-10 11:19:16.452 882] SOCKETFILE: Using /var/run/pihole/FTL.sock [2019-12-10 11:19:16.452 882] WHITELISTFILE: Using /etc/pihole/whitelist.txt [2019-12-10 11:19:16.452 882] BLACKLISTFILE: Using /etc/pihole/black.list [2019-12-10 11:19:16.452 882] GRAVITYFILE: Using /etc/pihole/gravity.list [2019-12-10 11:19:16.452 882] REGEXLISTFILE: Using /etc/pihole/regex.list [2019-12-10 11:19:16.452 882] SETUPVARSFILE: Using /etc/pihole/setupVars.conf [2019-12-10 11:19:16.452 882] AUDITLISTFILE: Using /etc/pihole/auditlog.list [2019-12-10 11:19:16.455 882] MACVENDORDB: Using /etc/pihole/macvendor.db [2019-12-10 11:19:16.455 882] PARSE_ARP_CACHE: Active [2019-12-10 11:19:16.455 882] Finished config file parsing [2019-12-10 11:19:16.463 882] Database version is 3 [2019-12-10 11:19:16.467 882] Database successfully initialized [2019-12-10 11:19:16.468 882] New forward server: 8.8.4.4 (0/512) [2019-12-10 11:19:16.468 882] New forward server: 8.8.8.8 (1/512) [2019-12-10 11:19:16.476 882] Resizing "/FTL-strings" from 4096 to 8192 [2019-12-10 11:19:16.500 882] Resizing "/FTL-queries" from 229376 to 458752 [2019-12-10 11:19:16.512 882] Resizing "/FTL-strings" from 8192 to 12288 [2019-12-10 11:19:16.524 882] Resizing "/FTL-strings" from 12288 to 16384 [2019-12-10 11:19:16.575 882] Resizing "/FTL-queries" from 458752 to 688128 [2019-12-10 11:19:16.618 882] Resizing "/FTL-strings" from 16384 to 20480 [2019-12-10 11:19:16.641 882] Resizing "/FTL-queries" from 688128 to 917504 [2019-12-10 11:19:16.668 882] Resizing "/FTL-strings" from 20480 to 24576 [2019-12-10 11:19:16.676 882] Resizing "/FTL-queries" from 917504 to 1146880 [2019-12-10 11:19:16.692 882] Imported 17960 queries from the long-term database [2019-12-10 11:19:16.693 882] -> Total DNS queries: 17960 [2019-12-10 11:19:16.693 882] -> Cached DNS queries: 5016 [2019-12-10 11:19:16.693 882] -> Forwarded DNS queries: 9782 [2019-12-10 11:19:16.693 882] -> Exactly blocked DNS queries: 3112 [2019-12-10 11:19:16.693 882] -> Unknown DNS queries: 50 [2019-12-10 11:19:16.693 882] -> Unique domains: 1013 [2019-12-10 11:19:16.693 882] -> Unique clients: 15 [2019-12-10 11:19:16.693 882] -> Known forward destinations: 2 [2019-12-10 11:19:16.693 882] Successfully accessed setupVars.conf [2019-12-10 11:19:16.938 882] WARNING: Unable to write PID to file. [2019-12-10 11:19:16.938 882] Continuing anyway... [2019-12-10 11:19:16.938 882] PID of FTL process: 882 [2019-12-10 11:19:16.938 882] Listening on port 4711 for incoming IPv4 telnet connections [11:19:16] INFO: Starting NGinx.... nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)`

GitHub
openresty/luajit2
OpenResty's Branch of LuaJIT 2. Contribute to openresty/luajit2 development by creating an account on GitHub.
sinclairpaul commented 4 years ago

Sorry, I cannot duplicate the issue, if I assign a static lease via the UI, they are retained on reboot.
The error shows, which appears to be something in Pi-Hole, when it tries to open a file that doesn't exist.

Would need to know the addon version/host info, and the error log when the error occurs.

addons-assistant[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

addons-assistant[bot] commented 4 years ago

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.