FTL Offline und SQLite Problem

Hi,

ich habe heute eine frische Installation von PiHole gemacht und bekomme leider FTL nicht als Onlien angezeigt.

Mein Token ist: t1qm7ouvnt

FTL läuft unter root:

root@localhost:~# sudo lsof -i :53
COMMAND     PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
pihole-FT 17100 pihole    4u  IPv4 218451      0t0  UDP *:domain
pihole-FT 17100 pihole    5u  IPv4 218452      0t0  TCP *:domain (LISTEN)
pihole-FT 17100 pihole    6u  IPv6 218453      0t0  UDP *:domain
pihole-FT 17100 pihole    7u  IPv6 218454      0t0  TCP *:domain (LISTEN)

dnsmasq

root@localhost:~# /etc/init.d/dnsmasq status
[ ok ] Checking DNS forwarder and DHCP server: dnsmasq[....] (not running).

/var/log/pihole-FTL.log

[2019-09-12 13:57:13.570 16891] ########## FTL started! ##########
[2019-09-12 13:57:13.570 16891] FTL branch: master
[2019-09-12 13:57:13.570 16891] FTL version: v4.3.1
[2019-09-12 13:57:13.570 16891] FTL commit: b60d63f
[2019-09-12 13:57:13.570 16891] FTL date: 2019-05-25 21:37:26 +0200
[2019-09-12 13:57:13.570 16891] FTL user: pihole
[2019-09-12 13:57:13.570 16891] Starting config file parsing (/etc/pihole/pihole-FTL.conf)
[2019-09-12 13:57:13.570 16891]    SOCKET_LISTENING: only local
[2019-09-12 13:57:13.570 16891]    AAAA_QUERY_ANALYSIS: Show AAAA queries
[2019-09-12 13:57:13.570 16891]    MAXDBDAYS: max age for stored queries is 365 days
[2019-09-12 13:57:13.570 16891]    RESOLVE_IPV6: Resolve IPv6 addresses
[2019-09-12 13:57:13.570 16891]    RESOLVE_IPV4: Resolve IPv4 addresses
[2019-09-12 13:57:13.570 16891]    DBINTERVAL: saving to DB file every minute
[2019-09-12 13:57:13.570 16891]    DBFILE: Using /etc/pihole/pihole-FTL.db
[2019-09-12 13:57:13.571 16891]    MAXLOGAGE: Importing up to 24.0 hours of log data
[2019-09-12 13:57:13.571 16891]    PRIVACYLEVEL: Set to 0
[2019-09-12 13:57:13.571 16891]    IGNORE_LOCALHOST: Show queries from localhost
[2019-09-12 13:57:13.571 16891]    BLOCKINGMODE: Null IPs for blocked domains
[2019-09-12 13:57:13.571 16891]    ANALYZE_ONLY_A_AND_AAAA: Disabled. Analyzing all queries
[2019-09-12 13:57:13.571 16891]    DBIMPORT: Importing history from database
[2019-09-12 13:57:13.571 16891]    PIDFILE: Using /var/run/pihole-FTL.pid
[2019-09-12 13:57:13.571 16891]    PORTFILE: Using /var/run/pihole-FTL.port
[2019-09-12 13:57:13.571 16891]    SOCKETFILE: Using /var/run/pihole/FTL.sock
[2019-09-12 13:57:13.571 16891]    WHITELISTFILE: Using /etc/pihole/whitelist.txt
[2019-09-12 13:57:13.571 16891]    BLACKLISTFILE: Using /etc/pihole/black.list
[2019-09-12 13:57:13.571 16891]    GRAVITYFILE: Using /etc/pihole/gravity.list
[2019-09-12 13:57:13.571 16891]    REGEXLISTFILE: Using /etc/pihole/regex.list
[2019-09-12 13:57:13.571 16891]    SETUPVARSFILE: Using /etc/pihole/setupVars.conf
[2019-09-12 13:57:13.572 16891]    AUDITLISTFILE: Using /etc/pihole/auditlog.list
[2019-09-12 13:57:13.572 16891]    MACVENDORDB: Using /etc/pihole/macvendor.db
[2019-09-12 13:57:13.572 16891]    PARSE_ARP_CACHE: Active
[2019-09-12 13:57:13.572 16891] Finished config file parsing
[2019-09-12 13:57:13.574 16891] Database version is 3
[2019-09-12 13:57:13.574 16891] Database successfully initialized
[2019-09-12 13:57:13.575 16891] New forward server: 8.8.4.4 (0/512)
[2019-09-12 13:57:13.578 16891] New forward server: 8.8.8.8 (1/512)
[2019-09-12 13:57:13.581 16891] New forward server: 192.168.178.1 (2/512)
[2019-09-12 13:57:13.587 16891] Resizing "/FTL-strings" from 4096 to 8192
[2019-09-12 13:57:13.594 16891] Imported 3503 queries from the long-term database
[2019-09-12 13:57:13.595 16891]  -> Total DNS queries: 3503
[2019-09-12 13:57:13.595 16891]  -> Cached DNS queries: 2085
[2019-09-12 13:57:13.595 16891]  -> Forwarded DNS queries: 357
[2019-09-12 13:57:13.595 16891]  -> Exactly blocked DNS queries: 45
[2019-09-12 13:57:13.595 16891]  -> Unknown DNS queries: 1016
[2019-09-12 13:57:13.595 16891]  -> Unique domains: 228
[2019-09-12 13:57:13.595 16891]  -> Unique clients: 6
[2019-09-12 13:57:13.595 16891]  -> Known forward destinations: 3
[2019-09-12 13:57:13.595 16891] Successfully accessed setupVars.conf
[2019-09-12 13:57:13.595 16891] *************************************************************************
[2019-09-12 13:57:13.595 16891] * WARNING: Required Linux capability CAP_NET_ADMIN not available        *
[2019-09-12 13:57:13.595 16891] *************************************************************************
[2019-09-12 13:57:13.595 16891] *************************************************************************
[2019-09-12 13:57:13.595 16891] * WARNING: Required Linux capability CAP_NET_RAW not available          *
[2019-09-12 13:57:13.596 16891] *************************************************************************
[2019-09-12 13:57:13.596 16891] *************************************************************************
[2019-09-12 13:57:13.596 16891] * WARNING: Required Linux capability CAP_NET_BIND_SERVICE not available *
[2019-09-12 13:57:13.596 16891] *************************************************************************
[2019-09-12 13:57:59.153 17098] Using log file /var/log/pihole-FTL.log

Sind die Warnings hier das Problem?

[2019-09-12 13:57:13.595 16891] *************************************************************************
[2019-09-12 13:57:13.595 16891] * WARNING: Required Linux capability CAP_NET_ADMIN not available        *
[2019-09-12 13:57:13.595 16891] *************************************************************************
[2019-09-12 13:57:13.595 16891] *************************************************************************
[2019-09-12 13:57:13.595 16891] * WARNING: Required Linux capability CAP_NET_RAW not available          *
[2019-09-12 13:57:13.596 16891] *************************************************************************
[2019-09-12 13:57:13.596 16891] *************************************************************************
[2019-09-12 13:57:13.596 16891] * WARNING: Required Linux capability CAP_NET_BIND_SERVICE not available *
[2019-09-12 13:57:13.596 16891] *************************************************************************
[2019-09-12 13:58:00.009 17100] SQLite3 message: statement aborts at 22: [UPDATE network SET lastQuery = MAX(lastQuery, 1568287710) WHERE id = 3;] attempt to write a readonly database (8)
[2019-09-12 13:58:00.009 17100] dbquery(UPDATE network SET lastQuery = MAX(lastQuery, 1568287710) WHERE id = 3;) - SQL error (8): attempt to write a readonly database
[2019-09-12 13:58:00.010 17100] check_database(8): Disabling database connection due to error

Es gibt hier laut Suche bereits einige Beiträge zu den o.g. Warnungen. Vielleicht findest du darin etwas hilfreiches.

https://discourse.pi-hole.net/search?q=CAP_NET_RAW

https://discourse.pi-hole.net/search?q=CAP_NET_BIND_SERVICE

https://discourse.pi-hole.net/search?q=Required%20Linux%20capability

Datenbankfehler: Search results for 'attempt to write a readonly database' - Pi-hole Userspace

  • "set capabilities" brachte keine Fehler, aber auch keine Besserung
  • docker benutze ich nicht
root@localhost ~ # pihole status
  [✓] DNS service is running
  [✓] Pi-hole blocking is Enabled

ist aber dennoch "offline" im Admin

SQL scheint durch folgendes Behoben zu sein

sudo service pihole-FTL stop
sudo chown pihole:pihole /etc/pihole/pihole-FTL.db
sudo chmod 0644 /etc/pihole/pihole-FTL.db
sudo service pihole-FTL start

Was gibt das folgende Kommando aus?

sudo journalctl --no-pager -b -u pihole-FTL.service

Hatte ich auch schon versucht drüber

root@localhost ~ # sudo journalctl --no-pager -b -u pihole-FTL.service
No journal files were found.
-- No entries --

Systeminfo noch dazu

root@localhost ~ # uname -a
Linux localhost 4.4.120 #1 SMP PREEMPT Thu Dec 13 12:00:04 CST 2018 armv8l GNU/Linux

Ich habe jetzt auch einmal FTL vom Source compiled und der Prozess läuft nun schon einmal unter "pihole" und nicht unter root.

Allerdings ist fTL immer noch offline, nach weiterer Analyse denke ich, dass der Fehler am Socket liegt.
Die Abfrage fsockopen("127.0.0.1", 4711); ist einfach leer.

Hat jemand eine Idee wie ich den Socket zum "Leben" erwecke? Auch unter root war der Socket ohne Anwort

Ich würde empfehlen, du wendest dich mit deinen Fragen und Schwierigkeiten besser an den englischen Bereich des Forums. Dort wird man dir eher helfen können.

Hab mir schon selber geholfen, habe ein eigenes API Script geschrieben, welche sich die Infos aus der Linux Konsole holt.

Dann brauch ich den PHP Socket nicht mehr.