Your installation is somehow broken, can you run pihole -r
once again and post any suspiciously looking output (i.e., if it crashes)
@mon_dieu,
Can you confirm same output for the status command as in the other thread ?
If so, the pihole-FTL
binary probably cant access that file anymore as its running with user "pihole" privileges now instead of root privies like dnsmasq
did before the Pi-hole version 4 update.
And that file is not part of the normal basic Pi-hole install.
grep -v '#\|^$' -R /etc/dnsmasq.*
?
EDIT: Owh first get it to work again with pihole -r
like @DL6ER instructed
EDIT2: I just read this bit that you could try:
after pihole -r
DNS service not running and FTL offline
Output:
[i] Existing PHP installation detected : PHP version 7.0.30-0+deb9u1
[i] Repair option selected
[â] Disk space check
[â] Update local cache of available packages
[â] Checking apt-get for upgraded packages... 7 updates available
[i] It is recommended to update your OS after installing the Pi-hole!
[i] Installer Dependency checks...
[â] Checking for apt-utils
[â] Checking for dialog
[â] Checking for debconf
[â] Checking for dhcpcd5
[â] Checking for git
[â] Checking for iproute2
[â] Checking for whiptail
[i] Performing reconfiguration, skipping download of local repos
[â] Resetting repository within /etc/.pihole...
[â] Resetting repository within /var/www/html/admin...
[i] Main Dependency checks...
[â] Checking for bc
[â] Checking for cron
[â] Checking for curl
[â] Checking for dnsutils
[â] Checking for iputils-ping
[â] Checking for lsof
[â] Checking for netcat
[â] Checking for psmisc
[â] Checking for sudo
[â] Checking for unzip
[â] Checking for wget
[â] Checking for idn2
[â] Checking for sqlite3
[â] Checking for libcap2-bin
[â] Checking for dns-root-data
[â] Checking for resolvconf
[â] Checking for lighttpd
[â] Checking for php7.0-common
[â] Checking for php7.0-cgi
[â] Checking for php7.0-sqlite3
[â] Enabling lighttpd service to start on reboot
[â] Installing scripts from /etc/.pihole
[i] Installing configs from /etc/.pihole...
[i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
[â] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf
[i] Installing blocking page...
[â] Creating directory for blocking page, and copying files
[â] Backing up index.lighttpd.html
No default index.lighttpd.html file found... not backing up
[â] Installing sudoer file
[â] Installing latest Cron script
[â] Installing latest logrotate script
[i] FTL Checks...
[â] Detected ARM-hf architecture (armv7+)
[i] Checking for existing FTL binary...
[â] Downloading and Installing FTL
[i] FTL can now resolve DNS Queries without dnsmasq running separately
[â] Stopping dnsmasq service...
[â] Disabling dnsmasq service
[â] man pages installed and database updated
[i] Systemd-resolved is not enabled
[â] Starting lighttpd service
[â] Enabling lighttpd service to start on reboot
[i] Restarting services...
[â] Starting pihole-FTL service
[â] Enabling pihole-FTL service to start on reboot
[â] Deleting existing list cache
[â] DNS service is not running
[â] Starting DNS service
[â] DNS resolution is not available
chown pihole:pihole /var/lib/misc/dnsmasq.leases
chown: changing ownership of '/var/lib/misc/dnsmasq.leases': Operation not permitted
grep -v '#\|^$' -R /etc/dnsmasq
grep: /etc/dnsmasq: No such file or directory
Try running the command via sudo
First confirm if you still have same status error:
If so, you can try change ownership of that file like @technicalpyro previously posted (with sudo
this time):
sudo touch /var/lib/misc/dnsmasq.leases
sudo chown pihole:pihole /var/lib/misc/dnsmasq.leases
Restart:
sudo systemctl restart pihole-FTL
And check again:
sudo systemctl status pihole-FTL -l
Source of that dnsmasq.leases
file is probably revealed if you run below one (dont skip the .*):
grep -v '#\|^$' -R /etc/dnsmasq.*
I uninstall RaspAP and now no internet connection
so i have to reinstall from stretch iso again
I will try to install pihole first and second RasAP
thx for your assistance and hopefully it works afterwards
Dont give up ... your that close and almost an expert now
never ....
step by step ,
I will buy a raspberry in addition to try independently from the fully working version 3.3.1
Complete new installation
- pihole first --> works
- second wifi AP --> fail --> no network connection
other way - wifi AP first --> works
- pihole second --> fail:
Error: unable to get latest release location from GitHub
--> FTL offline
I have no idea where the solution is.
Edit: Wifi AP and bridge installed from here:
https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md
Make sure dnsmasq
is not started at boot as pihole-FTL
is taking over that part:
sudo systemctl stop dnsmasq
sudo systemctl disable dnsmasq
Confirm 127.0.0.1
is configured as nameserver
in below file for the next step:
cat /etc/resolv.conf
Change nameserver
in file /etc/resolv.conf
from 127.0.0.1
into 8.8.8.8
:
sudo sed -i 's/127.0.0.1/8.8.8.8/' /etc/resolv.conf
Repair Pi-hole install:
pihole -r
Check status:
sudo systemctl status pihole-FTL -l
Probably you will experience same error as before in the status output but now you know you can try this:
Output :
grep -v '#\|^$' -R /etc/dnsmasq.* /etc/dnsmasq.conf: dhcp-range=192.168.4.20,192.168.4.200,255.255.255.0,24h /etc/dnsmasq.conf:conf-dir=/etc/dnsmasq.d /etc/dnsmasq.conf.orig:dhcp-mac=set:client_is_a_pi,B8:27:EB:*:*:* /etc/dnsmasq.conf.orig:dhcp-reply-delay=tag:client_is_a_pi,2 /etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/gravity.list /etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/black.list /etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/local.list /etc/dnsmasq.d/01-pihole.conf:localise-queries /etc/dnsmasq.d/01-pihole.conf:no-resolv /etc/dnsmasq.d/01-pihole.conf:cache-size=10000 /etc/dnsmasq.d/01-pihole.conf:log-queries=extra /etc/dnsmasq.d/01-pihole.conf:log-facility=/var/log/pihole.log /etc/dnsmasq.d/01-pihole.conf:local-ttl=2 /etc/dnsmasq.d/01-pihole.conf:log-async /etc/dnsmasq.d/01-pihole.conf:server=77.109.148.137 /etc/dnsmasq.d/01-pihole.conf:server=146.185.167.43 /etc/dnsmasq.d/01-pihole.conf:interface=eth0
All the steps are done.
Unfortunately FTL is still offline
sudo systemctl status pihole-FTL -l ● pihole-FTL.service - LSB: pihole-FTL daemon Loaded: loaded (/etc/init.d/pihole-FTL; generated; vendor preset: enabled) Active: active (exited) since Thu 2018-08-23 22:31:32 CEST; 12min ago Docs: man:systemd-sysv-generator(8) Process: 437 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS) CGroup: /system.slice/pihole-FTL.service
Aug 23 22:31:28 matrix-revolutions systemd[1]: Starting LSB: pihole-FTL daemon... Aug 23 22:31:28 matrix-revolutions pihole-FTL[437]: Not running Aug 23 22:31:29 matrix-revolutions pihole-FTL[437]: chown: Zugriff auf '/etc/pihole/dhcp.leases' nicht möglich: Datei Aug 23 22:31:29 matrix-revolutions pihole-FTL[437]: /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a Aug 23 22:31:29 matrix-revolutions su[569]: Successful su for pihole by root Aug 23 22:31:29 matrix-revolutions su[569]: + ??? root:pihole Aug 23 22:31:29 matrix-revolutions su[569]: pam_unix(su:session): session opened for user pihole by (uid=0) Aug 23 22:31:32 matrix-revolutions pihole-FTL[437]: dnsmasq: failed to bind DHCP server socket: Address already in us Aug 23 22:31:32 matrix-revolutions systemd[1]: Started LSB: pihole-FTL daemon.
Can you run below one and post results here to see which daemon/program binded to that socket (IP + port 67 UDP) before pihole-FTL
was able to:
sudo netstat -nltup | grep 'Proto\|:53 \|:67 \|:80 \|:471'
If you find the daemon thats listening on port 67 UDP, you can try google how to stop and disable it for Linux systemd systems.
And restart:
sudo systemctl restart pihole-FTL
sudo systemctl status pihole-FTL -l
Below is how it should look:
pi@noads:~ $ sudo netstat -nltup | grep 'Proto\|:53 \|:67 \|:80 \|:471'
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:4711 0.0.0.0:* LISTEN 20855/pihole-FTL
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 8101/lighttpd
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 20855/pihole-FTL
tcp6 0 0 ::1:4711 :::* LISTEN 20855/pihole-FTL
tcp6 0 0 :::80 :::* LISTEN 8101/lighttpd
tcp6 0 0 :::53 :::* LISTEN 20855/pihole-FTL
udp 0 0 0.0.0.0:53 0.0.0.0:* 20855/pihole-FTL
udp 0 0 0.0.0.0:67 0.0.0.0:* 20855/pihole-FTL
udp6 0 0 :::53 :::* 20855/pihole-FTL
udp 0 0 0.0.0.0:67 0.0.0.0:* 4697/dnsmasq
I don't know what to do ,
sorry I'm a newbie
Whats output for:
sudo systemctl status dnsmasq -l
Did you run below ones to make sure dnsmasq
doesnt get started ?
sudo systemctl stop dnsmasq
sudo systemctl disable dnsmasq
First get ride of above setting as it doesnt belong to Pi-hole and might conflict with other Pi-hole settings.
Edit the file /etc/dnsmasq.conf
and remove or hash out the dhcp-range=
line.
Restart FTL and check again:
sudo systemctl restart pihole-FTL
sudo systemctl status pihole-FTL -l
Next setup the routers DHCP server settings like described on below FAQ (methode 1 or 2):
Or if settings lacking or not exposed on the router, configure Pi-hole to do DHCP for your network instead of the router:
Testing DNS resolution and blocking can be done with below one on one of your client PC's (Linux, Windows or Mac):
nslookup pi.hole <PIHOLE_IP_ADDRESS>
Below an example from one of my clients with 10.0.0.2 being my Pi-hole IP:
C:\>nslookup pi.hole 10.0.0.2
Server: noads.dehakkelaar.nl
Address: 10.0.0.2
Name: pi.hole
Address: 10.0.0.2
Or a naughty domain getting redirected to 0.0.0.0:
C:\>nslookup doubleclick.com 10.0.0.2
Server: noads.dehakkelaar.nl
Address: 10.0.0.2
Name: doubleclick.com
Addresses: ::
0.0.0.0
Above nsloolups should generate stats on the Pi-hole web GUI.
Solved by new installation of Stretch, RasAP and Pihole with additional following commands:
pihole -r #Repair
sudo touch /var/lib/misc/dnsmasq.leases
sudo chown pihole:pihole /var/lib/misc/dnsmasq.leases
reboot
Many thanks for your help
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.