Self sign-up has been disabled due to increased spam activity. If you want to get access, please send an email to a project owner (preferred) or at gitlab(at)nic(dot)cz. We apologize for the inconvenience.
Error "refresh, failed (no usable master)" when master is present
Slave server doesn't ask for updates after notify is being recived by it.
Error text: error: [example.com.] refresh, failed (no usable master)
The most strange part is that AXFR bootstrapping goes fine.
If zone files are deleted, then slave server is restarted, then files are recreated after notify event (or knotc zone-refresh).
Reproduction
Distro: Gentoo
Master version: 2.7.0
Slave version: 2.7.0
Steps:
update SOA record serial on the master
perform knotc zone-reload on the master
perform knot zone-notify on the master
Full slave log example:
info: [example.com.] notify, incoming, 123.123.123.123@35724: received, serial 2018080900info: [example.com.] refresh, outgoing, 123.123.123.123@53: remote serial 2018080900, zone is outdatedwarning: [example.com.] refresh, remote master not usableerror: [example.com.] refresh, failed (no usable master)
Additional info
Workaround: downgrading slave version to 2.5.7.
Version 2.6.8 is affected too.
More information can be provided on request.
Edited
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
Hi Eugene,
thanks much for provided detailed information!
It seems to me I am on the track of this issue, however I need a little more information from you to confirm this.
Could you please tell me what is the status (existence, permissions, contents (roughly)) of the /var/lib/knot/zones/keys directory on your slave server?
The KASP database is not only used for storing DNSSEC signing keys (which you don't use on your slave), but also some more zone metadata. It seems Knot has issues if this directory exists, but it's not accessible for knot user (or whichever user knotd is running under).
I guess deleting this directory will solve the problem for you. Anyway, more provided info will help us fixing the bug in Knot ;)
Someone should choose a path of experimentation and find such interesting configurations.
Just a moment, I'm checking behaviour with keys directory removed.
I would agree with Libor, you should fix the permissions or ownership (root->knot) of the files. Or purge the storage and let the server to create the files with proper attributes...
I've deleted keys directory.
All looks fine now. Many thanks!
But I still disappointed with misleading logging diagnostic. I know I can find the root course with strace, but found another way to workaround the case by downgrading slave version.
This mix of strange behaviours has blown my brain.
Could knot check all mandatory resources on start up and refuse to start without them?
For me the turndown is much better then possible malfunction in runtime.
I'm sorry as I can't provide patches right now. One day I will come to help with the code, I hope so.
Yeah. It's really hard to introduce 'resource' concept at the late stages.
The more time pass the more often I think about encapsulation of the program building blocks and separation of the machinery that configure and then combine them to the working application. It's the special case of Inversion of Control called Dependency Injection.
The Dependency is a perfect resource example. The building machinery is able to control all dependencies availability at the point of building of running application instance (by preparing file handlers as sub-dependencies for example).
It's hard to build such a system in pain C as it's not enforce DI concept.