LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-23-2016, 02:53 PM   #1
kyferez
LQ Newbie
 
Registered: Jan 2016
Posts: 2

Rep: Reputation: Disabled
CentOS7 x64 PowerDNS 3.4.7 returns ServFail for all requests


CentOS 7 x64 is up to date. EPEL repository has been added and all packages updated.

Followed the following guide for everything except Nginx because I had Apache already running: https://www.rosehosting.com/blog/ins...-centos-7-vps/

Firewall is disabled. Selinux is set to monitor only.

Below is my database and do note that the web management for powerdns works just fine.

However I get servfail on any dig attempt. See database output and pdns conf below.

Please help me figure out what is wrong! Note that I was using BIND and it was working perfectly but I want a database driven DNS system so am trying to get PDNS working. BIND is stopped during these tests as you can see from the netstat output.

MariaDB [powerdns]> show tables;
Code:
+--------------------+
| Tables_in_powerdns |
+--------------------+
| domains            |
| migrations         |
| perm_items         |
| perm_templ         |
| perm_templ_items   |
| records            |
| records_zone_templ |
| supermasters       |
| users              |
| zone_templ         |
| zone_templ_records |
| zones              |
+--------------------+
MariaDB [powerdns]> select * from domains;
Code:
+----+----------------------+--------+------------+--------+-----------------+---------+
| id | name                 | master | last_check | type   | notified_serial | account |
+----+----------------------+--------+------------+--------+-----------------+---------+
|  2 | example.com | NULL   |       NULL | MASTER |            NULL | NULL    |
+----+----------------------+--------+------------+--------+-----------------+---------+
MariaDB [powerdns]> select * from records;
Code:
+----+-----------+------------------+------+------------------------------------------------------------------------------------------+-------+------+-------------+
| id | domain_id | name             | type | content                                                                                  | ttl   | prio | change_date |
+----+-----------+------------------+------+------------------------------------------------------------------------------------------+-------+------+-------------+
|  5 |         2 | example.com      | SOA  | ns1.example.com noreply@example.com 2016012205 28800 7200 604800 86400                   | 86400 |    0 |  1453430301 |
|  6 |         2 | example.com      | A    | 123.123.123.123                                                                          | 86400 |    0 |  1453430985 |
|  7 |         2 | mail.example.com | A    | 123.123.123.123                                                                          | 86400 |    0 |  1453430985 |
|  8 |         2 | ns1.example.com  | A    | 123.123.123.123                                                                          | 86400 |    0 |  1453430985 |
+----+-----------+---------------------------+------+------------------------------------------------------------------------------------------+-------+------+-------------+
[root@s01 admin]# dig @127.0.0.1
Code:
; <<>> DiG 9.9.4-RedHat-9.9.4-29.el7_2.1 <<>> @127.0.0.1
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 3023
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1680
;; QUESTION SECTION:
;.                              IN      NS
;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Jan 22 18:10:21 EST 2016
;; MSG SIZE  rcvd: 28
[root@s01 /]# dig example.com @localhost
Code:
; <<>> DiG 9.9.4-RedHat-9.9.4-29.el7_2.1 <<>> example.com @localhost
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 62343
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

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

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Jan 22 19:16:29 EST 2016
;; MSG SIZE  rcvd: 49
[root@s01 /]# dig 123.123.123.123 @localhost
Code:
; <<>> DiG 9.9.4-RedHat-9.9.4-29.el7_2.1 <<>> 123.123.123.123 @localhost
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 48927
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1680
;; QUESTION SECTION:
;123.123.123.123.               IN      A

;; Query time: 4 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Jan 22 19:15:17 EST 2016
;; MSG SIZE  rcvd: 44
[root@s01 /]# nslookup example.com localhost
Code:
;; Got SERVFAIL reply from 127.0.0.1, trying next server
;; connection timed out; trying next origin
;; Got SERVFAIL reply from 127.0.0.1, trying next server
PDNS /etc/pdns/pdns.conf:
Code:
setuid=pdns
setgid=pdns
#launch=bind
launch=gmysql
gmysql-host=localhost
gmysql-user=powerdns
gmysql-password=lolololol
gmysql-dbname=powerdns
[root@s01 admin]# netstat -tap
Code:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 localhost:cslistener    0.0.0.0:*               LISTEN      950/php-fpm: master
tcp        0      0 0.0.0.0:mysql           0.0.0.0:*               LISTEN      1783/mysqld
tcp        0      0 0.0.0.0:ndmp            0.0.0.0:*               LISTEN      2561/perl
tcp        0      0 0.0.0.0:domain          0.0.0.0:*               LISTEN      12283/pdns_server
tcp        0      0 0.0.0.0:8822            0.0.0.0:*               LISTEN      1233/sshd
tcp        0      0 localhost:smtp          0.0.0.0:*               LISTEN      1826/master
tcp6       0      0 [::]:http               [::]:*                  LISTEN      900/httpd
tcp6       0      0 [::]:8821               [::]:*                  LISTEN      15532/vsftpd
tcp6       0      0 [::]:8822               [::]:*                  LISTEN      1233/sshd
tcp6       0      0 localhost:smtp          [::]:*                  LISTEN      1826/master
[root@s01 admin]# netstat -uap
Code:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
udp        0      0 0.0.0.0:ndmp            0.0.0.0:*                           2561/perl
udp        0      0 0.0.0.0:domain          0.0.0.0:*                           12283/pdns_server
udp        0      0 0.0.0.0:bootpc          0.0.0.0:*                           1028/dhclient
udp        0      0 localhost:323           0.0.0.0:*                           621/chronyd
udp        0      0 0.0.0.0:13651           0.0.0.0:*                           1028/dhclient
udp6       0      0 localhost:323           [::]:*                              621/chronyd
udp6       0      0 [::]:50691              [::]:*                              1028/dhclient
 
Old 01-23-2016, 06:51 PM   #2
kyferez
LQ Newbie
 
Registered: Jan 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
Resolved!

I setup a syslog server to review logs and found this: Jan 23 18:15:09 s01 pdns[27536]:
Code:
Backend error: GSQLBackend lookup query:Failed to execute mysql_query, perhaps connection died? Err=1: Unknown column 'disabled' in 'field list'
This lead to a suggestion that the database schema used may be incorrect. I dropped all tables and imported the partial MySQL schemas from these two pages below and restarted pdns service and it works!
https://github.com/poweradmin/powera...-structure.sql
https://doc.powerdns.com/md/authoritative/installation/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FFMPEG for APACHE 2.4.6 (x64), PHP 5.5 (x64), MYSQL 5.6 (x64) on WINDOWS 8 (x64) Punctual Programming 3 08-07-2013 05:20 PM
[SOLVED] PowerDNS Servfail Khaosmaker Linux - Networking 3 05-21-2012 02:12 AM
Newbie looking to dual-boot Gloria x64 into a box already running Windows 7 x64 joshuaingram Linux - Newbie 1 12-17-2009 05:48 PM
bind9 - dig -x returns - status: SERVFAIL eliufoo Linux - Server 4 05-19-2008 10:29 AM
can i run linux mandriver x64 with windows x64 bit if so wich one should i install fi malmac2000 Linux - Software 2 04-26-2006 07:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration