by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 12:09
    GitLab | Daniel Salzman pushed 282 commits to Knot DNS
  • Jul 14 12:47
    GitLab | Libor Peltan pushed 44 commits to Knot DNS
  • Jul 13 18:20
    GitLab | Daniel Salzman pushed 14 commits to Knot DNS
  • Jul 13 18:20
    GitLab | Libor Peltan pushed to Knot DNS
  • Jul 13 18:20
    Daniel Salzman merged merge request #1132 Zone catalog implemeted in Knot DNS
  • Jul 13 18:11
    GitLab | Daniel Salzman pushed 23 commits to Knot DNS
  • Jul 13 15:54
    GitLab | David Vasek pushed 1 commits to Knot DNS
  • Jul 13 15:46
    GitLab | David Vasek pushed 1 commits to Knot DNS
  • Jul 13 12:16
    GitLab | Libor Peltan pushed 1 commits to Knot DNS
  • Jul 13 11:39
    GitLab | Daniel Salzman pushed 9 commits to Knot DNS
  • Jul 13 11:39
    GitLab | Libor Peltan pushed to Knot DNS
  • Jul 13 11:39
    Daniel Salzman merged merge request #1149 Xdp gun popen fix in Knot DNS
  • Jul 13 11:29
    GitLab | Daniel Salzman pushed 24 commits to Knot DNS
  • Jul 13 10:46
    GitLab | David Vasek pushed 1 commits to Knot DNS
  • Jul 11 16:10
    GitLab | Daniel Salzman pushed 1 commits to Knot DNS
  • Jul 10 22:20
    GitLab | David Vasek pushed 1 commits to Knot DNS
  • Jul 10 20:51
    GitLab | David Vasek pushed 1 commits to Knot DNS
  • Jul 10 16:11
    GitLab | Libor Peltan pushed 1 commits to Knot DNS
  • Jul 10 13:03
    GitLab | Daniel Salzman pushed 1 commits to Knot DNS
  • Jul 10 11:32
    GitLab | Daniel Salzman pushed 1 commits to Knot DNS
muellert
@muellert
I have moved the config dir out of the way, and restarted knot. Now it returns SERVFAIL again, but at least, it opens a socket.
Daniel Salzman
@salzmdan
Can you see info: loaded configuration file '/etc/knot/knot.conf'?
Or share the logs again please
muellert
@muellert
No. Now the daemon log looks like this:

systemd[1]: Starting Knot DNS server...
knotc[5179]: Configuration is valid
knotd[5180]: 2020-02-04T20:51:19 debug: module 'mod-cookies', loaded static
knotd[5180]: 2020-02-04T20:51:19 debug: module 'mod-dnsproxy', loaded static
knotd[5180]: 2020-02-04T20:51:19 debug: module 'mod-dnstap', loaded static
knotd[5180]: 2020-02-04T20:51:19 debug: module 'mod-geoip', loaded static
knotd[5180]: 2020-02-04T20:51:19 debug: module 'mod-noudp', loaded static
knotd[5180]: 2020-02-04T20:51:19 debug: module 'mod-onlinesign', loaded static
knotd[5180]: 2020-02-04T20:51:19 debug: module 'mod-queryacl', loaded static
knotd[5180]: 2020-02-04T20:51:19 debug: module 'mod-rrl', loaded static
knotd[5180]: 2020-02-04T20:51:19 debug: module 'mod-stats', loaded static
knotd[5180]: 2020-02-04T20:51:19 debug: module 'mod-synthrecord', loaded static
knotd[5180]: 2020-02-04T20:51:19 debug: module 'mod-whoami', loaded static
systemd[1]: Started Knot DNS server.
(I clipped the initial timestamp and hostname.)
Daniel Salzman
@salzmdan
It's not enough. What about journalctl -u knot ?
We are looking for some logs about zones...
muellert
@muellert

systemd[1]: Starting Knot DNS server...
knotc[3757]: Configuration is valid
knotd[3758]: 2020-02-04T19:58:23 debug: module 'mod-cookies', loaded static                         
knotd[3758]: 2020-02-04T19:58:23 debug: module 'mod-dnsproxy', loaded static                        
knotd[3758]: 2020-02-04T19:58:23 debug: module 'mod-dnstap', loaded static                          
knotd[3758]: 2020-02-04T19:58:23 debug: module 'mod-geoip', loaded static                           
knotd[3758]: 2020-02-04T19:58:23 debug: module 'mod-noudp', loaded static                           
knotd[3758]: 2020-02-04T19:58:23 debug: module 'mod-onlinesign', loaded static                      
knotd[3758]: 2020-02-04T19:58:23 debug: module 'mod-queryacl', loaded static                        
knotd[3758]: 2020-02-04T19:58:23 debug: module 'mod-rrl', loaded static                             
knotd[3758]: 2020-02-04T19:58:23 debug: module 'mod-stats', loaded static                           
knotd[3758]: 2020-02-04T19:58:23 debug: module 'mod-synthrecord', loaded static                     
knotd[3758]: 2020-02-04T19:58:23 debug: module 'mod-whoami', loaded static                          
knotd[3758]: 2020-02-04T19:58:23 info: Knot DNS 2.9.2 starting                                      
knotd[3758]: 2020-02-04T19:58:23 info: loaded configuration database '/var/lib/knot/confdb'         
knotd[3758]: 2020-02-04T19:58:23 info: using reuseport for UDP                                      
knotd[3758]: 2020-02-04T19:58:23 info: binding to interface 0.0.0.0@53                              
knotd[3758]: 2020-02-04T19:58:23 info: binding to interface ::@53                                   
knotd[3758]: 2020-02-04T19:58:23 info: loading 1 zones                                              
knotd[3758]: 2020-02-04T19:58:23 info: [my-zone.local.] zone will be loaded                        
knotd[3758]: 2020-02-04T19:58:23 info: starting server                                              
knotd[3758]: error: [my-zone.local.] failed to parse zone file (not exists)                        
knotd[3758]: 2020-02-04T19:58:23 error: [my-zone.local.] failed to parse zone file (not exists)    
knotd[3758]: error: [my-zone.local.] zone event 'load' failed (not exists)                         

# ls -l /var/lib/knot/confdb
/bin/ls: cannot access '/var/lib/knot/confdb': No such file or directory
This my-zone.local was something I tried to add via knotc, but it doesn't exist.
The config database it is allegedly trying to load, also does not exist, as indicated by the ls command, and since the zone does not exist, trying to knotc zone-purge does not work, either, with or without -f.
Honestly, I am running out of ideas. Since I "deleted" the config database, and the timers database, too, knot should not know about that ephemeral zone I tried to add from the command line, but stopping and starting knot still results in knot thinking it should load that zone. I have no idea why this is so.
Daniel Salzman
@salzmdan
It's really strange. Where did you get the package?
muellert
@muellert
I got this package from OpenSuse. This is listed somewhere in the download section on the Knot homepage. Before that, I was running the official Debian package, which would be 2.7.6. I only changed because I thought there might have been a bugfix in the meantime, but it hasn't. Here's the archive link for apt:
deb http://download.opensuse.org/repositories/home:/CZ-NIC:/knot-dns-latest/Debian_10/ /
And while I'm at it, trying to import the GPG key from this page: https://www.knot-dns.cz/download/ fails with "No ID" or so.
Daniel Salzman
@salzmdan
Try a different keyserver gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 0x8A0EFB02C84B1E9B
Didn't help?
muellert
@muellert
That works. It would be great if that key were available on the other keyservers (MIT etc.) as well.
Do you think I should use a different package? Maybe downgrade to the official Debian package again?
Daniel Salzman
@salzmdan
The official Debian package is recommended. But I don't think it helps now since both repositories use the same package sources
muellert
@muellert
I mean, from my POV, the error behaviour seems to be quite the same. While trying to feed my config to knotd line by line via knotc, I also noted that the documentation is not clear on what can and cannot go into the server.nsid and server.identity fields, or how to specify these on the command line, because I got only strange error messages.
Maybe knot didn't load the config because of that, despite saying that the config is valid.
In reality, I have a FQDN in both fields.
Daniel Salzman
@salzmdan
Do you have any example?
muellert
@muellert
Yes. Without revealing the real (and existing) domain name, I have
server:
    identity: "dns.example.com"
    nsid: "dns.example.com"
Trying this on the command line:
# knotc conf-set 'server[identity]: "dns.example.com"'
error: (unexpected token) : "dns.example.com"
# knotc conf-set 'server.identity: "dns.example.com"'
error: (invalid item) server.identity: "dns.example.com"
Daniel Salzman
@salzmdan
Ah, ok, you have to remove the colon
muellert
@muellert
I tried that as well:
# knotc conf-set 'server.identity "dns.example.com"'
error: (invalid item) server.identity "dns.example.com"
# knotc conf-set 'server[identity] "dns.example.com"'
error: (unexpected token)  "dns.example.com"
Daniel Salzman
@salzmdan
muellert
@muellert
Ok... my bad. :( I think I was too stressed when I tried.
But it doesn't solve any of the "ghost database" and config file ignore problems.
Daniel Salzman
@salzmdan
Let's try it again: stop/kill all running knotd instances, remove the configuration database, and start the server again.
Also check if the server was started with some parameters (-C, -c) ps | grep knotd
muellert
@muellert
# cat /etc/default/knot 
KNOTD_ARGS="-v"
Daniel Salzman
@salzmdan
This one is harmless
muellert
@muellert
# systemctl start knot
# ps auwwx|grep knot
knot      5945  0.0  1.9 567872 19944 ?        Ssl  21:28   0:00 /usr/sbin/knotd -v
Daniel Salzman
@salzmdan
ok, and the logs?
If there was no config DB during the server start, it should use the config file
muellert
@muellert
It says loaded configuration database '/var/lib/knot/confdb', which doesn't exist, also complains about the non-existing zone, and error: failed to load configuration file '/etc/knot/knot.conf' (invalid indentation) I'm trying to track this down, but can't see at the moment what should be wrong (it's a YAML file, isn't it?).
Before any of that, I ran knotc zone-check on all zones, and didn't get any errors.
Daniel Salzman
@salzmdan
Maybe, it checked the configuration database. Try knotc -c /etc/knot/knot.conf conf-check
Yes, it's "YAML". You could try some online checkers. http://www.yamllint.com/
muellert
@muellert
Ok, found it. Your command also says that the (wrong?) config is valid, but the problem was that most of the file has an indent of 2, while the server section had an indent of 4.
Making the server section also have an indent of 2 made knot import the file. But I'd say knotc should have complained already.
Because knotc is run as part of the systemd unit file during startup.
Daniel Salzman
@salzmdan
The indentation can be different across sections, but must be consistent within a section
muellert
@muellert
It was consistent within each section.
I also thought it could be different on a per-section basis, yet this was the change that made it work.
Daniel Salzman
@salzmdan
So, it works now?
muellert
@muellert
No. Something else is wrong. Suddenly, the server refuses all queries, despite having loaded the zones and the socket being open.
Oh.. my mistake: "No zones loaded"
Daniel Salzman
@salzmdan
Btw, could you share an anonymized snippet of the broken config file? I would investigate that.