# Error with dnsmasq, bad option at line 44

**URL:** <https://discourse.pi-hole.net/t/error-with-dnsmasq-bad-option-at-line-44/18630>\
**Category:** Help\
**Created:** [March 23, 2019, 5:19pm UTC](https://discourse.pi-hole.net/t/error-with-dnsmasq-bad-option-at-line-44/18630 "2019-03-23T17:19:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rolecoll](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@rolecoll](https://discourse.pi-hole.net/u/rolecoll)\
**Post date:** [March 23, 2019, 5:19pm UTC](https://discourse.pi-hole.net/t/error-with-dnsmasq-bad-option-at-line-44/18630/1 "2019-03-23T17:19:53Z")

</div>

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](https://scotthelme.co.uk/securing-dns-across-all-of-my-devices-with-pihole-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:

```auto
● 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

```auto
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.

```auto
dhcp-name-match=set:wpad-ignore,wpad
```

This comes from the larger file:

```auto
# 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](https://discourse.pi-hole.net/t/error-dnsmasq-bad-option-at-line-44-of-etc-dnsmasq-d-01-pihole-conf/17905), but it did not work.

Is this situation salvageable? If so, how?

Debug Token: [https://tricorder.pi-hole.net/c2shkoj4ni](https://tricorder.pi-hole.net/c2shkoj4ni)

---

<div class="post-metadata">

**Author:** ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)\
**Post date:** [March 23, 2019, 5:22pm UTC](https://discourse.pi-hole.net/t/error-with-dnsmasq-bad-option-at-line-44/18630/2 "2019-03-23T17:22:45Z")

</div>

This tutorial is outdated. We're not using the system-provided `dnsmasq` since over one year by now. Instead, we ship our own DNS server (`pihole-FTL`) which is a customized version of `dnsmasq` with lots of Pi-hole additions. This command is wrong:

```auto
sudo systemctl restart dnsmasq.service

```

Instead, try

```auto
sudo systemctl stop dnsmasq.service
sudo systemctl restart pihole-FTL.service

```

---

<div class="post-metadata">

**Author:** ![rolecoll](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/r/2acd7d/32.png) [@rolecoll](https://discourse.pi-hole.net/u/rolecoll)\
**Post date:** [March 23, 2019, 5:30pm UTC](https://discourse.pi-hole.net/t/error-with-dnsmasq-bad-option-at-line-44/18630/3 "2019-03-23T17:30:01Z")

</div>

That seemed to work but it showed no console output. Also would the changes that the tutorial said to do to the `/etc/dnsmasq.d/01-pihole.conf` and `/etc/pihole/setupVars.conf` files actually do anything if the dnsmasq service is no longer used? If those changes would no longer have any real effect, which files should I change to produce the desired changes?

---

<div class="post-metadata">

**Author:** ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)\
**Post date:** [March 23, 2019, 6:20pm UTC](https://discourse.pi-hole.net/t/error-with-dnsmasq-bad-option-at-line-44/18630/4 "2019-03-23T18:20:20Z")

</div>

> [@rolecoll](#):
>
> That seemed to work but it showed no console output.

This is expected. It would print only on errors.

> [@rolecoll](#):
>
> Also would the changes that the tutorial said to do to the `/etc/dnsmasq.d/01-pihole.conf` and `/etc/pihole/setupVars.conf` files actually do anything if the dnsmasq service is no longer used?

Those are the correct files. You misunderstood me. We're still using `dnsmasq` but we're providing our own binary which provides more than "just" `dnsmasq`, hence, it has a different name. It uses the same configuration files.

---

<div class="post-metadata">

**Author:** ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)\
**Post date:** [April 13, 2019, 6:20pm UTC](https://discourse.pi-hole.net/t/error-with-dnsmasq-bad-option-at-line-44/18630/5 "2019-04-13T18:20:21Z")

</div>

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