Debianをアップグレードしたら
PowerDNSが動かない
Dbian 7.0 Wheezy
Package: pdns-server
Source: pdns
Version: 3.1-4
アップグレードしたら、動かなくなっちゃった(∀`*ゞ)テヘッ
どうもおかしいのでログを見たら・・・
May 5 23:42:08 dns pdns[3520]: Guardian is launching an instance May 5 23:42:08 dns pdns[3520]: Reading random entropy from '/dev/urandom' May 5 23:42:08 dns pdns[3520]: This is module gmysqlbackend.so reporting May 5 23:42:08 dns pdns[3520]: This is a guarded instance of pdns May 5 23:42:08 dns pdns[3520]: Fatal error: Trying to set unexisting parameter 'bind-config' May 5 23:42:09 dns pdns[3505]: Our pdns instance exited with code 1 May 5 23:42:09 dns pdns[3505]: Respawning
動いてねーw
さて、設定ファイルを覗いてみると
# cat /etc/powerdns/pdns.d/pdns.simplebind launch=bind bind-config=/etc/powerdns/bindbackend.conf
僕の場合はBIND使ってないですので、コメントアウトで対応。
(これってBINDの設定ファイルを指定したら動くのかしら・・・?)
# vi /etc/powerdns/pdns.d/pdns.simplebind #launch=bind #bind-config=/etc/powerdns/bindbackend.conf
この「pdns.simplebind」、
日付を見ると、アップグレードしたタイミングで作られたっぽい?
さて、これで動くかなと思い、起動させてみると、
次は、
May 6 00:31:17 dns pdns[4638]: About to create 3 backend threads for UDP May 6 00:31:17 dns pdns[4638]: gmysql Connection failed: Unable to connect to database: Access denied for user 'pdns'@'localhost' (using password: YES) May 6 00:31:17 dns pdns[4638]: Caught an exception instantiating a backend, cleaning up May 6 00:31:17 dns pdns[4638]: gmysql Connection failed: Unable to connect to database: Access denied for user 'pdns'@'localhost' (using password: YES)
あれ。。。
MYSQLの設定が変わってる・・??
ディレクトリを覗いてみると、
# ll total 20 drwx------ 2 root root 4096 May 6 00:33 . drwxr-xr-x 3 root root 4096 May 6 00:29 .. -rw------- 1 root root 187 Apr 30 2012 pdns.local -rw-r----- 1 pdns root 214 May 6 00:33 pdns.local.gmysql -rw-r--r-- 1 root root 57 May 6 00:31 pdns.simplebind
「pdns.local.gmysql」
というファイルができてる。
# cat pdns.local.gmysql # MySQL Configuration # # Launch gmysql backend launch=gmysql # gmysql parameters gmysql-host=localhost gmysql-port= gmysql-dbname=pdns gmysql-user=pdns gmysql-password=O3VIYeI gmysql-dnssec=yes # gmysql-socket=
あー・・・
こんなの書いた覚えないぞ。。。w
僕は、「pdns.local」というファイルに設定を書いていたので、
「pdns.local.gmysql」に正しい設定に書き換えました。
で、「pdns.local」は使わないので全部コメントアウトしておきました。
「pdns.local.gmysql」をきちんと設定すると、動くようになったーー
May 6 00:33:16 dns pdns[4634]: Scheduling exit on remote request May 6 00:33:17 dns pdns[4634]: Guardian is killed, taking down children with us May 6 00:33:17 dns pdns[4675]: Listening on controlsocket in '/var/run/pdns.controlsocket' May 6 00:33:17 dns pdns[4679]: Guardian is launching an instance May 6 00:33:17 dns pdns[4679]: Reading random entropy from '/dev/urandom' May 6 00:33:17 dns pdns[4679]: This is module gmysqlbackend.so reporting May 6 00:33:17 dns pdns[4679]: This is a guarded instance of pdns May 6 00:33:17 dns pdns[4679]: It is advised to bind to explicit addresses with the --local-address option May 6 00:33:17 dns pdns[4679]: UDP server bound to 0.0.0.0:53 May 6 00:33:17 dns pdns[4679]: PowerDNS 3.1 (C) 2001-2012 PowerDNS.COM BV (Jun 28 2012, 21:22:51, gcc 4.7.0) starting up May 6 00:33:17 dns pdns[4679]: PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2. May 6 00:33:17 dns pdns[4679]: About to create 3 backend threads for UDP May 6 00:33:17 dns pdns[4679]: gmysql Connection successful May 6 00:33:17 dns pdns[4679]: gmysql Connection successful May 6 00:33:18 dns pdns[4679]: gmysql Connection successful May 6 00:33:18 dns pdns[4679]: gmysql Connection successful May 6 00:33:18 dns pdns[4679]: gmysql Connection successful May 6 00:33:18 dns pdns[4679]: gmysql Connection successful May 6 00:33:18 dns pdns[4679]: Done launching threads, ready to distribute questions May 6 00:33:30 dns pdns[4679]: Should not get here (www.neko6.info|1): please run pdnssec rectify-zone neko6.info
おい。おい。
次は、DNSSECかい。。。
どうやらDNSSEC使う設定だと、名前解決出来ないみたい。
ヘタレなので、DNESECは使わない方向で。。。。
# MySQL Configuration # # Launch gmysql backend launch=gmysql # gmysql parameters gmysql-host=localhost gmysql-port= gmysql-dbname=pdns gmysql-user=pdns gmysql-password=O3VIYeI gmysql-dnssec=no # gmysql-socket=
解決できるかなー
# dig @8.8.8.8 www.neko6.info ; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> @8.8.8.8 www.neko6.info ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12278 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;www.neko6.info. IN A ;; ANSWER SECTION: www.neko6.info. 119 IN A 202.212.90.234 ;; Query time: 372 msec ;; SERVER: 8.8.8.8#53(8.8.8.8) ;; WHEN: Mon May 6 00:56:35 2013 ;; MSG SIZE rcvd: 46
やっとうごいた。
[tegaki]よかったよかった[/tegaki]