# Collectd DNS plugin crashes

**URL:** <https://forum.openwrt.org/t/collectd-dns-plugin-crashes/20386>\
**Category:** Installing and Using OpenWrt\
**Created:** [September 1, 2018, 4:06pm UTC](https://forum.openwrt.org/t/collectd-dns-plugin-crashes/20386 "2018-09-01T16:06:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thencein](https://forum.openwrt.org/user_avatar/forum.openwrt.org/thencein/32/4452_2.png) [@thencein](https://forum.openwrt.org/u/thencein)\
**Post date:** [September 1, 2018, 4:06pm UTC](https://forum.openwrt.org/t/collectd-dns-plugin-crashes/20386/1 "2018-09-01T16:06:42Z")

</div>

I've enabled collectd on the router for data collection but once I've enabled and started the service, it seems to crash some time afterwards (sometimes it's hours after starting, other times it's minutes after starting the service).

This is the message logged when collectd exits:  
`Sat Sep 1 13:25:32 2018 daemon.info collectd[16359]: dns plugin: pcap_loop exited with status -1.`

It's always the DNS plugin that causes this. Once the dns plugin exits, the rest of my collectd config stops working (so data stops being fed into InfluxDB for example) and the only way to fix it is to restart the collectd service (until the next time the DNS plugin stops working).

I'm using Davidc502's r7829-42dc0e2594 build on a WRT3200ACM.

Any thoughts?

EDIT:  
And this is what my DNS plugin config is currently set to:

```
<Plugin dns>
	Interface any
	IgnoreSource "127.0.0.1"
</Plugin>

```

---

<div class="post-metadata">

**Author:** ![hnyman](https://forum.openwrt.org/user_avatar/forum.openwrt.org/hnyman/32/19_2.png) [@hnyman](https://forum.openwrt.org/u/hnyman)\
**Post date:** [September 1, 2018, 4:17pm UTC](https://forum.openwrt.org/t/collectd-dns-plugin-crashes/20386/2 "2018-09-01T16:17:53Z")

</div>

> [@thencein](#):
>
> Any thoughts?

The DNS plugin has been problematic all the time, as it runs the a bit complicated data collection cycle using external pcap library.

See my debugging attempts a few years ago in [https://github.com/collectd/collectd/issues/1227](https://github.com/collectd/collectd/issues/1227)

I inserted tons of debugging statements into collectd source, but never got into the root cause of the problem. The usage of pcap gets too complicated in multi-threaded environment.

My advice is to disable the DNS plugin, if it causes problems for you. Sorry.  
Otherwise, feel free to debug it 😉

---

<div class="post-metadata">

**Author:** ![thencein](https://forum.openwrt.org/user_avatar/forum.openwrt.org/thencein/32/4452_2.png) [@thencein](https://forum.openwrt.org/u/thencein)\
**Post date:** [September 1, 2018, 4:55pm UTC](https://forum.openwrt.org/t/collectd-dns-plugin-crashes/20386/3 "2018-09-01T16:55:25Z")

</div>

No worries - I was just curious whether this was an issue specific to my setup or a wider issue. Cheers anyway!

---

<div class="post-metadata">

**Author:** ![system](https://forum.openwrt.org/uploads/default/original/3X/7/4/740520c71f00039bbf001045c682f0ecb25e905a.png) [@system](https://forum.openwrt.org/u/system)\
**Post date:** [September 11, 2018, 4:55pm UTC](https://forum.openwrt.org/t/collectd-dns-plugin-crashes/20386/4 "2018-09-11T16:55:28Z")

</div>

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