Knot DNS issueshttps://gitlab.nic.cz/knot/knot-dns/-/issues2018-08-23T09:55:29+02:00https://gitlab.nic.cz/knot/knot-dns/-/issues/604cookies module fails to load when built as DSO2018-08-23T09:55:29+02:00Robert Edmondscookies module fails to load when built as DSOHi,
I built the 2.7.0 release with most modules compiled as DSOs. knot failed to start with the following error:
```
2018-08-15T17:25:07 error: module, failed to open '/home/redmonds/.install/stow/knot-2.7.0/lib/knot/cookies.so' (/home...Hi,
I built the 2.7.0 release with most modules compiled as DSOs. knot failed to start with the following error:
```
2018-08-15T17:25:07 error: module, failed to open '/home/redmonds/.install/stow/knot-2.7.0/lib/knot/cookies.so' (/home/redmonds/.install/stow/knot-2.7.0/lib/knot/cookies.so: undefined symbol: memzero)
2018-08-15T17:25:07 critical: failed to open configuration database '' (not exists)
```
It looks like the cookies DSO needs to be linked against libcontrib.la, i.e.:
```diff
--- a/src/knot/modules/cookies/Makefile.inc
+++ b/src/knot/modules/cookies/Makefile.inc
@@ -8,5 +8,6 @@ endif
if SHARED_MODULE_cookies
knot_modules_cookies_la_LDFLAGS = $(KNOTD_MOD_LDFLAGS)
knot_modules_cookies_la_CPPFLAGS = $(KNOTD_MOD_CPPFLAGS)
+knot_modules_cookies_la_LIBADD = libcontrib.la
pkglib_LTLIBRARIES += knot/modules/cookies.la
endif
```
I would also suggest that dlopen() failures like this not be fatal to the server, unless the module is actually required by the configuration, otherwise a buggy module in the module directory would cause knot to fail to start up.
Thanks!nextDaniel SalzmanDaniel Salzmanhttps://gitlab.nic.cz/knot/knot-dns/-/issues/593multiple DDNS zone updates fails when using serial-policy unixtime2018-07-06T20:54:23+02:00Ghost Usermultiple DDNS zone updates fails when using serial-policy unixtimeAttempting to perform multiple dynamic DNS zone updates fail with serial-policy unixtime.
Please find below the attached example configuration and log outputs to reproduce this issue.
This has been tested with knot 2.6.7 on Debian buste...Attempting to perform multiple dynamic DNS zone updates fail with serial-policy unixtime.
Please find below the attached example configuration and log outputs to reproduce this issue.
This has been tested with knot 2.6.7 on Debian buster.
```
$ tail -n +1 /etc/knot/knot.conf /var/lib/knot/zones/example.org test.sh
==> /etc/knot/knot.conf <==
server:
listen: 0.0.0.0@53
listen: ::@53
user: knot:knot
log:
- target: syslog
any: info
acl:
- id: example.org
action: update
template:
- id: default
file: zones/%s
semantic-checks: on
serial-policy: unixtime
zone:
- domain: example.org
acl: [example.org]
==> /var/lib/knot/zones/example.org <==
example.org. 3600 SOA ns1.example.org. hostmaster.example.org 1530570453 3600 1200 3628800 60
example.org. 3600 NS ns1.example.org.
ns1 3600 A 127.0.0.1
==> test.sh <==
#! /bin/sh
cat << EOF | nsupdate
server localhost
update delete ip1.example.org.
update add ip1.example.org. 60 IN A 192.0.2.1
update delete ip2.example.org.
update add ip2.example.org. 60 IN A 192.0.2.2
update delete ip3.example.org.
update add ip3.example.org. 60 IN A 192.0.2.3
send
quit
EOF
```
```
$ systemctl start knot.service
Jul 05 00:33:52 hostname systemd[1]: Started Knot DNS server.
Jul 05 00:33:52 hostname knotd[22344]: info: Knot DNS 2.6.7 starting
Jul 05 00:33:52 hostname knotd[22344]: info: binding to interface 0.0.0.0@53
Jul 05 00:33:52 hostname knotd[22344]: info: binding to interface ::@53
Jul 05 00:33:52 hostname knotd[22344]: info: changing GID to 105
Jul 05 00:33:52 hostname knotd[22344]: info: changing UID to 103
Jul 05 00:33:52 hostname knotd[22344]: info: loading 1 zones
Jul 05 00:33:52 hostname knotd[22344]: info: [example.org.] zone will be loaded
Jul 05 00:33:52 hostname knotd[22344]: info: starting server
Jul 05 00:33:52 hostname knotd[22344]: info: [example.org.] loaded, serial 1530570453
Jul 05 00:33:52 hostname knotd[22344]: info: server started in the foreground, PID 22344
Jul 05 00:33:52 hostname knotd[22344]: info: control, binding to '/run/knot/knot.sock'
```
```
$ ./test.sh
update failed: SERVFAIL
Jul 05 00:34:38 hostname knotd[22344]: info: [example.org.] DDNS, processing 1 updates
Jul 05 00:34:38 hostname knotd[22344]: info: [example.org.] DDNS, update finished, serial 1530570453 -> 1530743678, 0.09 seconds
Jul 05 00:34:38 hostname knotd[22344]: info: [example.org.] zone file updated, serial 1530570453 -> 1530743678
Jul 05 00:34:38 hostname knotd[22344]: info: [example.org.] DDNS, processing 1 updates
Jul 05 00:34:38 hostname knotd[22344]: warning: [example.org.] updated serial is lower than current, serial 1530743678 -> 1530743678
Jul 05 00:34:38 hostname knotd[22344]: info: [example.org.] DDNS, finished, no changes to the zone were made
Jul 05 00:34:38 hostname knotd[22344]: info: [example.org.] DDNS, processing 1 updates
Jul 05 00:34:38 hostname knotd[22344]: warning: [example.org.] updated serial is lower than current, serial 1530743678 -> 1530743678
Jul 05 00:34:38 hostname knotd[22344]: warning: [example.org.] journal, duplicate changeset serial (1530743678), dropping older changesets
Jul 05 00:34:38 hostname knotd[22344]: notice: [example.org.] journal is full, flushing
Jul 05 00:34:38 hostname knotd[22344]: warning: [example.org.] journal, duplicate changeset serial (1530743678), dropping older changesets
Jul 05 00:34:38 hostname knotd[22344]: error: [example.org.] DDNS, processing failed (requested resource is busy)
```
I suspect the problem is that the updates happen much faster than one second and thus generate the same unix time stamp. Removing the "serial-policy: unixtime" line from the configuration makes the error go away:
```
Jul 05 00:58:19 hostname knotd[22379]: info: [example.org.] DDNS, processing 1 updates
Jul 05 00:58:19 hostname knotd[22379]: info: [example.org.] DDNS, update finished, serial 1530743678 -> 1530743679, 0.06 seconds
Jul 05 00:58:19 hostname knotd[22379]: info: [example.org.] zone file updated, serial 1530743678 -> 1530743679
Jul 05 00:58:19 hostname knotd[22379]: info: [example.org.] DDNS, processing 1 updates
Jul 05 00:58:20 hostname knotd[22379]: info: [example.org.] DDNS, update finished, serial 1530743679 -> 1530743680, 0.02 seconds
Jul 05 00:58:20 hostname knotd[22379]: info: [example.org.] zone file updated, serial 1530743679 -> 1530743680
Jul 05 00:58:20 hostname knotd[22379]: info: [example.org.] DDNS, processing 1 updates
Jul 05 00:58:20 hostname knotd[22379]: info: [example.org.] DDNS, update finished, serial 1530743680 -> 1530743681, 0.02 seconds
Jul 05 00:58:20 hostname knotd[22379]: info: [example.org.] zone file updated, serial 1530743680 -> 1530743681
```next