You are not logged in.

#1 2013-02-18 02:04:13

snaggletooth84
Member
Registered: 2013-02-12
Posts: 3

[SOLVED] pdnsd fails to bind to tcp or udp socket

Hi
I've got a pretty recent arch install and decided to run pdnsd. I followed the wiki article but when i try to start pdnsd i get:

 

#  pdnsd -s

* 02/17 22:44:23| pdnsd: error: Could not bind tcp socket: Address already in use
* 02/17 22:44:23| pdnsd: error: Could not bind to udp socket: Address already in use
* 02/17 22:44:23| pdnsd: error: tcp and udp initialization failed. Exiting.

same thing happens when i try to start it with

 systemctl start pdnsd

, and starting at boot with

 systemctl enable pdnsd.service

.
these are my permissions for the cache files:

 #  ls -al /var/cache/pdnsd

total 8
drwxrwx--- 2 pdnsd pdnsd 4096 Aug 26 15:20 .
drwxr-xr-x 7 root  root  4096 Feb 17 10:41 ..
-rw-rwx--- 1 pdnsd pdnsd    0 Aug 26 15:20 pdnsd.cache

and my /etc/pdnsd.conf:

global {

	perm_cache=1024;
	cache_dir=/var/cache/pdnsd;
	pid_file = /var/run/pdnsd.pid;
	run_as=pdnsd;
	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;
	strict_setuid=on;
	paranoid=on;       # This option reduces the chance of cache poisoning
	                   # but may make pdnsd less efficient, unfortunately.
	query_method=udp_tcp;
	min_ttl=15m;       # Retain cached entries at least 15 minutes.
	max_ttl=1w;        # One week.
	timeout=9;        # Global timeout option (10 seconds).
	neg_domain_pol=on;
	udpbufsize=1024;   # Upper limit on the size of UDP messages.
#	debug=on;
}

# The following section is most appropriate if you have a fixed connection to
# the Internet and an ISP which provides good DNS servers.
server {
	label= "NET";
	ip = 201.6.2.143,201.6.2.23;  # 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=none;         # Test if the network interface is active.
	interface=em1;    # 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
			   # larger than 512 bytes. May cause trouble with some
			   # legacy systems.
#	exclude=.thepiratebay.org,  # If your ISP censors certain names, you may
#		.thepiratebay.se,   # want to exclude them here, and provide an
#		.piratebay.org,	    # alternative server section below that will
#		.piratebay.se;	    # successfully resolve the names.
}

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

I'd post the debug logs but pdnsd refuses to create them, even with the option uncommented

I've edited /etc/resolv.conf to include the 127.0.0.1 address as the first name server, and created the pdnsd user as instructed by the wiki page. Searching the web i got some very old entries about a conflict with named, which i do not have installed.

Any help would be appreciated, thanks

Last edited by snaggletooth84 (2013-02-18 13:52:58)

Offline

#2 2013-02-18 06:34:48

b4data
Member
Registered: 2010-12-14
Posts: 141

Re: [SOLVED] pdnsd fails to bind to tcp or udp socket

Do you have anything else on port 53? Try running

netstat -lpn | grep 127.0.0.1:53

Last edited by b4data (2013-02-18 06:44:14)

Offline

#3 2013-02-18 11:21:35

snaggletooth84
Member
Registered: 2013-02-12
Posts: 3

Re: [SOLVED] pdnsd fails to bind to tcp or udp socket

Hi b4data

when running as root:

netstat -lpn | grep 127.00.1

i get no output whatsoever

whitout the pipe i get:

 #  netstat -lpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp6       0      0 :::53                   :::*                    LISTEN      360/connmand        
udp        0      0 0.0.0.0:68              0.0.0.0:*                           360/connmand        
udp6       0      0 :::53                   :::*                                360/connmand        
raw6       0      0 :::58                   :::*                    7           432/dhcpcd          
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   PID/Program name     Path
unix  2      [ ACC ]     STREAM     LISTENING     14336    560/libpepflashplay  /tmp/.org.chromium.Chromium.BpgY7A/SingletonSocket
unix  2      [ ACC ]     STREAM     LISTENING     14081    520/enlightenment    /run/user/1000/me@0/:0.0-520|0
unix  2      [ ACC ]     STREAM     LISTENING     13332    1/init               /run/dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     7724     1/init               /run/systemd/private
unix  2      [ ACC ]     STREAM     LISTENING     14056    507/X                @/tmp/.X11-unix/X0
unix  2      [ ACC ]     STREAM     LISTENING     5591     1/init               /run/lvm/lvmetad.socket
unix  2      [ ACC ]     SEQPACKET  LISTENING     5600     1/init               /run/udev/control
unix  2      [ ACC ]     STREAM     LISTENING     5606     1/init               /run/systemd/journal/stdout
unix  2      [ ACC ]     STREAM     LISTENING     14057    507/X                /tmp/.X11-unix/X0
unix  2      [ ACC ]     STREAM     LISTENING     14075    519/dbus-daemon      @/tmp/dbus-fvtw2Xfi7

thanks

Offline

#4 2013-02-18 12:18:23

b4data
Member
Registered: 2010-12-14
Posts: 141

Re: [SOLVED] pdnsd fails to bind to tcp or udp socket

snaggletooth84 wrote:

tcp6       0      0 :::53                   :::*                    LISTEN      360/connmand

https://wiki.archlinux.org/index.php/Connman

Offline

#5 2013-02-18 13:51:52

snaggletooth84
Member
Registered: 2013-02-12
Posts: 3

Re: [SOLVED] pdnsd fails to bind to tcp or udp socket

thanks b4data

after reading the wiki and trying to get connman to play nice i gave up and uninstalled it. pdnsd works fine now.
too bad connman seemed like a nice network manager. thanks again

Offline

#6 2013-07-08 22:44:04

askurihin
Member
Registered: 2012-10-03
Posts: 5

Re: [SOLVED] pdnsd fails to bind to tcp or udp socket

You can try running connmad with -r flag:
-r, --nodnsproxy            Don't enable DNS Proxy

Offline

Board footer

Powered by FluxBB