[Kea-users] Kea-dhcp-ddns not logging debug info (INTERNAL)
Oscar Carlsson
oscar at spindel.tax
Wed May 11 11:06:03 UTC 2022
Hi,
Is the D2 server configured and started? (systemctl status
isc-kea-dhcp-ddns.service on my system)
And do you have logging setup in D2? Taken from my conf:
"loggers": [
{
"name": "kea-dhcp-ddns",
"output_options": [
{
"output": "stdout",
"pattern": "%-5p %m\n"
}
],
"severity": "INFO",
"debuglevel": 0
}
]
And is kea dhcp configured to use it? Taken from my conf:
{
"Dhcp4": {
[...]
"dhcp-ddns": {
"enable-updates": true,
"server-ip": "127.0.0.1",
"server-port":53001,
"sender-ip":"",
"sender-port":0,
"max-queue-size":1024,
"ncr-protocol":"UDP",
"ncr-format":"JSON"
},
"ddns-send-updates": true,
[...]
"subnet4": [
{
"subnet": "192.168.0.0/24",
"pools": [ { "pool": "192.168.0.100 -
192.168.0.200" } ],
"option-data": [
{ "name": "routers",
"data": "192.168.0.254",
"code": 3
},
{ "name": "domain-name-servers",
"data": "192.168.0.254",
"code": 6
},
{ "name": "domain-name",
"data": "clients.home.arpa",
"code": 15
}
],
"reservations": [
{ "hw-address": "38:d5:47:df:6e:50",
"ip-address": "192.168.0.10"
}
],
"ddns-qualifying-suffix": "clients.home.arpa"
},
Oscar
Weisteen Per <per.weisteen at telenor.no> writes:
> Hi,
>
> The 2.0.2 docs
> https://kea.readthedocs.io/en/kea-2.0.2-doc/arm/logging.html#the-name-string-logger
> states that
>
> "The loggers form a hierarchy. For each program in Kea, there is
> a "root" logger, named after the program (e.g. the root logger
> for kea-dhcp, the DHCPv4 server) is named kea-dhcp4. All other
> loggers are children of this logger and are named accordingly,
> e.g. the allocation engine in the DHCPv4 server logs messages
> using a logger called kea-dhcp4.alloc-engine.
>
> This relationship is important, as each child logger derives its
> default configuration from its parent root logger. In the
> typical case, the root logger configuration is the only logging
> configuration specified in the configuration file and so applies
> to all loggers. If an entry is made for a given logger, any
> attributes specified override those of the root logger, whereas
> any not specified are inherited from it."
>
> This led me to believe I could specify "root" logger for
> kea-dhcp-ddns like this :
>
> "loggers": [
> {
> "name": "kea-dhcp-ddns",
> "output_options": [
> {
> "output": "/var/log/kea/kea-ddns-debug.log",
> "pattern": "%D{%Y-%m-%d %H:%M:%S.%q} %-5p %m\n",
> "flush": true,
> "maxsize": 204800,
> "maxver": 8
> }
> ],
> "severity": "DEBUG",
> "debuglevel": 40
> },
>
> And then just add
>
> {
> "name": "kea-dhcp-ddns.dhcp-to-d2",
> "severity": "DEBUG",
> "debuglevel": 40
> },
> {
> "name": "kea-dhcp-ddns.d2-to-dns",
> "severity": "DEBUG",
> "debuglevel": 40
> }
> ]
>
> which would then inherit the output_options from the "root"
> logger.
> Kea-dhcp-ddns -t /path/to/file.conf returns ok without any
> errors but no relevant d2 logging occurs even if kea-dhcp4
> seemingly logs that a name change is requested :
>
> 2022-05-11 09:12:41.937 DEBUG DHCP4_NCR_CREATE [hwtype=1
> 00:07:5f:b2:c8:e0], cid=[01:00:07:5f:b2:c8:e0], tid=0x1c6b3981:
> DDNS updates enabled, therefore sending name change requests
>
>
>
>
> ./PerW
>
>
> -----Original Message-----
> From: Oscar Carlsson <oscar at spindel.tax>
> Sent: onsdag 11. mai 2022 08:32
> To: Weisteen Per <per.weisteen at telenor.no>
> Cc: kea-users at lists.isc.org
> Subject: Re: [Kea-users] Kea-dhcp-ddns not logging debug info
> (OPEN)
>
> Hi,
>
> The documentation provides an example, this is what I think
> should be
> right:
>
> "loggers": [
> {
> "name": "kea-dhcp4.dhcp-to-d2",
> "output_options": [
> {
> "output": "stdout"
> }
> ],
> "severity": "DEBUG"
> }
> ]
>
> You can verify this with kea-dhcp4 -t /path/to/file.conf (-t for
> test)
> in case you are unsure it was right. I use this with Ansible to
> test all changes before putting them into effect, it's quite
> handy.
>
>
> Oscar
>
> Weisteen Per <per.weisteen at telenor.no> writes:
>
>> Hi, thanks for the suggestion.
>>
>> I'm a newbie regarding JSON syntax - does
>> kea-dhcp-ddns.dhcp-to-d2
>> need its own output_options section or could it use the same as
>> the
>> kea-dhcp-ddns logger ?
>>
>> ./PerW
>>
>>
>> -----Original Message-----
>> From: Oscar Carlsson <oscar at spindel.tax>
>> Sent: tirsdag 10. mai 2022 15:43
>> To: Weisteen Per <per.weisteen at telenor.no>
>> Cc: kea-users at lists.isc.org
>> Subject: Re: [Kea-users] Kea-dhcp-ddns not logging debug info
>> (INTERNAL)
>>
>> Hi,
>>
>> There's a wealth of different loggers you can tune, when I had
>> some
>> issues with ddns I used kea-dhcp-ddns.dhcp-to-d2 and
>> kea-dhcp-ddns.d2-to-dns (set to DEBUG) which was enough in that
>> case.
>>
>>
>> https://kea.readthedocs.io/en/kea-1.6.2/arm/logging.html
>>
>>
>> Oscar
>>
>> Weisteen Per <per.weisteen at telenor.no> writes:
>>
>>> I'm testing DDNS an I've succeeded in doing updates. But the
>>> logs
>>> created from kea-dhcp-ddns doesn't seem to be consistent.
>>> During testing last week I got sensible information in logs
>>> from
>>> kea-dhcp-ddns but not during testing today.
>>>
>>> My logs from kea-dhcp4 regarding DNS updates tells me that
>>> updates is
>>> done :
>>>
>>> 2022-05-10 14:31:16.216 DEBUG DHCP4_CLIENT_FQDN_PROCESS
>>> [hwtype=1
>>> 00:07:5f:ae:77:cb], cid=[01:00:07:5f:ae:77:cb],
>>> tid=0x3d06108f:
>>> processing Client FQDN option
>>> 2022-05-10 14:31:16.216 DEBUG DHCP4_CLIENT_FQDN_DATA [hwtype=1
>>> 00:07:5f:ae:77:cb], cid=[01:00:07:5f:ae:77:cb],
>>> tid=0x3d06108f:
>>> Client
>>> sent FQDN option: type=81 (CLIENT_FQDN), flags: (N=0, E=0,
>>> O=0, S=1),
>>> domain-name='tst-ra005.cctv.telenor.net.' (full)
>>> 2022-05-10 14:31:16.217 DEBUG DHCP4_RESPONSE_FQDN_DATA
>>> [hwtype=1
>>> 00:07:5f:ae:77:cb], cid=[01:00:07:5f:ae:77:cb],
>>> tid=0x3d06108f:
>>> including FQDN option in the server's response: type=81
>>> (CLIENT_FQDN),
>>> flags: (N=0, E=0, O=0, S=1),
>>> domain-name='tst-ra005.cctv.telenor.net.'
>>> (full)
>>> 2022-05-10 14:31:16.217 DEBUG DHCP4_NCR_CREATE [hwtype=1
>>> 00:07:5f:ae:77:cb], cid=[01:00:07:5f:ae:77:cb],
>>> tid=0x3d06108f:
>>> DDNS
>>> updates enabled, therefore sending name change requests
>>>
>>> However kea-dhcp-ddns still doesn't seem to do anyting.
>>> I've enabled DEBUG logging at level 45 and restarted the
>>> daemon but
>>> there is no corresponding update info in the log. The last
>>> info
>>> logged
>>> is:
>>>
>>> 2022-05-10 14:03:38.179 DEBUG COMMAND_REGISTERED Command
>>> config-write
>>> registered
>>> 2022-05-10 14:03:38.179 DEBUG COMMAND_REGISTERED Command
>>> shutdown
>>> registered
>>> 2022-05-10 14:03:38.179 DEBUG COMMAND_REGISTERED Command
>>> status-get
>>> registered
>>> 2022-05-10 14:03:38.179 DEBUG COMMAND_REGISTERED Command
>>> version-get
>>> registered
>>> 2022-05-10 14:03:38.179 DEBUG COMMAND_REGISTERED Command
>>> statistic-get registered
>>> 2022-05-10 14:03:38.179 DEBUG COMMAND_REGISTERED Command
>>> statistic-get-all registered
>>> 2022-05-10 14:03:38.179 DEBUG COMMAND_REGISTERED Command
>>> statistic-reset registered
>>> 2022-05-10 14:03:38.179 DEBUG COMMAND_REGISTERED Command
>>> statistic-reset-all registered
>>> 2022-05-10 14:03:38.179 DEBUG
>>> DHCP_DDNS_QUEUE_MGR_RECONFIGURING
>>> application is reconfiguring the queue manager
>>> 2022-05-10 14:03:38.179 DEBUG DHCP_DDNS_QUEUE_MGR_STARTED
>>> application's queue manager has begun listening for requests.
>>>
>>>
>>> Version info:
>>> # kea-dhcp-ddns -V
>>> 2.0.1
>>> tarball
>>> linked with:
>>> log4cplus 1.2.0
>>> OpenSSL 1.1.1k FIPS 25 Mar 2021
>>>
>>> # kea-dhcp4 -V
>>> 2.0.1
>>> tarball
>>> linked with:
>>> log4cplus 1.2.0
>>> OpenSSL 1.1.1k FIPS 25 Mar 2021
>>> database:
>>> MySQL backend 12.0, library 10.5.5
>>> PostgreSQL backend 6.2, library 130003 Memfile backend 2.1
>>>
>>>
>>>
>>> ./PerW
More information about the Kea-users
mailing list