MatthewVance / unbound-docker

Unbound DNS Server Docker Image
MIT License
569 stars 138 forks source link

unbound[1:0] warning: unbound is already running as pid 1. chown: cannot access '/opt/unbound/etc/unbound/unbound.log': No such file or directory #136

Closed CoomInPickle closed 1 year ago

CoomInPickle commented 1 year ago

hey, im trying to setup pihole + unbound on in a docker container. the .yaml im usin is this:

version: '3'
networks:
  pihole_dns_net:
    driver: bridge
    ipam:
      config:
        - subnet: 10.1.1.0/16
services:
  pihole:
    container_name: pihole
    hostname: pihole
    image: pihole/pihole:latest
    networks:
      pihole_dns_net:
        ipv4_address: 10.1.1.2
    ports:
      - "53:53/tcp"
      - "8022:80/tcp"
      - "4430:443/tcp"
    environment:
      - 'TZ=Europe/Zurich'
      - 'WEBPASSWORD=0815'
      - 'DNS1=10.1.1.3#53'
      - 'DNS2=no'
    volumes:
      - '/home/docker/pihole-unbound/etc-pihole/:/etc/pihole/'
      - '/home/docker/pihole-unbound/etc-dnsmasq.d/:/etc/dnsmasq.d/'
    cap_add:
      - NET_ADMIN
    restart: unless-stopped
  unbound:
    container_name: unbound
    image: mvance/unbound:latest
    networks:
      pihole_dns_net:
        ipv4_address: 10.1.1.3
    volumes:
      - '/home/docker/pihole-unbound/unbound/:/opt/unbound/etc/unbound'
    ports:
      - "5053:53/tcp"
      - "5053:53/udp"
    healthcheck:
      disable: true
    restart: unless-stopped

ive ran into some issue before wich was this:

/opt/unbound/etc/unbound/unbound.conf:306: error: cannot open include file '/opt/unbound/etc/unbound/a-records.conf': No such file or directory
/opt/unbound/etc/unbound/unbound.conf:307: error: cannot open include file '/opt/unbound/etc/unbound/srv-records.conf': No such file or directory
/opt/unbound/etc/unbound/unbound.conf:313: error: cannot open include file '/opt/unbound/etc/unbound/forward-records.conf': No such file or directory

i fixed in with pasting these 3 files manually into '/home/docker/pihole-unbound/unbound'

now im getting the issue

unbound[1:0] warning: unbound is already running as pid 1. chown: cannot access '/opt/unbound/etc/unbound/unbound.log': No such file or directory

ive looked at the other issues, but i didnt get any of these to work. the only thing ive manually did was the 3 files i mentioned before. im also using the deafault config wich got generated.

this is my unbound filetree wich the .yaml is pointing to: image

can anyone maybe help, im kinda clueless

MatthewVance commented 1 year ago

See if this example of a working Pi-hole compose file helps. Unbound container restarts every x minutes · Issue #120

CoomInPickle commented 1 year ago

oke, i tried it with this:

version: "3"

# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
  caddy:
    container_name: caddy
    image: caddy:2-alpine
    privileged: true
    restart: unless-stopped
    environment:
      - reverse_proxy_from=80
      - reverse_proxy_to=pihole:8080
    networks:
     - dns
    ports:
      - "8023:80/tcp"
      - "8024:80/udp"
      - "443:443/tcp"
      - "443:443/udp"
    volumes:
      - /home/docker/pihole-unbound/my_conf/caddy/Caddyfile:/etc/caddy/Caddyfile
      - caddy_config:/config
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    privileged: true
    depends_on:
      - "unbound"
    environment:
      DHCP_ACTIVE: false
      DHCP_IPv6: false
      DNSSEC: true
      DNSMASQ_LISTENING: all
      PIHOLE_DNS_: 'unbound'
      TEMPERATUREUNIT: 'f'
      TZ: 'Europe/Zurich'
      WEBPASSWORD: '0815'
    networks:
     - dns
    # For DHCP it is recommended to remove these port 67 and instead add: network_mode: "host"
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      # - "67:67/udp" # Only required if you are using Pi-hole as your DHCP server
      - "8022:80/tcp"
    # Volumes store your data between container upgrades
    volumes:
      - '/home/docker/pihole-unbound/etc-pihole:/etc/pihole'
      - '/home/docker/pihole-unbound/etc-dnsmasq.d:/etc/dnsmasq.d'
      - type: bind
        read_only: true
        source: /home/docker/pihole-unbound/my_conf/dnsmasq/99-edns.conf
        target: /etc/dnsmasq.d/99-edns.conf
    #   https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
    # cap_add:
    #  - NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed
    restart: unless-stopped
  unbound:
    container_name: unbound
    image: mvance/unbound:latest
    privileged: true
    expose:
      - "5353"
    networks:
     - dns
    network_mode: bridge
    ports:
      - target: 53
        published: 5353
        protocol: tcp
        mode: host
      - target: 53
        published: 5353
        protocol: udp
        mode: host
    volumes:
      - type: bind
        read_only: true
        source: /home/docker/pihole-unbound/my_conf/unbound/unbound.conf
        target: /opt/unbound/etc/unbound/unbound.conf
      - type: bind
        read_only: true
        source: /home/docker/pihole-unbound/my_conf/unbound/a-records.conf
        target: /opt/unbound/etc/unbound/a-records.conf
    restart: unless-stopped

networks:
  dns:

volumes:
  caddy_config:

but it doesnt seem to work, i get -2 domains on then adlist and the unbound thing doesnt show up in pihole.

here are the errors i get:

pihole:

  s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service cron: starting
s6-rc: info: service cron successfully started
s6-rc: info: service _uid-gid-changer: starting
s6-rc: info: service _uid-gid-changer successfully started
s6-rc: info: service _startup: starting
  [i] Starting docker specific checks & setup for docker pihole/pihole
  [i] Setting capabilities on pihole-FTL where possible
  [i] Applying the following caps to pihole-FTL:
        * CAP_CHOWN
        * CAP_NET_BIND_SERVICE
        * CAP_NET_RAW
        * CAP_NET_ADMIN
        * CAP_SYS_NICE
  [i] Ensuring basic configuration by re-running select functions from basic-install.sh

  [i] Installing configs from /etc/.pihole...
  [i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
  [i] Installing /etc/dnsmasq.d/01-pihole.conf...
  [✓] Installed /etc/dnsmasq.d/01-pihole.conf
  [i] Installing /etc/.pihole/advanced/06-rfc6761.conf...
  [✓] Installed /etc/dnsmasq.d/06-rfc6761.conf

  [i] Installing latest logrotate script...
    [i] Existing logrotate file found. No changes made.
  [i] Assigning password defined by Environment Variable
  [✓] New password set
  [✓] Set temperature unit to F
  [i] Added ENV to php:
                    "TZ" => "Europe/Zurich",
                    "PIHOLE_DOCKER_TAG" => "",
                    "PHP_ERROR_LOG" => "/var/log/lighttpd/error-pihole.log",
                    "CORS_HOSTS" => "",
                    "VIRTUAL_HOST" => "41ecbf534025",
  [i] Using IPv4 and IPv6

  [i] Installing latest Cron script...
  [✓] Installing latest Cron script
  [i] Preexisting ad list /etc/pihole/adlists.list detected (exiting setup_blocklists early)
  [i] Setting DNS servers based on PIHOLE_DNS_ variable
Resolved unbound from PIHOLE_DNS_ as: 192.168.128.3
  [i] Applying pihole-FTL.conf setting LOCAL_IPV4=0.0.0.0
  [i] FTL binding to default interface: eth0
  [i] Enabling Query Logging
  [i] Testing lighttpd config: Syntax OK
  [i] All config checks passed, cleared for startup ...
  [i] Docker start setup complete

  [i] pihole-FTL (no-daemon) will be started as pihole

s6-rc: info: service _startup successfully started
s6-rc: info: service pihole-FTL: starting
s6-rc: info: service pihole-FTL successfully started
s6-rc: info: service lighttpd: starting
s6-rc: info: service lighttpd successfully started
s6-rc: info: service _postFTL: starting
s6-rc: info: service _postFTL successfully started
s6-rc: info: service legacy-services: starting
  Checking if custom gravity.db is set in /etc/pihole/pihole-FTL.conf
s6-rc: info: service legacy-services successfully started
Error: in prepare, no such table: info
  [i] Neutrino emissions detected...

  [✓] Pulling blocklist source list into range
  [i] No source list found, or it is empty

  [i] Preparing new gravity database...
  [✓] Preparing new gravity database
  [i] Creating new gravity databases...
  [✗] Unable to copy data from /etc/pihole/gravity.db to /etc/pihole/gravity.db_temp
  Parse error near line 11: no such table: OLD.group
Parse error near line 12: no such table: OLD.domain_audit
Parse error near line 14: no such table: OLD.domainlist
Parse error near line 15: no such table: OLD.domainlist_by_group
Parse error near line 16: no such table: OLD.domainlist_by_group
Parse error near line 18: no such table: OLD.adlist
Parse error near line 19: no such table: OLD.adlist_by_group
Parse error near line 20: no such table: OLD.adlist_by_group
Parse error near line 22: no such table: OLD.client
Parse error near line 23: no such table: OLD.client_by_group
Parse error near line 24: no such table: OLD.client_by_group
   [✗] Unable to create gravity database. Please try again later. If the problem persists, please contact support.

unbound: log is empty but container is running

caddy:

INF | ts=1689437771.9037015 msg=using provided configuration config_file=/etc/caddy/Caddyfile config_adapter=caddyfile 
WRN | ts=1689437771.9047482 msg=Caddyfile input is not formatted; run the 'caddy fmt' command to fix inconsistencies adapter=caddyfile file=/etc/caddy/Caddyfile line=21 
INF | ts=1689437771.9053302 logger=admin msg=admin endpoint started address=localhost:2019 enforce_origin=false origins=["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"] 
WRN | ts=1689437771.9056356 logger=http msg=server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server server_name=srv0 http_port=80 
INF | ts=1689437771.9057398 logger=tls.cache.maintenance msg=started background certificate maintenance cache=0xc00061b3b0 
INF | ts=1689437771.9058776 logger=http.log msg=server running name=srv0 protocols=["h1","h2","h3"] 
INF | ts=1689437771.905913 logger=tls msg=cleaning storage unit description=FileStorage:/data/caddy 
INF | ts=1689437771.9059503 logger=tls msg=finished cleaning storage units 
INF | ts=1689437771.9060047 msg=autosaved config (load with --resume flag) file=/config/caddy/autosave.json 
INF | ts=1689437771.9060109 msg=serving initial configuration 

note: im able to access the pihole admin panel

MatthewVance commented 1 year ago

log is empty but container is running

By default with this image, Unbound is set to not log. See https://github.com/MatthewVance/unbound-docker#logging.

the unbound thing doesnt show up in pihole

Unbound should show up as an upstream DNS server in Pi-hole under Settings > DNS. I'm not sure what else you're expecting to see.

image

i get -2 domains on then adlist

That's odd. I get close to 200,000.

image

Try stopping all related containers, deleting all the images, folder with configs, etc. and start fresh with the above config. This should help rule out any odd leftovers.

CoomInPickle commented 1 year ago

aight, i got it working (kinda), so the home menue now looks like this, but there is nothing on the locale machine beeing blocked and when i try to enter for example the networks tab i get an unknow error and nothing shows up image

also, this is the debug log i get:

This process collects information from your Pi-hole, and optionally uploads it to a unique and random directory on tricorder.pi-hole.net.

The intent of this script is to allow users to self-diagnose their installations.  This is accomplished by running tests against our software and providing the user with links to FAQ articles when a problem is detected.  Since we are a small team and Pi-hole has been growing steadily, it is our hope that this will help us spend more time on development.

NOTE: All log files auto-delete after 48 hours and ONLY the Pi-hole developers can access your data via the given token. We have taken these extra steps to secure your data and will work to further reduce any personal information gathered.

*** [ INITIALIZING ]
[i] 2023-07-15:20:45:08 debug log has been initialized.
[i] System has been running for 0 days, 20 hours, 16 minutes

*** [ INITIALIZING ] Sourcing setup variables
[i] Sourcing /etc/pihole/setupVars.conf...

*** [ DIAGNOSING ]: Core version
[✓] Version: v5.17.1
[i] Remotes: origin https://github.com/pi-hole/pi-hole.git (fetch)
             origin https://github.com/pi-hole/pi-hole.git (push)
[i] Branch: master
[i] Commit: v5.17.1-0-g6a45c6a

*** [ DIAGNOSING ]: Web version
[✓] Version: v5.20.1
[i] Remotes: origin https://github.com/pi-hole/AdminLTE.git (fetch)
             origin https://github.com/pi-hole/AdminLTE.git (push)
[i] Branch: master
[i] Commit: v5.20.1-0-g3a11976

*** [ DIAGNOSING ]: FTL version
[✓] Version: v5.23
[i] Branch: master
[i] Commit: d201776e

*** [ DIAGNOSING ]: lighttpd version
[i] 1.4.59

*** [ DIAGNOSING ]: php version
[i] 7.4.33

*** [ DIAGNOSING ]: Operating system
[i] Pi-hole Docker Container: 2023.05.2
[✓] Distro:  Debian
[✓] Version: 11
[✓] dig return code: 0
[i] dig response: "Raspbian=10,11 Ubuntu=20,22,23 Debian=10,11,12 Fedora=36,37,38 CentOS=8,9"
[✓] Distro and version supported

*** [ DIAGNOSING ]: SELinux
[i] SELinux not detected

*** [ DIAGNOSING ]: FirewallD
[✓] Firewalld service not detected

*** [ DIAGNOSING ]: Processor
[✓] x86_64

*** [ DIAGNOSING ]: Disk usage
   Filesystem      Size  Used Avail Use% Mounted on
   overlay         457G   41G  393G  10% /
   tmpfs            64M     0   64M   0% /dev
   shm              64M  736K   64M   2% /dev/shm
   /dev/sda2       457G   41G  393G  10% /etc/pihole

*** [ DIAGNOSING ]: Network interfaces and addresses
   1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
       link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
       inet 127.0.0.1/8 scope host lo
          valid_lft forever preferred_lft forever
   1740: eth0@if1741: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
       link/ether 02:42:c0:a8:80:04 brd ff:ff:ff:ff:ff:ff link-netnsid 0
       inet 192.168.128.4/20 brd 192.168.143.255 scope global eth0
          valid_lft forever preferred_lft forever

*** [ DIAGNOSING ]: Network routing table
   default via 192.168.128.1 dev eth0 
   192.168.128.0/20 dev eth0 proto kernel scope link src 192.168.128.4 

*** [ DIAGNOSING ]: Networking
[✓] IPv4 address(es) bound to the eth0 interface:
    192.168.128.4/20

[✗] No IPv6 address(es) found on the eth0 interface.

[i] Default IPv4 gateway(s):
     192.168.128.1
   * Pinging first gateway 192.168.128.1...
[✓] Gateway responded.
[i] Default IPv6 gateway(s):

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✓] www.antineutri.xyz is 0.0.0.0 on lo (127.0.0.1)
[✓] www.antineutri.xyz is 0.0.0.0 on eth0 (192.168.128.4)
[✓] doubleclick.com is 172.217.168.14 via a remote, public DNS server (8.8.8.8)

*** [ DIAGNOSING ]: Name resolution (IPv6) using a random blocked domain and a known ad-serving domain
[✓] No IPv6 address available on lo
[✓] No IPv6 address available on eth0
[✗] Failed to resolve doubleclick.com via a remote, public DNS server (2001:4860:4860::8888)

*** [ DIAGNOSING ]: Discovering active DHCP servers (takes 10 seconds)
   Scanning all your interfaces for DHCP servers
   Timeout: 10 seconds
   DHCP packets received on interface eth0: 0

*** [ DIAGNOSING ]: Pi-hole processes
[✓] lighttpd daemon is active
[✓] pihole-FTL daemon is active

*** [ DIAGNOSING ]: Pi-hole-FTL full status
[i] systemctl:  command not found

*** [ DIAGNOSING ]: Lighttpd configuration test
[✓] No error in lighttpd configuration

*** [ DIAGNOSING ]: Setup variables
    INSTALL_WEB_INTERFACE=true
    TEMPERATUREUNIT=F
    PIHOLE_INTERFACE=eth0
    DNSMASQ_LISTENING=all
    QUERY_LOGGING=true
    DNSSEC=true
    BLOCKING_ENABLED=true
    WEBUIBOXEDLAYOUT=traditional
    WEBTHEME=default-auto
    PIHOLE_DNS_1=192.168.128.3

*** [ DIAGNOSING ]: Dashboard headers
[✓] Web interface X-Header: X-Pi-hole: The Pi-hole Web interface is working!

*** [ DIAGNOSING ]: Pi-hole FTL Query Database
-rw-rw-r-- 1 pihole pihole 0 Jul 15 17:55 /etc/pihole/pihole-FTL.db
[i] Checking integrity of /etc/pihole/pihole-FTL.db ... (this can take several minutes)
[✓] Integrity of /etc/pihole/pihole-FTL.db intact
[i] Checking foreign key constraints of /etc/pihole/pihole-FTL.db ... (this can take several minutes)
[✓] No foreign key errors in /etc/pihole/pihole-FTL.db

*** [ DIAGNOSING ]: Gravity Database
-rw-rw-r-- 1 pihole pihole 13M Jul 15 20:39 /etc/pihole/gravity.db
[i] Checking integrity of /etc/pihole/gravity.db ... (this can take several minutes)
[✓] Integrity of /etc/pihole/gravity.db intact
[i] Checking foreign key constraints of /etc/pihole/gravity.db ... (this can take several minutes)
[✓] No foreign key errors in /etc/pihole/gravity.db

*** [ DIAGNOSING ]: Info table
   property              value                                   
   --------------------  ----------------------------------------
   version               15                                      
   updated               1689446380                              
   gravity_count         200644                                  
   Last gravity run finished at: Sat Jul 15 20:39:40 CEST 2023

   ----- First 10 Gravity Domains -----
   localhost.localdomain
   ck.getcookiestxt.com
   eu1.clevertap-prod.com
   wizhumpgyros.com
   coccyxwickimp.com
   webmail-who-int.000webhostapp.com
   010sec.com
   01mspmd5yalky8.com
   0byv9mgbn0.com
   ns6.0pendns.org

*** [ DIAGNOSING ]: Groups
   id    enabled  name                                                date_added           date_modified        description                                       
   ----  -------  --------------------------------------------------  -------------------  -------------------  --------------------------------------------------
   0           1  Default                                             2023-07-15 20:30:10  2023-07-15 20:30:10  The default group                                 

*** [ DIAGNOSING ]: Domainlist (0/1 = exact white-/blacklist, 2/3 = regex white-/blacklist)

*** [ DIAGNOSING ]: Clients

*** [ DIAGNOSING ]: Adlists
   id     enabled  group_ids     address                                                                                               date_added           date_modified        comment                                           
   -----  -------  ------------  ----------------------------------------------------------------------------------------------------  -------------------  -------------------  --------------------------------------------------
   1            1  0             https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts                                      2023-07-15 20:30:11  2023-07-15 20:30:11  Migrated from /etc/pihole/adlists.list            

*** [ DIAGNOSING ]: contents of /etc/pihole

-rw-r--r-- 1 1000 pihole 0 Jul 15 17:55 /etc/pihole/custom.list

-rw-r--r-- 1 root root 65 Jul 15 20:39 /etc/pihole/local.list

-rw-r--r-- 1 1000 pihole 241 Jul 15 17:55 /etc/pihole/logrotate
   /var/log/pihole/pihole.log {
    su root root
    daily
    copytruncate
    rotate 5
    compress
    delaycompress
    notifempty
    nomail
   }
   /var/log/pihole/FTL.log {
    su root root
    weekly
    copytruncate
    rotate 3
    compress
    delaycompress
    notifempty
    nomail
   }

-rw-rw-r-- 1 1000 pihole 157 Jul 15 20:39 /etc/pihole/pihole-FTL.conf
   MACVENDORDB=/macvendor.db
   LOCAL_IPV4=0.0.0.0

-rw-r--r-- 1 1000 pihole 382 Jul 15 20:39 /etc/pihole/versions
   CORE_VERSION=v5.17.1
   CORE_BRANCH=master
   CORE_HASH=6a45c6a8
   GITHUB_CORE_VERSION=v5.17.1
   GITHUB_CORE_HASH=6a45c6a8
   WEB_VERSION=v5.20.1
   WEB_BRANCH=master
   WEB_HASH=3a11976e
   GITHUB_WEB_VERSION=v5.20.1
   GITHUB_WEB_HASH=c9e170ef
   FTL_VERSION=v5.23
   FTL_BRANCH=master
   FTL_HASH=d201776e
   GITHUB_FTL_VERSION=v5.23
   GITHUB_FTL_HASH=1a114133
   DOCKER_VERSION=2023.05.2
   GITHUB_DOCKER_VERSION=2023.05.2

*** [ DIAGNOSING ]: contents of /etc/dnsmasq.d

-rw-r--r-- 1 root root 1.5K Jul 15 20:39 /etc/dnsmasq.d/01-pihole.conf
   addn-hosts=/etc/pihole/local.list
   addn-hosts=/etc/pihole/custom.list
   localise-queries
   no-resolv
   log-queries
   log-facility=/var/log/pihole/pihole.log
   log-async
   cache-size=10000
   server=192.168.128.3
   dnssec
   trust-anchor=.,20326,8,2,E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC683457104237C7F8EC8D
   except-interface=nonexisting

-rw-r--r-- 1 root root 2.2K Jul 15 20:39 /etc/dnsmasq.d/06-rfc6761.conf
   server=/test/
   server=/localhost/
   server=/invalid/
   server=/bind/
   server=/onion/

-rw-rw-r-- 1 1000 pihole 20 Jul 15 13:32 /etc/dnsmasq.d/99-edns.conf

*** [ DIAGNOSING ]: contents of /etc/lighttpd

-rw-r--r-- 1 root root 2.2K Jan 19  2022 /etc/lighttpd/lighttpd.conf
   server.modules = (
    "mod_indexfile",
    "mod_access",
    "mod_alias",
        "mod_redirect",
   )
   server.document-root        = "/var/www/html"
   server.upload-dirs          = ( "/var/cache/lighttpd/uploads" )
   server.errorlog             = "/var/log/lighttpd/error.log"
   server.pid-file             = "/run/lighttpd.pid"
   server.username             = "www-data"
   server.groupname            = "www-data"
   server.port                 = 80
   server.feature-flags       += ("server.h2proto" => "enable")
   server.feature-flags       += ("server.h2c"     => "enable")
   server.feature-flags       += ("server.graceful-shutdown-timeout" => 5)
   server.http-parseopts = (
     "header-strict"           => "enable",# default
     "host-strict"             => "enable",# default
     "host-normalize"          => "enable",# default
     "url-normalize-unreserved"=> "enable",# recommended highly
     "url-normalize-required"  => "enable",# recommended
     "url-ctrls-reject"        => "enable",# recommended
     "url-path-2f-decode"      => "enable",# recommended highly (unless breaks app)
     "url-path-dotseg-remove"  => "enable",# recommended highly (unless breaks app)
   )
   index-file.names            = ( "index.php", "index.html" )
   url.access-deny             = ( "~", ".inc" )
   static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
   include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
   include_shell "/usr/share/lighttpd/create-mime.conf.pl"
   include "/etc/lighttpd/conf-enabled/*.conf"
   server.modules += (
    "mod_dirlisting",
    "mod_staticfile",
   )

*** [ DIAGNOSING ]: contents of /etc/lighttpd/conf.d
/etc/lighttpd/conf.d does not exist.

*** [ DIAGNOSING ]: contents of /etc/lighttpd/conf-enabled
total 4.0K
lrwxrwxrwx 1 root root  32 May 30 20:51 05-setenv.conf -> ../conf-available/05-setenv.conf
lrwxrwxrwx 1 root root  35 May 30 20:51 10-accesslog.conf -> ../conf-available/10-accesslog.conf
lrwxrwxrwx 1 root root  33 May 30 20:51 10-fastcgi.conf -> ../conf-available/10-fastcgi.conf
-rw-r--r-- 1 root root 221 Jul 15 20:39 15-pihole-admin-redirect-docker.conf
lrwxrwxrwx 1 root root  38 May 30 20:51 15-pihole-admin.conf -> ../conf-available/15-pihole-admin.conf

lrwxrwxrwx 1 root root 38 May 30 20:51 /etc/lighttpd/conf-enabled/15-pihole-admin.conf -> ../conf-available/15-pihole-admin.conf
   server.errorlog := "/var/log/lighttpd/error-pihole.log"
   $HTTP["url"] =~ "^/admin/" {
       server.document-root = "/var/www/html"
       server.stream-response-body = 1
       accesslog.filename = "/var/log/lighttpd/access-pihole.log"
       accesslog.format = "%{%s}t|%h|%V|%r|%s|%b"
       fastcgi.server = (
           ".php" => (
               "localhost" => (
                   "socket" => "/run/lighttpd/pihole-php-fastcgi.socket",
                   "bin-path" => "/usr/bin/php-cgi",
                   "min-procs" => 1,
                   "max-procs" => 1,
                   "bin-environment" => (
                       "TZ" => "Europe/Zurich",
                       "PIHOLE_DOCKER_TAG" => "",
                       "PHP_ERROR_LOG" => "/var/log/lighttpd/error-pihole.log",
                       "CORS_HOSTS" => "",
                       "VIRTUAL_HOST" => "41ecbf534025",
                       "PHP_FCGI_CHILDREN" => "4",
                       "PHP_FCGI_MAX_REQUESTS" => "10000",
                   ),
                   "bin-copy-environment" => (
                       "PATH", "SHELL", "USER"
                   ),
                   "broken-scriptfilename" => "enable",
               )
           )
       )
       setenv.add-response-header = (
           "X-Pi-hole" => "The Pi-hole Web interface is working!",
           "X-Frame-Options" => "DENY",
           "X-XSS-Protection" => "0",
           "X-Content-Type-Options" => "nosniff",
           "Content-Security-Policy" => "default-src 'self' 'unsafe-inline';",
           "X-Permitted-Cross-Domain-Policies" => "none",
           "Referrer-Policy" => "same-origin"
       )
       $HTTP["url"] =~ "^/admin/\." {
           url.access-deny = ("")
       }
       $HTTP["url"] =~ "/(teleporter|api_token)\.php$" {
           $HTTP["referer"] =~ "/admin/settings\.php" {
               setenv.set-response-header = ( "X-Frame-Options" => "SAMEORIGIN" )
           }
       }
   }
   else $HTTP["url"] == "/admin" {
       url.redirect = ("" => "/admin/")
   }
   $HTTP["host"] == "pi.hole" {
       $HTTP["url"] == "/" {
           url.redirect = ("" => "/admin/")
       }
   }
   server.modules += ( "mod_access", "mod_accesslog", "mod_redirect", "mod_fastcgi", "mod_setenv" )

*** [ DIAGNOSING ]: contents of /etc/cron.d

-rw-r--r-- 1 root root 1.7K Jul 15 20:39 /etc/cron.d/pihole
   29 4   * * 7   root    PATH="$PATH:/usr/sbin:/usr/local/bin/" pihole updateGravity >/var/log/pihole/pihole_updateGravity.log || cat /var/log/pihole/pihole_updateGravity.log
   00 00   * * *   root    PATH="$PATH:/usr/sbin:/usr/local/bin/" pihole flush once quiet
   @reboot root /usr/sbin/logrotate --state /var/lib/logrotate/pihole /etc/pihole/logrotate
   43 12  * * *   root    PATH="$PATH:/usr/sbin:/usr/local/bin/" pihole updatechecker
   @reboot root    PATH="$PATH:/usr/sbin:/usr/local/bin/" pihole updatechecker reboot

*** [ DIAGNOSING ]: contents of /var/log/lighttpd

-rw-r--r-- 1 www-data www-data 46K Jul 15 20:45 /var/log/lighttpd/error-pihole.log
   -----head of error-pihole.log------
   2023-07-15 18:16:15: server.c.1513) server started (lighttpd/1.4.59)
   2023-07-15 18:17:19: connections.c.750) invalid request-line -> sending Status 400
   2023-07-15 18:20:19: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::querySingle(): Unable to prepare statement: 1, no such table: info in /var/www/html/admin/scripts/pi-hole/php/gravity.php on line 15
   2023-07-15 18:20:19: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 18:20:20: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::querySingle(): Unable to prepare statement: 1, no such table: info in /var/www/html/admin/scripts/pi-hole/php/gravity.php on line 15
   2023-07-15 18:20:21: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::querySingle(): Unable to prepare statement: 1, no such table: info in /var/www/html/admin/scripts/pi-hole/php/gravity.php on line 15
   2023-07-15 18:20:21: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::querySingle(): Unable to prepare statement: 1, no such table: info in /var/www/html/admin/scripts/pi-hole/php/gravity.php on line 15
   2023-07-15 18:20:21: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 18:20:22: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::querySingle(): Unable to prepare statement: 1, no such table: info in /var/www/html/admin/scripts/pi-hole/php/gravity.php on line 15
   2023-07-15 18:20:23: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::querySingle(): Unable to prepare statement: 1, no such table: info in /var/www/html/admin/scripts/pi-hole/php/gravity.php on line 15
   2023-07-15 18:20:25: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::querySingle(): Unable to prepare statement: 1, no such table: info in /var/www/html/admin/scripts/pi-hole/php/gravity.php on line 15
   2023-07-15 18:20:26: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 18:20:26: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: group in /var/www/html/admin/scripts/pi-hole/php/groups.php on line 46
   2023-07-15 18:20:26: mod_fastcgi.c.487) FastCGI-stderr:PHP Fatal error:  Uncaught Error: Call to a member function fetchArray() on bool in /var/www/html/admin/scripts/pi-hole/php/groups.php:48
   2023-07-15 18:20:26: mod_fastcgi.c.487) FastCGI-stderr:Stack trace:
   2023-07-15 18:20:26: mod_fastcgi.c.487) FastCGI-stderr:#0 {main}
   2023-07-15 18:20:26: mod_fastcgi.c.487) FastCGI-stderr:  thrown in /var/www/html/admin/scripts/pi-hole/php/groups.php on line 48
   2023-07-15 18:20:31: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 18:20:35: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 18:20:40: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 18:21:19: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::querySingle(): Unable to prepare statement: 1, no such table: info in /var/www/html/admin/scripts/pi-hole/php/gravity.php on line 15
   2023-07-15 18:21:20: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::querySingle(): Unable to prepare statement: 1, no such table: info in /var/www/html/admin/scripts/pi-hole/php/gravity.php on line 15
   2023-07-15 18:21:20: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::querySingle(): Unable to prepare statement: 1, no such table: info in /var/www/html/admin/scripts/pi-hole/php/gravity.php on line 15
   2023-07-15 18:21:20: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::querySingle(): Unable to prepare statement: 1, no such table: info in /var/www/html/admin/scripts/pi-hole/php/gravity.php on line 15
   2023-07-15 18:21:20: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385

   -----tail of error-pihole.log------
   2023-07-15 20:42:42: mod_fastcgi.c.487) FastCGI-stderr:  thrown in /var/www/html/admin/api_db.php on line 55
   2023-07-15 20:42:42: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 20:42:47: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 20:42:47: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 20:42:50: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 20:42:51: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 20:42:52: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 20:42:56: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 20:44:26: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 20:44:29: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 20:44:30: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 20:44:33: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 20:44:36: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 20:44:38: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 20:44:41: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 20:44:46: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 20:44:47: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 20:44:50: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: network in /var/www/html/admin/api_db.php on line 32
   2023-07-15 20:44:50: mod_fastcgi.c.487) FastCGI-stderr:PHP Fatal error:  Uncaught Error: Call to a member function finalize() on bool in /var/www/html/admin/api_db.php:55
   2023-07-15 20:44:50: mod_fastcgi.c.487) FastCGI-stderr:Stack trace:
   2023-07-15 20:44:50: mod_fastcgi.c.487) FastCGI-stderr:#0 {main}
   2023-07-15 20:44:50: mod_fastcgi.c.487) FastCGI-stderr:  thrown in /var/www/html/admin/api_db.php on line 55
   2023-07-15 20:44:50: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 20:44:55: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385
   2023-07-15 20:45:00: mod_fastcgi.c.487) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, no such table: message in /var/www/html/admin/api_db.php on line 385

*** [ DIAGNOSING ]: contents of /var/log/pihole

-rw-r--r-- 1 pihole pihole 74K Jul 15 20:45 /var/log/pihole/FTL.log
   -----head of FTL.log------
   [2023-07-15 18:16:15.015 282M] Using log file /var/log/pihole/FTL.log
   [2023-07-15 18:16:15.015 282M] ########## FTL started on 41ecbf534025! ##########
   [2023-07-15 18:16:15.015 282M] FTL branch: master
   [2023-07-15 18:16:15.015 282M] FTL version: v5.23
   [2023-07-15 18:16:15.015 282M] FTL commit: d201776e
   [2023-07-15 18:16:15.015 282M] FTL date: 2023-05-28 11:55:26 +0100
   [2023-07-15 18:16:15.015 282M] FTL user: pihole
   [2023-07-15 18:16:15.015 282M] Compiled for x86_64 (compiled on CI) using gcc (Debian 8.3.0-6) 8.3.0
   [2023-07-15 18:16:15.015 282M] Starting config file parsing (/etc/pihole/pihole-FTL.conf)
   [2023-07-15 18:16:15.015 282M]    SOCKET_LISTENING: only local
   [2023-07-15 18:16:15.015 282M]    AAAA_QUERY_ANALYSIS: Show AAAA queries
   [2023-07-15 18:16:15.015 282M]    MAXDBDAYS: max age for stored queries is 365 days
   [2023-07-15 18:16:15.015 282M]    RESOLVE_IPV6: Resolve IPv6 addresses
   [2023-07-15 18:16:15.015 282M]    RESOLVE_IPV4: Resolve IPv4 addresses
   [2023-07-15 18:16:15.015 282M]    DBINTERVAL: saving to DB file every minute
   [2023-07-15 18:16:15.015 282M]    DBFILE: Using /etc/pihole/pihole-FTL.db
   [2023-07-15 18:16:15.015 282M]    MAXLOGAGE: Importing up to 24.0 hours of log data
   [2023-07-15 18:16:15.015 282M]    PRIVACYLEVEL: Set to 0
   [2023-07-15 18:16:15.015 282M]    IGNORE_LOCALHOST: Show queries from localhost
   [2023-07-15 18:16:15.015 282M]    BLOCKINGMODE: Null IPs for blocked domains
   [2023-07-15 18:16:15.015 282M]    ANALYZE_ONLY_A_AND_AAAA: Disabled. Analyzing all queries
   [2023-07-15 18:16:15.015 282M]    DBIMPORT: Importing history from database
   [2023-07-15 18:16:15.015 282M]    PIDFILE: Using /run/pihole-FTL.pid
   [2023-07-15 18:16:15.015 282M]    SOCKETFILE: Using /run/pihole/FTL.sock
   [2023-07-15 18:16:15.015 282M]    SETUPVARSFILE: Using /etc/pihole/setupVars.conf
   [2023-07-15 18:16:15.015 282M]    MACVENDORDB: Using /macvendor.db
   [2023-07-15 18:16:15.015 282M]    GRAVITYDB: Using /etc/pihole/gravity.db
   [2023-07-15 18:16:15.015 282M]    PARSE_ARP_CACHE: Active
   [2023-07-15 18:16:15.015 282M]    CNAME_DEEP_INSPECT: Active
   [2023-07-15 18:16:15.015 282M]    DELAY_STARTUP: No delay requested.
   [2023-07-15 18:16:15.015 282M]    BLOCK_ESNI: Enabled, blocking _esni.{blocked domain}
   [2023-07-15 18:16:15.015 282M]    NICE: Set process niceness to -10 (default)
   [2023-07-15 18:16:15.015 282M]    MAXNETAGE: Removing IP addresses and host names from network table after 365 days
   [2023-07-15 18:16:15.015 282M]    NAMES_FROM_NETDB: Enabled, trying to get names from network database
   [2023-07-15 18:16:15.015 282M]    EDNS0_ECS: Overwrite client from ECS information

   -----tail of FTL.log------
   [2023-07-15 20:39:38.542 259M] Reloading DNS cache
   [2023-07-15 20:39:38.643 259/T274] Compiled 0 whitelist and 0 blacklist regex filters for 0 clients in 0.1 msec
   [2023-07-15 20:39:38.643 259/T274] Blocking status is enabled
   [2023-07-15 20:39:40.503 259M] Reloading DNS cache
   [2023-07-15 20:39:40.546 259/T274] SQLite3 message: file renamed while open: /etc/pihole/gravity.db (28)
   [2023-07-15 20:39:40.549 259/T274] Compiled 0 whitelist and 0 blacklist regex filters for 0 clients in 0.4 msec
   [2023-07-15 20:39:40.549 259/T274] Blocking status is enabled
   [2023-07-15 20:40:00.007 259/T274] SQLite3 message: no such table: network_addresses in "DELETE FROM network_addresses WHERE lastSeen < 1657910400;" (1)
   [2023-07-15 20:40:00.007 259/T274] ERROR: SQL query "DELETE FROM network_addresses WHERE lastSeen < 1657910400;" failed: SQL logic error (SQLITE_ERROR)
   [2023-07-15 20:41:00.089 259/T274] SQLite3 message: no such table: network_addresses in "DELETE FROM network_addresses WHERE lastSeen < 1657910460;" (1)
   [2023-07-15 20:41:00.090 259/T274] ERROR: SQL query "DELETE FROM network_addresses WHERE lastSeen < 1657910460;" failed: SQL logic error (SQLITE_ERROR)
   [2023-07-15 20:42:00.071 259/T274] SQLite3 message: no such table: network_addresses in "DELETE FROM network_addresses WHERE lastSeen < 1657910520;" (1)
   [2023-07-15 20:42:00.071 259/T274] ERROR: SQL query "DELETE FROM network_addresses WHERE lastSeen < 1657910520;" failed: SQL logic error (SQLITE_ERROR)
   [2023-07-15 20:43:00.047 259/T274] SQLite3 message: no such table: network_addresses in "DELETE FROM network_addresses WHERE lastSeen < 1657910580;" (1)
   [2023-07-15 20:43:00.047 259/T274] ERROR: SQL query "DELETE FROM network_addresses WHERE lastSeen < 1657910580;" failed: SQL logic error (SQLITE_ERROR)
   [2023-07-15 20:44:00.029 259/T274] SQLite3 message: no such table: network_addresses in "DELETE FROM network_addresses WHERE lastSeen < 1657910640;" (1)
   [2023-07-15 20:44:00.029 259/T274] ERROR: SQL query "DELETE FROM network_addresses WHERE lastSeen < 1657910640;" failed: SQL logic error (SQLITE_ERROR)
   [2023-07-15 20:45:00.099 259/T274] SQLite3 message: no such table: network_addresses in "DELETE FROM network_addresses WHERE lastSeen < 1657910700;" (1)
   [2023-07-15 20:45:00.099 259/T274] ERROR: SQL query "DELETE FROM network_addresses WHERE lastSeen < 1657910700;" failed: SQL logic error (SQLITE_ERROR)
   [2023-07-15 20:45:08.957 259M] SQLite3 message: no such table: network in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)
   [2023-07-15 20:45:08.957 259M] getAliasclientIDfromIP("127.0.0.1") - SQL error prepare: SQL logic error
   [2023-07-15 20:45:08.957 259M] SQLite3 message: no such table: network in "SELECT hwaddr FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? GROUP BY ip HAVING max(lastSeen));" (1)
   [2023-07-15 20:45:08.957 259M] getMACfromIP("127.0.0.1") - SQL error prepare: SQL logic error
   [2023-07-15 20:45:08.957 259M] SQLite3 message: no such table: network_addresses in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)
   [2023-07-15 20:45:08.957 259M] getNameFromIP("127.0.0.1") - SQL error prepare: SQL logic error
   [2023-07-15 20:45:08.957 259M] SQLite3 message: no such table: network in "SELECT interface FROM network JOIN network_addresses ON network_addresses.network_id = network.id WHERE network_addresses.ip = ? AND interface != 'N/A' AND interface IS NOT NULL;" (1)
   [2023-07-15 20:45:08.957 259M] getIfaceFromIP("127.0.0.1") - SQL error prepare: SQL logic error
   [2023-07-15 20:45:08.978 259M] SQLite3 message: no such table: network in "SELECT aliasclient_id FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? AND aliasclient_id IS NOT NULL GROUP BY ip HAVING max(lastSeen));" (1)
   [2023-07-15 20:45:08.978 259M] getAliasclientIDfromIP("192.168.128.4") - SQL error prepare: SQL logic error
   [2023-07-15 20:45:08.978 259M] SQLite3 message: no such table: network in "SELECT hwaddr FROM network WHERE id = (SELECT network_id FROM network_addresses WHERE ip = ? GROUP BY ip HAVING max(lastSeen));" (1)
   [2023-07-15 20:45:08.978 259M] getMACfromIP("192.168.128.4") - SQL error prepare: SQL logic error
   [2023-07-15 20:45:08.978 259M] SQLite3 message: no such table: network_addresses in "SELECT name FROM network_addresses WHERE name IS NOT NULL AND ip = ?;" (1)
   [2023-07-15 20:45:08.978 259M] getNameFromIP("192.168.128.4") - SQL error prepare: SQL logic error
   [2023-07-15 20:45:08.978 259M] SQLite3 message: no such table: network in "SELECT interface FROM network JOIN network_addresses ON network_addresses.network_id = network.id WHERE network_addresses.ip = ? AND interface != 'N/A' AND interface IS NOT NULL;" (1)
   [2023-07-15 20:45:08.978 259M] getIfaceFromIP("192.168.128.4") - SQL error prepare: SQL logic error

*** [ DIAGNOSING ]: contents of /dev/shm
total 736K
-rw------- 1 pihole pihole  84K Jul 15 20:39 FTL-clients
-rw------- 1 pihole pihole  248 Jul 15 20:39 FTL-counters
-rw------- 1 pihole pihole 4.0K Jul 15 20:39 FTL-dns-cache
-rw------- 1 pihole pihole  12K Jul 15 20:39 FTL-domains
-rw------- 1 pihole pihole   88 Jul 15 20:39 FTL-lock
-rw------- 1 pihole pihole 8.0K Jul 15 20:39 FTL-overTime
-rw------- 1 pihole pihole 4.0K Jul 15 20:39 FTL-per-client-regex
-rw------- 1 pihole pihole 224K Jul 15 20:39 FTL-queries
-rw------- 1 pihole pihole   16 Jul 15 20:39 FTL-settings
-rw------- 1 pihole pihole  80K Jul 15 20:39 FTL-strings
-rw------- 1 pihole pihole 308K Jul 15 20:39 FTL-upstreams

*** [ DIAGNOSING ]: contents of /etc

-rw-r--r-- 1 root root 37 Jul 15 20:39 /etc/dnsmasq.conf
   conf-dir=/etc/dnsmasq.d
   user=pihole

-rw-r--r-- 1 root root 79 Jul 15 20:39 /etc/resolv.conf
   search tail6bee8.ts.net tail6bee8.ts.net
   nameserver 127.0.0.11
   options ndots:0

*** [ DIAGNOSING ]: Pi-hole diagnosis messages

*** [ DIAGNOSING ]: Locale
    LANG=

*** [ DIAGNOSING ]: Pi-hole log
-rw-r--r-- 1 pihole pihole 41K Jul 15 20:45 /var/log/pihole/pihole.log
   -----head of pihole.log------
   Jul 15 18:16:15 dnsmasq[282]: started, version pi-hole-v2.89-9461807 cachesize 10000
   Jul 15 18:16:15 dnsmasq[282]: compile time options: IPv6 GNU-getopt no-DBus no-UBus no-i18n IDN DHCP DHCPv6 Lua TFTP no-conntrack ipset no-nftset auth cryptohash DNSSEC loop-detect inotify dumpfile
   Jul 15 18:16:15 dnsmasq[282]: DNSSEC validation enabled
   Jul 15 18:16:15 dnsmasq[282]: configured with trust anchor for <root> keytag 20326
   Jul 15 18:16:15 dnsmasq[282]: using nameserver 192.168.128.3#53
   Jul 15 18:16:15 dnsmasq[282]: using only locally-known addresses for onion
   Jul 15 18:16:15 dnsmasq[282]: using only locally-known addresses for bind
   Jul 15 18:16:15 dnsmasq[282]: using only locally-known addresses for invalid
   Jul 15 18:16:15 dnsmasq[282]: using only locally-known addresses for localhost
   Jul 15 18:16:15 dnsmasq[282]: using only locally-known addresses for test
   Jul 15 18:16:15 dnsmasq[282]: read /etc/hosts - 9 names
   Jul 15 18:16:15 dnsmasq[282]: read /etc/pihole/custom.list - 0 names
   Jul 15 18:16:15 dnsmasq[282]: failed to load names from /etc/pihole/local.list: No such file or directory
   Jul 15 18:16:43 dnsmasq[282]: query[A] pi.hole from 127.0.0.1
   Jul 15 18:16:43 dnsmasq[282]: Pi-hole hostname pi.hole is 0.0.0.0
   Jul 15 18:17:13 dnsmasq[282]: query[A] pi.hole from 127.0.0.1
   Jul 15 18:17:13 dnsmasq[282]: Pi-hole hostname pi.hole is 0.0.0.0
   Jul 15 18:17:43 dnsmasq[282]: query[A] pi.hole from 127.0.0.1
   Jul 15 18:17:43 dnsmasq[282]: Pi-hole hostname pi.hole is 0.0.0.0
   Jul 15 18:18:13 dnsmasq[282]: query[A] pi.hole from 127.0.0.1

   -----tail of pihole.log------
   Jul 15 20:41:38 dnsmasq[259]: query[A] pi.hole from 127.0.0.1
   Jul 15 20:41:38 dnsmasq[259]: Pi-hole hostname pi.hole is 0.0.0.0
   Jul 15 20:42:08 dnsmasq[259]: query[A] pi.hole from 127.0.0.1
   Jul 15 20:42:08 dnsmasq[259]: Pi-hole hostname pi.hole is 0.0.0.0
   Jul 15 20:42:38 dnsmasq[259]: query[A] pi.hole from 127.0.0.1
   Jul 15 20:42:38 dnsmasq[259]: Pi-hole hostname pi.hole is 0.0.0.0
   Jul 15 20:43:08 dnsmasq[259]: query[A] pi.hole from 127.0.0.1
   Jul 15 20:43:08 dnsmasq[259]: Pi-hole hostname pi.hole is 0.0.0.0
   Jul 15 20:43:39 dnsmasq[259]: query[A] pi.hole from 127.0.0.1
   Jul 15 20:43:39 dnsmasq[259]: Pi-hole hostname pi.hole is 0.0.0.0
   Jul 15 20:44:09 dnsmasq[259]: query[A] pi.hole from 127.0.0.1
   Jul 15 20:44:09 dnsmasq[259]: Pi-hole hostname pi.hole is 0.0.0.0
   Jul 15 20:44:39 dnsmasq[259]: query[A] pi.hole from 127.0.0.1
   Jul 15 20:44:39 dnsmasq[259]: Pi-hole hostname pi.hole is 0.0.0.0
   Jul 15 20:45:08 dnsmasq[259]: query[A] www.antineutri.xyz from 127.0.0.1
   Jul 15 20:45:08 dnsmasq[259]: gravity blocked www.antineutri.xyz is 0.0.0.0
   Jul 15 20:45:08 dnsmasq[259]: query[A] www.antineutri.xyz from 192.168.128.4
   Jul 15 20:45:08 dnsmasq[259]: gravity blocked www.antineutri.xyz is 0.0.0.0
   Jul 15 20:45:09 dnsmasq[259]: query[A] pi.hole from 127.0.0.1
   Jul 15 20:45:09 dnsmasq[259]: Pi-hole hostname pi.hole is 0.0.0.0

********************************************
********************************************
[✓] ** FINISHED DEBUGGING! **
MatthewVance commented 1 year ago

Yes. 

CoomInPickle commented 1 year ago

aight, after redoing everything it seems to work. but is there some kind of way to test if unbound is working?

MatthewVance commented 1 year ago

Get the IP of the Unbound container and confirm it matches what is set as the upstream DNS server in Pi-hole settings (it should because that’s how the code is setup). If domain names resolve without error when using Pi-hole Docker host IP as your DNS server, it’s working.