Hey, so I was trying to install pihole as per this guide: Securing DNS across all of my devices with Pi-Hole + DNS-over-HTTPS + 1.1.1.1 and when I got to the part of restarting the dnsmasq service I got the following error:
Job for dnsmasq.service failed because the control process exited with error code.
See "systemctl status dnsmasq.service" and "journalctl -xe" for details.
So I run these services and receive the following messages:
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2019-03-23 00:58:50 EDT; 1min 2s ago
Process: 14791 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=1/FAILURE)
Process: 14789 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
Mar 23 00:58:50 raspberrypi systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Mar 23 00:58:50 raspberrypi dnsmasq[14789]: dnsmasq: syntax check OK.
Mar 23 00:58:50 raspberrypi dnsmasq[14791]: dnsmasq: bad option at line 44 of /etc/dnsmasq.d/01-pihole.conf
Mar 23 00:58:50 raspberrypi systemd[1]: dnsmasq.service: Control process exited, code=exited status=1
Mar 23 00:58:50 raspberrypi systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server
Mar 23 00:58:50 raspberrypi systemd[1]: dnsmasq.service: Unit entered failed state.
Mar 23 00:58:50 raspberrypi systemd[1]: dnsmasq.service: Failed with result 'exit-code'.
and
Mar 23 00:45:03 raspberrypi sudo[13975]: pam_unix(sudo:session): session closed for user root
Mar 23 00:45:06 raspberrypi sudo[13987]: pi : TTY=pts/3 ; PWD=/home/pi ; USER=root ; COMMAND=/usr/bin
Mar 23 00:45:06 raspberrypi sudo[13987]: pam_unix(sudo:session): session opened for user root by (uid=0)
Mar 23 00:45:18 raspberrypi sudo[13987]: pam_unix(sudo:session): session closed for user root
Mar 23 00:45:28 raspberrypi sudo[14011]: pi : TTY=pts/3 ; PWD=/home/pi ; USER=root ; COMMAND=/usr/bin
Mar 23 00:45:28 raspberrypi sudo[14011]: pam_unix(sudo:session): session opened for user root by (uid=0)
Mar 23 00:45:31 raspberrypi sudo[14011]: pam_unix(sudo:session): session closed for user root
Mar 23 00:50:01 raspberrypi CRON[14320]: pam_unix(cron:session): session opened for user root by (uid=0)
Mar 23 00:50:01 raspberrypi CRON[14324]: (root) CMD ( PATH="$PATH:/usr/local/bin/" pihole updatechecker l
Mar 23 00:50:01 raspberrypi CRON[14320]: pam_unix(cron:session): session closed for user root
Mar 23 00:58:50 raspberrypi sudo[14783]: pi : TTY=pts/2 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/sys
Mar 23 00:58:50 raspberrypi sudo[14783]: pam_unix(sudo:session): session opened for user root by (uid=0)
Mar 23 00:58:50 raspberrypi systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
-- Subject: Unit dnsmasq.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit dnsmasq.service has begun starting up.
Mar 23 00:58:50 raspberrypi dnsmasq[14789]: dnsmasq: syntax check OK.
Mar 23 00:58:50 raspberrypi dnsmasq[14791]: dnsmasq: bad option at line 44 of /etc/dnsmasq.d/01-pihole.conf
Mar 23 00:58:50 raspberrypi dnsmasq[14791]: bad option at line 44 of /etc/dnsmasq.d/01-pihole.conf
Mar 23 00:58:50 raspberrypi dnsmasq[14791]: FAILED to start up
Mar 23 00:58:50 raspberrypi systemd[1]: dnsmasq.service: Control process exited, code=exited status=1
Mar 23 00:58:50 raspberrypi systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server
-- Subject: Unit dnsmasq.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit dnsmasq.service has failed.
--
-- The result is failed.
Mar 23 00:58:50 raspberrypi systemd[1]: dnsmasq.service: Unit entered failed state.
Mar 23 00:58:50 raspberrypi systemd[1]: dnsmasq.service: Failed with result 'exit-code'.
Mar 23 00:58:50 raspberrypi sudo[14783]: pam_unix(sudo:session): session closed for user root
Mar 23 01:00:01 raspberrypi CRON[14854]: pam_unix(cron:session): session opened for user root by (uid=0)
Mar 23 01:00:01 raspberrypi CRON[14858]: (root) CMD ( PATH="$PATH:/usr/local/bin/" pihole updatechecker l
Mar 23 01:00:02 raspberrypi CRON[14854]: pam_unix(cron:session): session closed for user root
respectively. I checked what was on line 44 of the config file and the below is the line that is causing the error.
dhcp-name-match=set:wpad-ignore,wpad
This comes from the larger file:
# Pi-hole: A black hole for Internet advertisements
# (c) 2017 Pi-hole, LLC (https://pi-hole.net)
# Network-wide ad blocking via your own hardware.
#
# Dnsmasq config for Pi-hole's FTLDNS
#
# This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license.
###############################################################################
# FILE AUTOMATICALLY POPULATED BY PI-HOLE INSTALL/UPDATE PROCEDURE. #
# ANY CHANGES MADE TO THIS FILE AFTER INSTALL WILL BE LOST ON THE NEXT UPDATE #
# #
# IF YOU WISH TO CHANGE THE UPSTREAM SERVERS, CHANGE THEM IN: #
# /etc/pihole/setupVars.conf #
# #
# ANY OTHER CHANGES SHOULD BE MADE IN A SEPARATE CONFIG FILE #
# WITHIN /etc/dnsmasq.d/yourname.conf #
###############################################################################
addn-hosts=/etc/pihole/gravity.list
addn-hosts=/etc/pihole/black.list
addn-hosts=/etc/pihole/local.list
localise-queries
no-resolv
cache-size=10000
log-queries
log-facility=/var/log/pihole.log
local-ttl=2
log-async
# If a DHCP client claims that its name is "wpad", ignore that.
# This fixes a security hole. see CERT Vulnerability VU#598349
dhcp-name-match=set:wpad-ignore,wpad
dhcp-ignore-names=tag:wpad-ignore
#server=1.1.1.1
#server=1.0.0.1
server=127.0.0.1#54
interface=wlan0
I tried the solution written here: Error Dnsmasq: bad option at line 44 of /etc/dnsmasq.d/01-pihole.conf, but it did not work.
Is this situation salvageable? If so, how?
Debug Token: https://tricorder.pi-hole.net/c2shkoj4ni