Bug 1175 - nsd debugging seems sparse
nsd debugging seems sparse
Status: REOPENED
Product: NSD
Classification: Unclassified
Component: NSD Code
4.1.x
x86_64 Linux
: P5 enhancement
Assigned To: NSD team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-12-04 19:31 CET by David Favor
Modified: 2016-12-05 16:03 CET (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Favor 2016-12-04 19:31:44 CET
lxc: dns-ns1 # uname -a
Linux dns-ns1 4.8.0-27-generic #29-Ubuntu SMP Thu Oct 20 21:03:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

lxc: dns-ns1 # lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.10
Release:	16.10
Codename:	yakkety

Config file...

server:
    debug-mode: yes
    verbosity: 10
    server-count: 16
    do-ip4: yes
    do-ip6: yes
    port: 53
    username: nsd
    zonesdir: "/etc/nsd/zones"
    logfile: "/var/log/nsd.log"
    pidfile: "/run/nsd/nsd.pid"

Docs state...

verbosity: <level>
This value specifies the verbosity level for (non-debug) logging. Default is 0. 1 gives more information about incoming notifies and zone transfers. 2 lists soft warnings that are encountered.

Changing debug to any number 2-10 produces no information about incoming notifies.

With bind9, there's a mass of debugging available for every query, which makes debugging a snap.

With nsd, when a lookup fails... nothing but crickets... silence... no debug information about the request or why it failed.

Let me know how to debug entire nsd conversations, request + response + reason for failures.

If not, please change this bug to an enhancement request for finer granularity debugging.

Thanks.
Comment 1 David Favor 2016-12-04 23:38:32 CET
Example output with verbosity set from 2-10, same for all values...

[2016-12-04 12:32:23.288] nsd[31415]: notice: nsd starting (NSD 4.1.10)
[2016-12-04 12:32:23.292] nsd[31415]: info: setup SSL certificates
[2016-12-04 12:32:23.583] nsd[31416]: info: zonefile /etc/nsd/zones/davidfavor.com is not modified
[2016-12-04 12:32:23.583] nsd[31416]: info: zonefile /etc/nsd/zones/wetwarehacking.com is not modified
[2016-12-04 12:32:23.583] nsd[31416]: notice: nsd started (NSD 4.1.10), pid 31415

No indication of lookups occurring or success/failure of lookups.
Comment 2 Wouter Wijngaards 2016-12-05 10:44:06 CET
Hi David,

Verbosity is not the debug logging for NSD.  Verbosity level 5 is about the max right now.  If you compile with debug enabled, then use -F 60 -L 2 to enable more logging.  -F -1 -L 2 enables even more debug logging, but the volume of that may slow down the server.

Best regards, Wouter
Comment 3 David Favor 2016-12-05 15:50:43 CET
I'm using Ubuntu packages.

Guess I could switch to a custom build.

Please change this bug to an enhancement request.

To provide deep debugging as an option which can be enabled... without a complete rebuild from source.

Thanks.
Comment 4 Wouter Wijngaards 2016-12-05 16:03:16 CET
Hi David,

But others don't want the slowdown of debug statements, that is why it is a compile time option.

Apart from debug log statements it also enables assertions in the code, which is also an option some like to enable and some other people want to disable.

Better debug logging is very good, but I think it'll have to be a compile time option.

Best regards, Wouter