首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >PowerDNS为所有请求返回ServFail

PowerDNS为所有请求返回ServFail
EN

Unix & Linux用户
提问于 2016-01-22 23:39:37
回答 1查看 2.9K关注 0票数 0

我一直在努力让PowerDNS在最新的CentOS 7 x64上运行。

除了Nginx之外,所有内容都遵循本指南,因为我正在使用Apache:https://www.rosehosting.com/blog/install-powerdns-and-on-a-centos-7-vps/

防火墙被禁用。SELinux被设置为仅监视。

下面是我的数据库,请注意,PowerDNS的web管理工作得很好。

但是,在任何dig尝试中,我都会失败。请参阅下面的数据库输出和pdns conf。

请帮我弄清楚是怎么回事!

注意,我使用了BIND,它运行得很好,但是我想要一个数据库驱动的DNS系统,所以我试图让PDNS工作。绑定在这些测试期间停止,从netstat输出可以看到这一点。

版本:

代码语言:javascript
复制
# pdns_control version
3.4.7

数据库信息:

代码语言:javascript
复制
MariaDB [powerdns]> show tables;
+--------------------+
| 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;
+----+----------------------+--------+------------+--------+-----------------+---------+
| id | name                 | master | last_check | type   | notified_serial | account |
+----+----------------------+--------+------------+--------+-----------------+---------+
|  2 | example.com          | NULL   |       NULL | MASTER |            NULL | NULL    |
+----+----------------------+--------+------------+--------+-----------------+---------+

MariaDB [powerdns]> select * from records;
+----+-----------+------------------+------+--------------------------------------------------------------------------+-------+------+-------------+
| 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    |                                                                          | 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 |
+----+-----------+------------------+------+--------------------------------------------------------------------------+-------+------+-------------+

任何记录的挖掘输出:

代码语言:javascript
复制
# dig @127.0.0.1
; <<>> 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

PDNS Config:

代码语言:javascript
复制
# nano /etc/pdns/pdns.conf:
setuid=pdns
setgid=pdns
launch=gmysql
gmysql-host=localhost
gmysql-user=powerdns
gmysql-password=lolololol
gmysql-dbname=powerdns

NETSTAT产出:

代码语言:javascript
复制
# netstat -tap
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

# netstat -uap
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
EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2016-01-24 00:49:42

我设置了一个syslog服务器来检查日志,发现如下: Jan 23 18:15:09 s01 pdns27536:后端错误: GSQLBackend查找查询:执行mysql_query失败,可能连接失效了?Err=1:“字段列表”中的未知列“禁用”

这导致一种建议,即所使用的数据库架构可能不正确。我删除了所有表,并从下面的这两个页面导入了部分MySQL模式,然后重新启动pdns服务,它就可以工作了!https://github.com/poweradmin/poweradmin/blob/master/sql/poweradmin-mysql-db-structure.sql https://doc.powerdns.com/md/authoritative/installation/

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/257126

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档