PowerDNSは、すべての要求に対してServFailを返します。

PowerDNSは、すべての要求に対してServFailを返します。

私は最新のCentOS 7 x64でPowerDNSを実行する作業をしてきました。

私はApacheを使用しているので、Nginxを除くすべての項目についてこのガイドに従ってください。https://www.rosehosting.com/blog/install-powerdns-and-on-a-centos-7-vps/

ファイアウォールが無効になっています。 SELinuxは監視専用に設定されています。

以下は私のデータベースです。 PowerDNSのWeb管理は正常に動作します。

digしかし、どんな試みでもサービス障害が発生します。以下のデータベース出力とpdns confを参照してください。

問題を特定するのに役立ちます!

私はうまく動作するBINDを使用していますが、データベースベースのDNSシステムが欲しいので、PDNSを動作させようとしています。 netstat出力からわかるように、このテスト中にBINDが停止しました。

バージョン:

# pdns_control version
3.4.7

データベース情報:

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 [email protected] 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 |
+----+-----------+------------------+------+--------------------------------------------------------------------------+-------+------+-------------+

すべてのレコードマイニング用のDIG出力:

# 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構成:

# nano /etc/pdns/pdns.conf:
setuid=pdns
setgid=pdns
launch=gmysql
gmysql-host=localhost
gmysql-user=powerdns
gmysql-password=lolololol
gmysql-dbname=powerdns

NETSTAT出力:

# 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

ベストアンサー1

ログを表示するためにsyslogサーバーを設定し、次のものが見つかりました。 Jan 23 18:15:09 s01 pdns[27536]: バックエンドエラー: GSQLBackend Lookup query:Failed to 実行 mysql_query, Maybe 接続が失われましたか?フィールドリストの「無効化」列

これにより、推奨データベーススキーマが潜在的に正しくない可能性があります。すべてのテーブルを削除し、以下の2ページからMySQLスキーマの一部をインポートし、pdnsサービスを再起動しましたが、うまくいきました! https://github.com/poweradmin/poweradmin/blob/master/sql/poweradmin-mysql-db-struct.sql https://doc.powerdns.com/md/authoritative/installation/

おすすめ記事