[Kea-users] Hook Libraries logging not Initialized
Joe Wilner
jwilner at ns1.com
Tue Jan 22 20:55:41 UTC 2019
Hi --
I'm attempting to build a docker container of Kea 1.4.0 and hitting an
issue around logging initialization when attempting to load hook libraries.
The relevant bits of the Dockerfile:
```
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y --no-install-recommends libtool
autoconf g++ libssl-dev liblog4cplus-dev libboost-system-dev
WORKDIR /build/
RUN wget https://www.isc.org/downloads/file/kea-1-4-0-p1/?version=tar-gz -O
kea.tar.gz \
&& mkdir kea && tar -C kea --strip-components=1 -xzf kea.tar.gz \
&& cd kea && ./configure --enable-shell --enable-static-link \
&& make -j $(getconf _NPROCESSORS_ONLN) -l $(getconf _NPROCESSORS_ONLN)
&& make install \
&& cd /build/ \
&& rm -r kea*
&& ldconfig
```
When I run `kea-dhcp4` with the following config:
```
{
"Dhcp4": {
"hooks-libraries": [{
"library": "/usr/local/lib/hooks/libdhcp_lease_cmds.so"
}],
"control-socket": {
"socket-type": "unix",
"socket-name": "/tmp/kea-dhcp4-ctrl.sock"
},
"lease-database": {
...
},
"expired-leases-processing": {
...
},
...
},
"Logging": {
"loggers": [
{
"name": "kea-dhcp4",
"output_options": [
{ "output": "stdout" }
],
"severity": "INFO",
"debuglevel": 0
}
]
}
}
```
I get an error as follows:
```
2019-01-22 20:44:22.375 ERROR [kea-dhcp4.hooks/142]
HOOKS_LOAD_FRAMEWORK_EXCEPTION 'load' function in hook library
/usr/local/lib/hooks/libdhcp_lease_cmds.so threw an exception: reason
attempt to access logging function before logging has been initialized
2019-01-22 20:44:22.375 ERROR [kea-dhcp4.hooks/142]
HOOKS_UNLOAD_FRAMEWORK_EXCEPTION 'unload' function in hook library
/usr/local/lib/hooks/libdhcp_lease_cmds.so threw an exception, reason
attempt to access logging function before logging has been initialized
2019-01-22 20:44:22.375 ERROR [kea-dhcp4.dhcp4/142]
DHCP4_PARSER_COMMIT_FAIL parser failed to commit changes: One or more hook
libraries failed to load
2019-01-22 20:44:22.376 ERROR [kea-dhcp4.dhcp4/142] DHCP4_CONFIG_LOAD_FAIL
configuration error using file: /usr/local/etc/kea/kea-dhcp4.conf, reason:
One or more hook libraries failed to load
2019-01-22 20:44:22.376 ERROR [kea-dhcp4.dhcp4/142] DHCP4_INIT_FAIL failed
to initialize Kea server: configuration error using file
'/usr/local/etc/kea/kea-dhcp4.conf': One or more hook libraries failed to
load
```
My instinct is that this is an issue with the linking but `ldconfig -p`
looks as I would expect.
Any advice or help would be appreciated.
Thanks,
Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20190122/47fc8cef/attachment.htm>
More information about the Kea-users
mailing list