Closed Napsty closed 2 years ago
Reverted back to PowerDNS 4.3 and with the following config changes from the default in /etc/powerdns/pdns.conf:
allow-axfr-ips=ip.of.slave.1,ip.of.slave.2
api=yes
api-key=secret
default-soa-edit=INCEPTION-INCREMENT
default-soa-mail=dnsadmin.example.com
default-soa-name=ns1.example.com
master=yes
overload-queue-length=4000
webserver=yes
Now DNS UI works again - but with older PowerDNS version. So I guess the problem is not in the DNSUI database?
Update: I'm able to reproduce this in a TEST environment with:
As soon as I import the powerdns database from PROD to TEST, the same errors appear in DNS UI. So the source of the problem is definitely in the PowerDNS database.
Was able to find the issue.
There were indeed some malformed characters returned from the API (/api/v1/servers/localhost/zones). The reason for it was that the database content was saved in latin1:
mysql> SELECT DISTINCT table_name,table_collation FROM information_schema.tables WHERE table_schema = "powerdns" LIMIT 0,15;
+----------------+-------------------+
| table_name | table_collation |
+----------------+-------------------+
| comments | latin1_swedish_ci |
| cryptokeys | latin1_swedish_ci |
| domainmetadata | latin1_swedish_ci |
| domains | latin1_swedish_ci |
| records | latin1_swedish_ci |
| supermasters | latin1_swedish_ci |
| tsigkeys | latin1_swedish_ci |
+----------------+-------------------+
7 rows in set (0.00 sec)
After converting to UTF8:
mysqldump --add-drop-table powerdns | replace CHARSET=latin1 CHARSET=utf8 | iconv -f latin1 -t utf8 | mysql powerdns
... it works again!
Glad you managed to get it sorted out!
Hello!
After upgrading PowerDNS from 4.2 to 4.5, I suddenly am unable to view the zones in DNS UI (current master version).
/zones
and/users/username
shows:The apache error logs shows:
When trying to view a user in the UI, the following queries happen on the dnsui database in PostgreSQL:
Maybe this helps to rule out some parts already.
My current idea is that something in the database might have some characters which cannot be decoded properly by the JSON Decoder and then throws the error. Or is the JSON Decoder failing on data from the PDNS API?
Any ideas?