# Dnsmasq not starting since last week!

**URL:** <https://discourse.pi-hole.net/t/dnsmasq-not-starting-since-last-week/6026>\
**Category:** Help\
**Created:** [December 18, 2017, 12:36am UTC](https://discourse.pi-hole.net/t/dnsmasq-not-starting-since-last-week/6026 "2017-12-18T00:36:13Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![ojasp](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/o/858c86/32.png) [@ojasp](https://discourse.pi-hole.net/u/ojasp)\
**Post date:** [December 29, 2017, 1:49pm UTC](https://discourse.pi-hole.net/t/dnsmasq-not-starting-since-last-week/6026/21 "2017-12-29T13:49:43Z")

</div>

Ran that without any issues, but the the status of dnsmasq is still failed. Here's my debug token: **du4vq3gstt**

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [December 30, 2017, 3:57pm UTC](https://discourse.pi-hole.net/t/dnsmasq-not-starting-since-last-week/6026/22 "2017-12-30T15:57:08Z")

</div>

What did that command output (the `dnsmasq` one)?

---

<div class="post-metadata">

**Author:** ![ojasp](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/o/858c86/32.png) [@ojasp](https://discourse.pi-hole.net/u/ojasp)\
**Post date:** [December 31, 2017, 11:06pm UTC](https://discourse.pi-hole.net/t/dnsmasq-not-starting-since-last-week/6026/23 "2017-12-31T23:06:50Z")

</div>

Nothing, it went right to the prompt.

---

<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:** [January 1, 2018, 4:52pm UTC](https://discourse.pi-hole.net/t/dnsmasq-not-starting-since-last-week/6026/24 "2018-01-01T16:52:10Z")

</div>

> [@ojasp](#):
>
> Nothing, it went right to the prompt.

For clarification, does that mean it does not output anything but runs (may appear as it would hang) or does it mean that it **exited** immediately without printing anything?

---

<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:** [January 1, 2018, 4:57pm UTC](https://discourse.pi-hole.net/t/dnsmasq-not-starting-since-last-week/6026/25 "2018-01-01T16:57:02Z")

</div>

> [@ojasp](#):
>
> pi@raspberrypi:~ $ sudo -u dnsmasq dnsmasq -d -k
> 
> dnsmasq: failed to create listening socket for port 53: Permission denied
> 
> Just checked with netstat -an, there is nothing listening on that port on the pi.

If you want to use a port below 1024 this forces you to run all network daemons with superuser privileges, which might open security holes. Hence, this security model is obsolete IMHO and today it only gives a false sense of security and contributes to security holes.

TL;DR You have to run `dnsmasq` as `root`.

---

<div class="post-metadata">

**Author:** ![ojasp](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/o/858c86/32.png) [@ojasp](https://discourse.pi-hole.net/u/ojasp)\
**Post date:** [January 4, 2018, 12:21am UTC](https://discourse.pi-hole.net/t/dnsmasq-not-starting-since-last-week/6026/26 "2018-01-04T00:21:13Z")

</div>

Sorry for a late reply, the command exited immediately without any output.

---

<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:** [January 4, 2018, 4:49pm UTC](https://discourse.pi-hole.net/t/dnsmasq-not-starting-since-last-week/6026/27 "2018-01-04T16:49:54Z")

</div>

Okay, so your `dnsmasq` is immediately exiting without printing an error. This is very weird but maybe you can find a similar issue using e.g. Google?

Maybe the binary got damaged, you could try

```auto
sudo apt-get install --reinstall dnsmasq

```

---

<div class="post-metadata">

**Author:** ![ojasp](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/o/858c86/32.png) [@ojasp](https://discourse.pi-hole.net/u/ojasp)\
**Post date:** [January 14, 2018, 4:01am UTC](https://discourse.pi-hole.net/t/dnsmasq-not-starting-since-last-week/6026/28 "2018-01-14T04:01:50Z")

</div>

Just wanted to update you guys on this. I ended up installing Raspbian Stretch on my RPi & the installed pihole. It's working fine now.

---

<div class="post-metadata">

**Author:** ![Lcstyle](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/lcstyle/32/904_2.png) [@Lcstyle](https://discourse.pi-hole.net/u/Lcstyle)\
**Post date:** [June 25, 2018, 3:08am UTC](https://discourse.pi-hole.net/t/dnsmasq-not-starting-since-last-week/6026/29 "2018-06-25T03:08:46Z")

</div>

You inadvertently stumbled on to the solution by installing stretch, since the fix is in dnsmasq 2.76.  
The actual problem is detailed below, along with a fix for jessie.

The solution I first discovered here:  
[https://www.raspberrypi.org/forums/viewtopic.php?t=128449#p919942](https://www.raspberrypi.org/forums/viewtopic.php?t=128449#p919942)

Then found the bug ticket here:

> **[\#860064 - \[dnsmasq\] startup failue when dns-root-data installed - Debian Bug...](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860064)**

The diff patch to fix is here:  
[https://bugs.debian.org/cgi-bin/bugreport.cgi?att=3;bug=858506;filename=dnsmasq-init.patch;msg=27](https://bugs.debian.org/cgi-bin/bugreport.cgi?att=3;bug=858506;filename=dnsmasq-init.patch;msg=27)

You can install a more recent version of DNSMASQ here:

> [@Install a more recent dnsmasq on Raspbian Jessie](https://discourse.pi-hole.net/t/install-a-more-recent-dnsmasq-on-raspbian-jessie/7306):
>
> Update: 2018-08-06 As of v4.0, Pi-hole ships with \_FTL\_DNS, our fork of dnsmasq, which should restore compatibility with Raspbian Jessie. We still recommend installing a newer OS as Jessie is EOL anyway. Please note that this tutorial is only meant for Rasbian Jessie, although it might (to some extend) also help with similar issues on other Debian versions. Do this at your own risk (however, the likeliness of a failure is rather small in our opinion). First step: Download more recent versio…

[Previous page](https://discourse.pi-hole.net/t/dnsmasq-not-starting-since-last-week/6026.md?page=1)
