New install, DNS service not running


Please follow the below template, it will help us to help you!

Expected Behaviour:

Pihole status should be green on device restart, should block ads

Actual Behaviour:

DNS service is not running

Debug Token:

I used the pihole curl command on a beaglebone running Debian 9.5 IOT image. It installed fine but when visiting the admin interface it says DNS not running. I have rebuilt / reconfigured / and reinstalled a few times and it doesn’t want to seem to work.

If I set the router DNS to my pihole, we get no internet.



What is the output from sudo systemctl status --full --no-pager pihole-FTL.service?


● pihole-FTL.service - LSB: pihole-FTL daemon
   Loaded: loaded (/etc/init.d/pihole-FTL; generated; vendor preset: enabled)
   Active: active (exited) since Sun 2019-03-24 04:17:20 UTC; 9min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1081 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/pihole-FTL.service

Mar 24 04:17:12 beaglebone systemd[1]: Starting LSB: pihole-FTL daemon...
Mar 24 04:17:13 beaglebone pihole-FTL[1081]: Not running
Mar 24 04:17:17 beaglebone pihole-FTL[1081]: /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /etc/resolvconf/run/resolv.conf
Mar 24 04:17:19 beaglebone su[1362]: Successful su for pihole by root
Mar 24 04:17:19 beaglebone su[1362]: + ??? root:pihole
Mar 24 04:17:19 beaglebone su[1362]: pam_unix(su:session): session opened for user pihole by (uid=0)
Mar 24 04:17:20 beaglebone pihole-FTL[1081]: dnsmasq: cannot open or create lease file /var/lib/misc/dnsmasq.leases: Permission denied
Mar 24 04:17:20 beaglebone systemd[1]: Started LSB: pihole-FTL daemon.

So it’s having trouble creating that file – if I create the directory and touch the file and give it perms, and then restart pihole service it works. However this is all undone after a reboot.



What are the contents of the /etc/dnsmasq.conf file? And sudo mount | grep /var?


debian@beaglebone:~$ cat /etc/dnsmasq.conf

The second command does not return anything.



Thanks, how about just the plain sudo mount output without any filter?



Apologies for the delay

here’s the output from sudo mount

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=220136k,nr_inodes=55034,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=49488k,mode=755)
/dev/mmcblk1p1 on / type ext4 (rw,noatime,errors=remount-ro,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=s                             ystemd)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=25,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=15923)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
tmpfs on /run/user/999 type tmpfs (rw,nosuid,nodev,relatime,size=49484k,mode=700,uid=999,gid=991)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=49484k,mode=700,uid=1000,gid=1000)


I’m not familiar with Debian on BeagleBone so I’m not exactly sure why /var/lib/misc/ does not persist or exist after a reboot. You may have to contact someone with some more experience with that platform for more assistance.


pi@noads:~ $ dpkg -S /var/lib/misc
base-files: /var/lib/misc

pi@noads:~ $ dpkg -L base-files

pi@noads:~ $ apt show base-files
Description: Debian base system miscellaneous files
 This package contains the basic filesystem hierarchy of a Debian system, and
 several important miscellaneous files, such as /etc/debian_version,
 /etc/host.conf, /etc/issue, /etc/motd, /etc/profile, and others,
 and the text of several common licenses in use on Debian systems.

pi@noads:~ $ apt policy base-files
  Installed: 9.9+rpi1+deb9u8
  Candidate: 9.9+rpi1+deb9u8
  Version table:
 *** 9.9+rpi1+deb9u8 500
        500 stretch/main armhf Packages
        100 /var/lib/dpkg/status

If the base-files package containing /var/lib/misc is not installed, try installing and see if the folder survives a reboot:

sudo apt-get install base-files

If already installed, try reconfigure that will run the post install scripts for that package:

sudo dpkg-reconfigure base-files

If that dont help, try reinstall:

sudo apt-get install --reinstall base-files



An update.

I’m not sure why it was occurring previously, but subsequent restarts of the system have not lead to the /var/lib/misc folder being removed, and after a power cycle the system is running as expected. It may have been due to this solution as well (removing softAP0 file) FTL offline and pihole not blocking ads

Combined with this solution, FTL is offline after update to 4.0 everything appears to be working as expected.

To anyone else facing this issue: dnsmasq: cannot open or create lease file /var/lib/misc/dnsmasq.leases: Permission denied here is how I solved it.

sudo mkdir /var/lib/misc
sudo touch /var/lib/misc/dnsmasq.leases
sudo chown pihole:pihole /var/lib/misc/dnsmasq.leases

Then restart the service and everything should be well. Just ensure that it persists through a power cycle and you should be good to go.

1 Like


For above solution, can you change the last command into below:

sudo chown pihole:pihole /var/lib/misc/dnsmasq.leases

That way you prevent people stumbling on this solution that do have the misc folder populated, mistakenly run the chown and changing ownership recursively, the -R argument, for all files and folders contained in the misc folder.


closed #12

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.