<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Pius,<div class=""><br class=""></div><div class="">Have you checked the permissions on the database and the path? </div><div class=""><br class=""></div><div class="">Frank</div><div class=""><br class=""></div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 14 Jan 2021, at 05:07, Pius Nganga via dnsdist <<a href="mailto:dnsdist@mailman.powerdns.com" class="">dnsdist@mailman.powerdns.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family: "comic sans ms", sans-serif; font-size: small;">We are using zvelodb to do an url lookup inside pdns recursor's preresolve function. We are executing a terminal command using io.popen as follows;</div><div class="gmail_default" style="font-family: "comic sans ms", sans-serif; font-size: small;"><br class=""></div><div class="gmail_default" style="font-family: "comic sans ms", sans-serif; font-size: small;">f = io.popen("c-api-tool -l "..dq.qname:toString()) -- runs command<br class=""> l = f:read("*a") -- read output of command<br class=""> f:close()<br class=""> print(l)</div><div class="gmail_default" style="font-family: "comic sans ms", sans-serif; font-size: small;"><br class=""></div><div class="gmail_default" style="font-family: "comic sans ms", sans-serif; font-size: small;">Running the above command outside of the preresolve function prints the expected outcome which is 'domainname category'.<br class=""><br class=""></div><div class="gmail_default" style="font-family: "comic sans ms", sans-serif; font-size: small;">When the command is inside the preresolve function it prints 'url_init: unable to open database'<br class=""></div><div class="gmail_default" style="font-family: "comic sans ms", sans-serif; font-size: small;">Has anyone encountered this before and how do we solve this?<br class=""></div><div class="gmail_default" style="font-family: "comic sans ms", sans-serif; font-size: small;"><br class=""></div></div>
_______________________________________________<br class="">dnsdist mailing list<br class=""><a href="mailto:dnsdist@mailman.powerdns.com" class="">dnsdist@mailman.powerdns.com</a><br class=""><a href="https://mailman.powerdns.com/mailman/listinfo/dnsdist" class="">https://mailman.powerdns.com/mailman/listinfo/dnsdist</a><br class=""></div></blockquote></div><br class=""></div><div class=""><div class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: "Avenir Next"; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">Frank Louwers<br class="">PowerDNS Certified Consultant @ <a href="http://Kiwazo.be" class="">Kiwazo.be</a><br class=""><br class=""></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: "Avenir Next"; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br class=""></div><br class="Apple-interchange-newline"></div></div><br class="Apple-interchange-newline"></div></div></body></html>