<html><head></head><body>   <div dir="auto">Hey Vinicius,</div><div dir="auto"><br></div><div dir="auto">The issue here is that for the .conf file, the naming format is different — you want to use ‘lua-config-file’, not ‘lua_config_file’.</div><div dir="auto"><br></div><div dir="auto">Additionally, for the YAML settings (preferred), the way to set that configuration flag is via a nested property, not with dot notation. So instead of using ‘recursor.lua_config_file=…”, you want to structure it like the other settings —</div><div dir="auto"><br></div><div dir="auto">recursor:</div><div dir="auto">    lua_config_file: …</div><div dir="auto"><br></div><div dir="auto">For more info, check the YAML settings docs: <a href="https://docs.powerdns.com/recursor/yamlsettings.html" dir="auto">https://docs.powerdns.com/recursor/yamlsettings.html</a></div><div dir="auto"><br></div><div dir="auto">Tim</div><div><br></div>On Fri, Jun 14, 2024 at 8:37 AM, vinicius goncalves via Pdns-users <<a class="" href="mailto:On Fri, Jun 14, 2024 at 8:37 AM, vinicius goncalves via Pdns-users <<a href=">pdns-users@mailman.powerdns.com</a>> wrote:<blockquote type="cite" class="protonmail_quote">  <div dir="ltr">Hi,<br><br>I am trying to use the lua_config_file option, but every time I try to execute the pdns_recursor command, it returns an error. I tried using both the .conf and .yaml configuration files, and both returned errors which I detail below. When I try to start the service using the 'service' command, the service starts but does not respond to DNS queries. When I try to stop the service with the command 'service pdns-recursor stop', the service does not terminate. I noticed that when I remove the lua_config_file configuration, the service starts and I can perform queries without difficulty, and stopping the service with 'service pdns-recursor stop' also works normally.<br><br>I thought the problem might be the LUA configuration file, but the file only contains a comment.<br><br><br>#FILE LUA#<br>--zoneToCache(".", "url", "<a href="https://www.internic.net/domain/root.zone">https://www.internic.net/domain/root.zone</a>", { refreshPeriod=86400})zoneToCache(".", "u<br>#FILE LUA#<br><br><br><br>OS-VERSION:FreeBSD 14.0-RELEASE #0 releng/14.0-n265380-f9716eee8ab4: Fri Nov 10 05:57:23 UTC 2023     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC<br><br>VERSION POWERDNS RECURSOR:PowerDNS Recursor 5.0.4<br><br>Using 64-bits mode. Built using clang 16.0.6 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a> llvmorg-16.0.6-0-g7cbf1a259152) on Apr 30 2024 01:23:16 by root@140amd64-quarterly-job-35.<br><br>Configured with: " '--sysconfdir=/usr/local/etc/pdns' '--with-libsodium=no' '--with-service-user=pdns' '--with-service-group=pdns_recursor' '--without-net-snmp' '--without-systemd' '--disable-dnstap' '--prefix=/usr/local' '--localstatedir=/var' '--mandir=/usr/local/share/man' '--disable-silent-rules' '--infodir=/usr/local/share/info/' '--build=amd64-portbld-freebsd14.0' 'build_alias=amd64-portbld-freebsd14.0' 'CC=cc' 'CFLAGS=-O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing ' 'LDFLAGS=  -fstack-protector-strong -L/usr/local/lib ' 'LIBS=' 'CPPFLAGS=-isystem /usr/local/include' 'CXX=c++' 'CXXFLAGS=-O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include ' 'PKG_CONFIG=pkgconf' 'PKG_CONFIG_LIBDIR=/wrkdirs/usr/ports/dns/powerdns-recursor/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig' 'PYTHON=/usr/local/bin/python3.9'"<br><br>#Config YAML#<br>incoming:<br>  allow_from:<br>  - <a href="http://127.0.0.0/8">127.0.0.0/8</a><br>  - <a href="http://10.0.0.0/8">10.0.0.0/8</a><br>  - <a href="http://169.254.0.0/16">169.254.0.0/16</a><br>  - <a href="http://192.168.0.0/16">192.168.0.0/16</a><br>  - <a href="http://172.16.0.0/12">172.16.0.0/12</a><br>  listen:<br>  - <a href="http://0.0.0.0:53">0.0.0.0:53</a><br>outgoing:<br>  source_address:<br>    - 0.0.0.0<br><br>recursor.lua_config_file:<br> - 'advanced.lua'<br>#end of config YAML#<br><br>#ERROR#<br>Jun 14 11:22:41 msg="YAML config found, but error occurred processsing it" error="unknown field `recursor.lua_config_file`, expected one of `dnssec`, `incoming`, `recursor`, `webservice`, `carbon`, `outgoing`, `packetcache`, `logging`, `ecs`, `recordcache`, `nod`, `snmp` at line 22 column 1" subsystem="config" level="0" prio="Error" tid="0" ts="1718374961.771" configname="/usr/local/etc/pdns/recursor.yml"<br>#END ERROR#<br><br>#Config .conf#<br>allow-from=<a href="http://127.0.0.0/8">127.0.0.0/8</a>, <a href="http://10.0.0.0/8">10.0.0.0/8</a>, <a href="http://169.254.0.0/16">169.254.0.0/16</a>, <a href="http://192.168.0.0/16">192.168.0.0/16</a>, <a href="http://172.16.0.0/12">172.16.0.0/12</a>, <br><br>local-address=186.237.0.13, 10.10.10.13, 127.0.0.1<br><br>lua_config_file=advanced.lua<br>#Config .conf#<br><br>#ERROR#<br>Jun 14 11:27:04 msg="Fatal error" error="Trying to set unknown setting 'lua_config_file'" subsystem="config" level="0" prio="Critical" tid="0" ts="1718375224.539" exception="PDNSException"<br>#END ERROR#<br><br>I've tried changing lua_config_file to the absolute path /usr/local/etc/pdns/advanced.lua and also tried ./advanced.lua, but without positive results<br></div>
</blockquote></body></html>