PowerDNS slave server not working

I am trying to configure a slave server (using PowerDNS 3.02 on FreeBSD 9.0) within a jail. I have created a named.conf file with zones like:

Code:
zone "domainname.com" IN {
    type slave;
    file "/usr/local/etc/pdns/config/zones/domainname.com";
    masters { 192.168.0.1; };
};

Note: The "192.168.0.1" is the other master PowerDNS server and is working fine.

I tried to query it using nslookup domainname.com [IP address to the slave server] and it does not work. (The same query to the master works, however.)

What is wrong with the configuration? Or, what else needs to be done?

Thanks!
 
Hi,

Please post your complete pdns.conf - right now we don't even know if PowerDNS is using the right backend (bindbackend) to pick up named.conf. Also, your syslog will show a successful or failed zone transfer once you have this configuration in place. Please check if you see anything there.
 
My complete pdns.conf is (yup, I deleted all the unnecessary lines to keep it short):

Code:
local-address=192.168.53.2
launch=bind
bind-config=/usr/local/etc/pdns/config/named.conf
One of the zones is:

Code:
zone "codeperfectlabs.com" IN {
    type slave;
    file "/usr/local/etc/pdns/config/zones/codeperfectlabs.com";
    masters { 192.168.53.1; };
};
I've verified all the paths again, and they are all correct.

Shouldn't it query the master automatically and all those zones will be written in the directory? --- It doesn't happen.

pdns_server is running as root, and the directory has the proper write permission.

===================================

If there is nothing wrong with that, then I think it is the firewall...
 
In order to get the logs, I added to pdns.conf:
Code:
logging-facility=0
and to syslog.conf at the end of the file (last line at the very bottom):
Code:
local0	/var/log/pdns.log
The strange thing is that no files have been created at /var/log/pdns.log.

Then, I looked at /var/log/messages, and found the errors for all the domains. Here's a sample:
Code:
Feb 24 18:08:22 dns2 pdns[2227]: [bindbackend] error at Fri Feb 24 18:08:22 2012 parsing 'codeperfectlabs.com
' from file '/usr/local/etc/pdns/config/zones/codeperfectlabs.com': Unable to open file '/usr/local/etc/pdns/
config/zones/codeperfectlabs.com': No such file or directory
So, I went into the directory and did a
[cmd=]touch codeperfectlabs.com[/cmd] for all the domains.

I then did an ls and all the files show "0" byte as the size.

I then restarted the jail, went back to /var/log/messages file and got at this:
Code:
Feb 24 18:18:56 dns2 pdns[2761]: PowerDNS 3.0 (C) 2001-2011 PowerDNS.COM BV (Dec 11 2011, 03:18:37, gcc 4.2.1
 20070831 patched [FreeBSD]) starting up
Feb 24 18:18:56 dns2 pdns[2761]: PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you a
re welcome to redistribute it according to the terms of the GPL version 2.
Feb 24 18:18:56 dns2 pdns[2761]: Creating backend connection for TCP
Feb 24 18:18:56 dns2 pdns[2761]: [bindbackend] Parsing 6 domain(s), will report when done
Feb 24 18:18:56 dns2 pdns[2761]: [bindbackend] Done parsing domains, 0 rejected, 6 new, 0 removed
Feb 24 18:18:56 dns2 pdns[2761]: About to create 3 backend threads for UDP
Feb 24 18:18:56 dns2 pdns[2761]: Done launching threads, ready to distribute questions

Still, I tried a query to the server. IT DOES NOT WORK! I checked the files again and they are still "0" bytes in size.

What's wrong with my [PowerDNS slave server] setup?
 
I put in
Code:
slave=yes
and then I got this error in the log:
Code:
Communicator thread died because of STL error:
I did some research and seems like PowerDNS needs IPv6 to be enabled.

Anyway, thanks for your help, but I think for now I'll just point 2 IP addresses to the same master server. In future, when I need to configure additional servers, I'll come back to tackle this issue again. Thanks!
 
Back
Top