You are not logged in.

#1 2014-07-21 10:26:00

simendsjo
Member
Registered: 2012-09-27
Posts: 111

Problems with pdnsd

Hi.

If this is more fit for the newbie forum, please let me know.

I'm having problems with pdnsd.

EDIT2: It seems the problems is rather something with the information given by dhcpcd for the domain - look at the bottom of the post.

resolv.conf gets updated with domain and my local pdnsd server address.
pdnsd-resolv.conf gets updated with dns servers on the network I'm on.

After running

resolvconf -u

followed by

systemctl restart pdnsd

, everything
works fine for a few queries. After that, everything starts behaving a bit
strange. Suddenly, looking up addresses I know are in my cache hangs too, and

nslookup

times out or uses a very long time (even for addresses from cache
- 7 seconds and similar). And then the problem goes away. And comes back..

I get some errors when starting pdnsd (look at the bottom). Could this be some
sort of ipv4/ipv6 issue?

Any idea what might be the cause of this and how to fix it? It's *very*
annoying hmm

Here's my config files:

/etc/resolvconf.conf:

    resolv_conf=/etc/resolv.conf
    name_servers=127.0.0.1
    pdnsd_resolv=/etc/pdnsd-resolv.conf

/etc/pdnsd.conf:

    global {
        perm_cache=10240;
        cache_dir="/var/cache/pdnsd";
        run_as="pdnsd";
        server_ip = 127.0.0.1;
        status_ctl = on;
        min_ttl=3h;
        max_ttl=1w;
        timeout=10;
        neg_domain_pol=on;
        udpbufsize=1024;
    }

    server {
        label= "resolvconf";
        file = "/etc/pdnsd-resolv.conf";
        proxy_only=on;
        timeout=4;
        uptest=if;
        interface = any;
        interval=10;
        purge_cache=off;
        preset=off;
    }

The setup is taken from the pdnsd archwiki page.

pdnsd.service errors:

    Jul 21 12:13:17 localhost pdnsd[25584]: IPv6 address "2001:700:700:1::21" in config file ignored while running in IPv4 mode.
    Jul 21 12:13:17 localhost pdnsd[25584]: IPv6 address "2001:700:700:1::20" in config file ignored while running in IPv4 mode.
    Jul 21 12:13:17 localhost pdnsd[25584]: IPv6 address "2001:700:700:1::21" in config file ignored while running in IPv4 mode.
    Jul 21 12:13:17 localhost pdnsd[25584]: IPv6 address "2001:700:700:1::20" in config file ignored while running in IPv4 mode.
    Jul 21 12:13:17 localhost pdnsd[25584]: IPv6 address "2001:700:700:1::21" in config file ignored while running in IPv4 mode.
    Jul 21 12:13:17 localhost pdnsd[25584]: IPv6 address "2001:700:700:1::20" in config file ignored while running in IPv4 mode.
    Jul 21 12:13:17 localhost pdnsd[25584]: IPv6 address "2001:700:700:1::21" in config file ignored while running in IPv4 mode.
    Jul 21 12:13:17 localhost pdnsd[25584]: IPv6 address "2001:700:700:1::20" in config file ignored while running in IPv4 mode.
    Jul 21 12:13:17 localhost pdnsd[25584]: IPv6 address "2001:700:700:1::21" in config file ignored while running in IPv4 mode.
    Jul 21 12:13:17 localhost pdnsd[25584]: IPv6 address "2001:700:700:1::20" in config file ignored while running in IPv4 mode.

EDIT: Here's my pdnsds status

Opening socket /var/cache/pdnsd/pdnsd.status
pdnsd-1.2.9a-par running on localhost.

Cache status:
=============
10240 kB maximum disk cache size.
7394811 of 10496000 bytes (70.5%) memory cache used in 29887 entries (avg 247.43 bytes/entry).

Thread status:
==============
server status thread is running.
pdnsd control thread is running.
tcp server thread is running.
udp server thread is running.
900 query threads spawned in total (228 queries dropped).
100 running query threads (40 active, 60 queued).

Configuration:
==============
Global:
-------
	Cache size: 10240 kB
	Server directory: /var/cache/pdnsd
	Scheme file (for Linux pcmcia support): /var/lib/pcmcia/scheme
	Server port: 53
	Server IP (0.0.0.0=any available one): 127.0.0.1
	Ignore cache when link is down: off
	Maximum ttl: 604800
	Minimum ttl: 10800
	Negative ttl: 900
	Negative RRS policy: default
	Negative domain policy: on
	Run as: pdnsd
	Strict run as: on
	Use NSS: on
	Paranoid mode (cache pollution prevention): off
	Control socket permissions (mode): 600
	Maximum parallel queries served: 40
	Maximum queries queued for serving: 60
	Global timeout setting: 10
	Parallel queries increment: 2
	Randomize records in answer: on
	Query method: udp_tcp
	Query port start: 1024
	Query port end: 65535
	TCP server thread: on
	TCP query timeout: 30
	Maximum udp buffer size: 1024
	Delegation-only zones: (none)
Server 0:
------
	label: resolvconf
	ip: 158.36.161.21
	server assumed available: no
	ip: 158.36.161.20
	server assumed available: no
	port: 53
	uptest: if
	timeout: 4
	uptest interval: 10
	ping timeout: 600
	ping ip: (using server ip)
	interface: any
	force cache purging: off
	server is cached: on
	lean query: on
	Use EDNS in outgoing queries: off
	Use only proxy?: on
	Assumed root server: no
	Randomize server query order: no
	Default policy: included
	Policies: (none)
Server 1:
------
	label: resolvconf
	ip: 158.36.161.21
	server assumed available: yes
	ip: 158.36.161.20
	server assumed available: yes
	port: 53
	uptest: none
	timeout: 120
	uptest interval: 900
	ping timeout: 600
	ping ip: (using server ip)
	force cache purging: off
	server is cached: on
	lean query: on
	Use EDNS in outgoing queries: off
	Use only proxy?: off
	Assumed root server: no
	Randomize server query order: no
	Default policy: included
	Policies: (none)
Server 2:
------
	label: (none)
	ip: 158.36.161.21
	server assumed available: yes
	ip: 158.36.161.20
	server assumed available: yes
	port: 53
	uptest: none
	timeout: 120
	uptest interval: 900
	ping timeout: 600
	ping ip: (using server ip)
	force cache purging: off
	server is cached: on
	lean query: on
	Use EDNS in outgoing queries: off
	Use only proxy?: off
	Assumed root server: no
	Randomize server query order: no
	Default policy: excluded
	Policies:
		include: .hioa.no.
Server 3:
------
	label: (none)
	port: 53
	uptest: none
	timeout: 120
	uptest interval: 900
	ping timeout: 600
	ping ip: (using server ip)
	force cache purging: off
	server is cached: on
	lean query: on
	Use EDNS in outgoing queries: off
	Use only proxy?: off
	Assumed root server: no
	Randomize server query order: no
	Default policy: excluded
	Policies:
		include: .ada.hioa.no.
Server 4:
------
	label: (none)
	port: 53
	uptest: none
	timeout: 120
	uptest interval: 900
	ping timeout: 600
	ping ip: (using server ip)
	force cache purging: off
	server is cached: on
	lean query: on
	Use EDNS in outgoing queries: off
	Use only proxy?: off
	Assumed root server: no
	Randomize server query order: no
	Default policy: excluded
	Policies:
		include: .hio.no.
Succeeded

EDIT2: It looks like *a lot* of queries are wasted on searching the domain records.
Here's the output of resolv.conf:

domain hioa.no
search hioa.no ada.hioa.no hio.no
nameserver 127.0.0.1

If I stop dhcpcd and comment out the domain and search path, everything runs smoothly.
How can I avoid having every query also try '*.hioa.no'? When finding a record for 'google.com', how can I avoid looking up 'google.com.hioa.no'

Last edited by simendsjo (2014-07-21 11:23:09)

Offline

Board footer

Powered by FluxBB