You are not logged in.

#1 2013-05-07 20:20:37

Torxed
Member
Registered: 2013-01-10
Posts: 125

[SOLVED] PowerDNS (pdns) - SQLite database '...' does not exist yet

PowerDNS 3.2-5 is having some issues connecting to my backend database (sqlite3).

beta powerdns # tail /var/log/errors.log

May  7 20:12:41 localhost pdns[19098]: Caught an exception instantiating a backend: Unable to launch gsqlite3 connection: SQLite database '/etc/powerdns/database.sqlite' does not exist yet

But when i do:

beta powerdns # sqlite3 /etc/powerdns/database.sqlite
SQLite version 3.7.16.2 2013-04-12 11:52:43
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select * from domains;
1|<myhostname>|||NATIVE||
sqlite>

sqlite3 It fetches the records and domains to my liking but not PowerDNS.
Same thing goes for a blank db without any domains or records, i can query it but not PowerDNS.

Followed this guide in order to setup the proper tables and columns: http://doc.powerdns.com/html/gsqlite.html#idp9379264
(without the DNSSEC part, i'll give that a go later on)

It obviously loads the sqlite3 module, and tries to connect to the backend, which doesn't work, so the ArchLinux package is fine i'm guessing.


More info:

* Link to package: https://www.archlinux.org/packages/comm … 6_64/pdns/
* chmod == 777
* chown == nobody:nobody (and tried root:root as default)
* running as root (not pdns)

Last edited by Torxed (2013-05-08 10:52:05)

Offline

#2 2013-05-08 10:51:52

Torxed
Member
Registered: 2013-01-10
Posts: 125

Re: [SOLVED] PowerDNS (pdns) - SQLite database '...' does not exist yet

Solved it.
The guides are vague in this regard but once you've just read the config twice you'll understand the logic.

First of all, no absolute paths for sqlite3, it should be:

launch=gsqlite3
gsqlite3-database=database.sqlite

Secondly, find your chroot, and point it to your database location or put your database here (whichever):

chroot=/var/empty

The folder structure should be:

/var/empty/database.sqlite

And this py pointing to ./database.sqlite when starting sqlite3 in pdns, it should be able to lock on to the database.
Peachy!

Offline

Board footer

Powered by FluxBB