FS#38014 - [pdnsd] Doesn't work after suspend or restart

Attached to Project: Community Packages
Opened by t-ask (tAsk) - Wednesday, 04 December 2013, 19:11 GMT
Last edited by Sergej Pupykin (sergej) - Thursday, 05 December 2013, 14:47 GMT
Task Type Support Request
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I'm not sure if this is a bug or just my fault:

Description:
I have a strange situation with pdnsd. If I restart my system pdnsd starts without error but it doesn't resolves IPs. If I restart it with "systemctl restart pdnsd" everythign works fine. The same effect happens if I suspend my PC and wake it up again. Often I have to restart pdnsd.


Additional info:

* PDNS version: pdnsd - dns proxy daemon, version 1.2.9a-pa

* Config:

global {
perm_cache=1024;
cache_dir="/var/cache/pdnsd";
run_as="pdnsd";
strict_setuid = on;
server_ip = 127.0.0.1; # Use eth0 here if you want to allow other
# machines on your network to query pdnsd.
status_ctl = on;
query_method=udp_tcp;
min_ttl=6h; # Retain cached entries at least 15 minutes.
max_ttl=2w; # One week.
timeout=10; # Global timeout option (10 seconds).
neg_domain_pol=on;
udpbufsize=1024; # Upper limit on the size of UDP messages.
neg_rrs_pol=on; # Cache result even if resonse ist negative
par_queries=2; # How many DNS servers should queried the same time
}

server {
label= "myisp";
ip = 192.168.1.1; # Put your ISP's DNS-server address(es) here.
proxy_only=on; # Do not query any name servers beside your ISP's.
# This may be necessary if you are behind some
# kind of firewall and cannot receive replies
# from outside name servers.
timeout=4; # Server timeout; this may be much shorter
# that the global timeout option.
uptest=if; # Test if the network interface is active.
interface=eth0; # The name of the interface to check.
interval=10m; # Check every 10 minutes.
purge_cache=off; # Keep stale cache entries in case the ISP's
# DNS servers go offline.
edns_query=yes; # Use EDNS for outgoing queries to allow UDP messages
}

source {
owner=localhost;
file="/etc/hosts";
}

rr {
name=localhost;
reverse=on;
a=127.0.0.1;
owner=localhost;
soa=localhost,root.localhost,42,86400,900,86400,86400;
}


Config "pdnsd.service":

[Unit]
Description=proxy name server
After=network.target

[Service]
ExecStart=/usr/bin/pdnsd

[Install]
WantedBy=multi-user.target


Logging:

$ systemctl status pdnsd
pdnsd.service - proxy name server
Loaded: loaded (/usr/lib/systemd/system/pdnsd.service; enabled)
Active: active (running) since Mi 2013-12-04 18:48:07 CET; 59min ago
Main PID: 11786 (pdnsd)
CGroup: /system.slice/pdnsd.service
└─11786 /usr/bin/pdnsd

Dez 04 18:48:07 australia systemd[1]: Started proxy name server.
Dez 04 18:48:07 australia pdnsd[11786]: * 12/04 18:48:07| pdnsd: info: pdnsd-1.2.9a-par starting.



Test:

$ dig google.com

; <<>> DiG 9.9.2-P2 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20477
;; flags: qr rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1024
;; QUESTION SECTION:
;google.com. IN A

;; ANSWER SECTION:
google.com. 18 IN A 64.15.112.151
google.com. 18 IN A 64.15.112.154
google.com. 18 IN A 64.15.112.148
google.com. 18 IN A 64.15.112.149
google.com. 18 IN A 64.15.112.150
google.com. 18 IN A 64.15.112.153
google.com. 18 IN A 64.15.112.152
google.com. 18 IN A 64.15.112.155

;; Query time: 13 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Wed Dec 4 20:01:43 2013
;; MSG SIZE rcvd: 167


Steps to reproduce:

* Rebooting system --> 99% I have to manually restart pdnsd
* Suspend --> 50% I have to manually restart pdnsd


This task depends upon

Closed by  Sergej Pupykin (sergej)
Thursday, 05 December 2013, 14:47 GMT
Reason for closing:  Not a bug
Comment by Sergej Pupykin (sergej) - Thursday, 05 December 2013, 14:47 GMT
The reason is pdnsd binds to each network interface separately. Adjust .service file to start pdnsd after specific network interface is up.

You can check what pdnsd listens using this command:

netstat -lnp | grep pdnsd

Loading...