Fedora42 で pdns-recursor が起動しなくなった話
Fedora42 にアップグレードを行うと、次のエラーで pdns-recursor が起動しなくなった。
# journalctl -xeu pdns-recursor.service
4月 16 13:05:30 kaga.magic-object.com [127752]: 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.
4月 16 13:05:30 kaga.magic-object.com [127752]: msg="Processing main YAML settings" subsystem="config" level="0" prio="Notice" tid="0" ts="1744776330.557" path="/etc/pdns-recursor/recursor.conf"
4月 16 13:05:30 kaga.magic-object.com [127752]: msg="YAML config found, but error occurred processing it" error="invalid type: string \"allow-from=127.0.0.0/8, 192.168.0.0/16, ::1/128\", expected struct Recursorsettings at line 18 column 1" subsystem="config" level="0" prio="Error>
4月 16 13:05:30 kaga.magic-object.com [127752]: msg="Trying to read YAML from .yml or .conf failed, failing back to old-style config read" subsystem="config" level="0" prio="Warning" tid="0" ts="1744776330.558" configname="/etc/pdns-recursor/recursor.conf"
4月 16 13:05:30 kaga.magic-object.com [127752]: msg="Old-style settings syntax not enabled by default anymore. Use YAML or enable with --enable-old-settings on the command line" subsystem="config" level="0" prio="Error" tid="0" ts="1744776330.558" configname="/etc/pdns-recursor/re>
色々と調べてみると設定ファイル「/etc/pdns-recursor/recursor.conf」が ver 5.1 では YAML 形式優先、 ver 5.2 では強制的に YAML 形式と判定されて読み込まれていた結果だった。
参考:PowerDNS Recursor New Style (YAML) Settings
Fedora42 では pdns-recursor は ver 5.2 にアップグレードされた状態だった。
# dnf list installed pdns-recursor
リポジトリの更新を読み込み中:
Adoptium 100% | 13.9 KiB/s | 8.2 KiB | 00m01s
リポジトリを読み込みました。
インストール済みパッケージ
pdns-recursor.x86_64 5.2.0-2.fc42 fedora
「/etc/pdns-recursor/recursor.conf」を YAML 形式に変換
# cd /etc/pdns-recursor/
# rec_control show-yaml recursor.conf > recursor.yml
# mv recursor.conf recursor.conf.old-style
PowerDNS Recursor を再起動
# systemctl restart pdns-recursor


