[Kea-users] kea 1.2 - "One or more hook libraries failed to load"

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Kea-users] kea 1.2 - "One or more hook libraries failed to load"

Jason Lixfeld
Hey,

I’m looking to try and load the flex id hooks library, but something doesn’t like me:

root@build:/home/jlixfeld# keactrl start
INFO/keactrl: Starting kea-dhcp4 -c /usr/local/etc/kea/kea.conf -d
root@build:/home/jlixfeld# 2017-09-06 00:00:16.876 ERROR [kea-dhcp4.dhcp4/44181] DHCP4_INIT_FAIL failed to initialize Kea server: configuration error using file '/usr/local/etc/kea/kea.conf': One or more hook libraries failed to load
2017-09-06 00:00:16.878 INFO  [kea-dhcp4.commands/44181] COMMAND_SOCKET_UNIX_CLOSE Command socket closed: UNIX, fd=9, path=/tmp/kea-dhcp4-ctrl.sock

Commenting out the hooks-library portion of kea.conf allows kea-dhcp4 to load without an issue.

The closest match to this particular issue was from for forums, about this time in 2015, where the library wasn’t in the directory it was pointing to in the config. In this case, however, the library is indeed in the correct location:

root@build:/home/jlixfeld# file /usr/local/lib/hooks/libdhcp_flex_id.so
/usr/local/lib/hooks/libdhcp_flex_id.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=3e2c95a5f3dc2ea6b286a530c974edf51688bd4d, not stripped
root@build:/home/jlixfeld# ls -al /usr/local/lib/hooks/libdhcp_flex_id.so
-rwxr-xr-x 1 root staff 1187888 Sep  5 13:27 /usr/local/lib/hooks/libdhcp_flex_id.so
root@build:/home/jlixfeld#

Even with debug logging and lots of debug level, I’m not finding anything overly helpful in any of the output.

I’ve included the config below, incase anyone can see anything glaring which I cannot.

{
        "Logging": {
                "loggers": [{
                        "name": "kea-dhcp4",
                        "output_options": [{
                                "output": "/var/log/kea/kea-dhcp4.log"
                        }],
                        "severity": "DEBUG",
                        "debuglevel": 99
                }]
        },
        "Dhcp4": {
                "hooks-libraries": [{
                        "library": "/usr/local/lib/hooks/libdhcp_flex_id.so",
                        "parameters": {
                                "identifer-expression": "relay4[1].hex"
                        }
                }],
                "control-socket": {
                        "socket-type": "unix",
                        "socket-name": "/tmp/kea-dhcp4-ctrl.sock"
                },
                "interfaces-config": {
                        "interfaces": ["eth1"],
                        "dhcp-socket-type": "udp"
                },
                "lease-database": {
                        "type": "postgresql",
                        "name": "keaPoClab,
                        "host": "",
                        "user": "keaPoClab,
                        "password": "keaPoClab
                },
                "hosts-database": {
                        "type": "postgresql",
                        "name": "keaPoClab,
                        "host": "",
                        "user": "keaPoClab,
                        "password": "keaPoClab
                },
                "subnet4": [{
                        "option-data": [{
                                "name": "domain-name-servers",
                                "code": 6,
                                "space": "dhcp4",
                                "csv-format": true,
                                "data": "192.0.2.3"
                        }],
                        "subnet": "172.16.1.0/24",
                        "valid-lifetime": 4000,
                        "renew-timer": 1000,
                        "rebind-timer": 2000,
                        "pools": [{
                                "pool": "172.16.1.1 - 172.16.1.200"
                        }],
                        "reservations": [{
                                "flex-id": "00:04:00:7f:00:00",
                                "ip-address": "172.16.1.169"
                        }]
                }],
                "host-reservation-identifiers": [ "duid", "hw-address", "flex-id" ]
        }
}

Thanks in advance!
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] kea 1.2 - "One or more hook libraries failed to load"

Francis Dupont
Try to get the HOOKS_OPEN_ERROR which returns errors from dlopen().
Note the main reason to get dlopen to not find DSOs is to forget to
set LD_LIBRARY_PATH...

Regards

Francis Dupont <[hidden email]>
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] kea 1.2 - "One or more hook libraries failed to load"

Jason Lixfeld
I tend to fumble around debugging stuff like this, so forgive me if I’m not doing what you ask; I really have no idea how :)

What I was able to piece together was starting up with LD_DEBUG=all :

root@build:/var/log/kea# LD_DEBUG=all /usr/local/sbin/kea-dhcp4 -c /usr/local/etc/kea/kea.conf -d &> kea2.log

Chopping through that log file, I found this:

2017-09-06 07:33:28.874 ERROR [kea-dhcp4.hooks/46864] HOOKS_LOAD_ERROR 'load' function in hook library /usr/local/lib/hooks/libdhcp_flex_id.so returned error 1

Following that back up the logfile I found this:

2017-09-06 07:33:28.874 ERROR [kea-dhcp4.flex-id/46864] FLEX_ID_EXPRESSION_NOT_DEFINED Expression (identifier-expression) is not defined.

And following that back up further still, I found this:

/usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: subnet4_select (fatal)

So then I pulled out anything related to that particular error for the flex_id library:

root@build:/var/log/kea# grep "/usr/local/lib/hooks/libdhcp_flex_id.so: error:" kea2.log
     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: buffer4_receive (fatal)
     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: buffer4_send (fatal)
     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: context_create (fatal)
     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: context_destroy (fatal)
     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: control_command_receive (fatal)
     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease4_decline (fatal)
     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease4_expire (fatal)
     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease4_recover (fatal)
     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease4_release (fatal)
     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease4_renew (fatal)
     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease4_select (fatal)
     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease6_expire (fatal)
     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease6_rebind (fatal)
     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease6_recover (fatal)
     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease6_renew (fatal)
     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease6_select (fatal)
     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: pkt4_receive (fatal)
     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: pkt4_send (fatal)
     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: subnet4_select (fatal)

What confuses me though, is that by cherry picking the first undefined symbol itself from the log file, it appears to be there, so I’m not sure why it’s not able to look it up:

root@build:/var/log/kea# grep buffer4_receive kea2.log
     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/hooks/libdhcp_flex_id.so [0]
     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-dhcp++.so.5 [0]
     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-asiolink.so.4 [0]
     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-dns++.so.0 [0]
     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-cc.so.2 [0]
     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-hooks.so.3 [0]
     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-log.so.3 [0]
     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-eval.so.5 [0]
     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-threads.so.1 [0]
     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-util.so.2 [0]
     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-exceptions.so.0 [0]
     46864: symbol=buffer4_receive;  lookup in file=/lib/x86_64-linux-gnu/libgcc_s.so.1 [0]
     46864: symbol=buffer4_receive;  lookup in file=/lib/x86_64-linux-gnu/libpthread.so.0 [0]
     46864: symbol=buffer4_receive;  lookup in file=/lib/x86_64-linux-gnu/libc.so.6 [0]
     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-cryptolink.so.2 [0]
     46864: symbol=buffer4_receive;  lookup in file=/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 [0]
     46864: symbol=buffer4_receive;  lookup in file=/lib/x86_64-linux-gnu/libdl.so.2 [0]
     46864: symbol=buffer4_receive;  lookup in file=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 [0]
     46864: symbol=buffer4_receive;  lookup in file=/lib/x86_64-linux-gnu/libm.so.6 [0]
     46864: symbol=buffer4_receive;  lookup in file=/usr/lib/x86_64-linux-gnu/liblog4cplus-1.1.so.9 [0]
     46864: symbol=buffer4_receive;  lookup in file=/lib64/ld-linux-x86-64.so.2 [0]

Also, I’m confused about how the LD_LIBRARY_PATH issue would cause runtime issues.  Wouldn’t the hook fail to compile in the first place, or is LD_LIBRARY_PATH required at runtime?

Notwithstanding, I found this:

https://kea.isc.org/ticket/3741

Which suggests that while even though the startup error is different, running ldconfig after make install works, if required, however in my case, that didn’t do much of anything.

So any other insight appreciated :)

> On Sep 6, 2017, at 3:47 AM, Francis Dupont <[hidden email]> wrote:
>
> Try to get the HOOKS_OPEN_ERROR which returns errors from dlopen().
> Note the main reason to get dlopen to not find DSOs is to forget to
> set LD_LIBRARY_PATH...
>
> Regards
>
> Francis Dupont <[hidden email]>

_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] kea 1.2 - "One or more hook libraries failed to load"

Jason Lixfeld
Oh, I’m sorry - I guess perhaps I should include some system specific info? :/

root@build:/var/log/kea# uname -a
Linux build 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u2 (2017-06-26) x86_64 GNU/Linux
root@build:/var/log/kea# cat /etc/debian_version
9.1
root@build:/var/log/kea#

Out from ./configure:

       Kea source configure results:
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Package:
  Name:            kea
  Version:         1.2.0
  Extended version:1.2.0 (tarball)
  OS Family:       Linux
  Using GNU sed:   yes
  Premium package: yes

C++ Compiler:
  CXX:             g++
  CXX_VERSION:     g++ (Debian 6.3.0-18) 6.3.0 20170516
  CXX_STANDARD:    201402
  DEFS:            -DHAVE_CONFIG_H
  CPPFLAGS:         -DOS_LINUX  -I$(top_srcdir)/ext/coroutine -DBOOST_ASIO_HEADER_ONLY -DBOOST_ASIO_DISABLE_THREADS=1 -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED
  CXXFLAGS:        -g -O2
  LDFLAGS:          -lpthread
  KEA_CXXFLAGS:     -Wall -Wextra -Wnon-virtual-dtor -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -pthread -Wno-missing-field-initializers -fPIC

Python:
  PYTHON_VERSION:  not needed (because kea-shell is disabled)

Boost:
  BOOST_VERSION:   1.62
  BOOST_INCLUDES:
  BOOST_LIBS:

OpenSSL:
  CRYPTO_VERSION:  OpenSSL 1.1.0f  25 May 2017
  CRYPTO_CFLAGS:
  CRYPTO_INCLUDES:
  CRYPTO_LDFLAGS:
  CRYPTO_LIBS:     -lcrypto

Botan: no

Log4cplus:
  LOG4CPLUS_VERSION: 1.1.2
  LOG4CPLUS_INCLUDES: -I/usr/include
  LOG4CPLUS_LIBS:  -L/usr/lib -L/usr/lib64 -llog4cplus

Flex/bison:
  FLEX:  flex
  BISON: bison -y

MySQL:
  no

PostgreSQL:
  PGSQL_VERSION:   PostgreSQL 9.6.3
  PGSQL_CPPFLAGS:  -DFRONTEND -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6 -I/usr/include/postgresql -I/usr/include/postgresql/9.6/server
  PGSQL_LIBS:      -L/usr/lib/x86_64-linux-gnu -lpq

Cassandra CQL:
  no

Developer:
  Enable Debugging: no
  Google Tests: no
  Valgrind: not found
  C++ Code Coverage: no
  Logger checks: no
  Generate Documentation: no
  Parser Generation: no
  Kea-shell: no

> On Sep 6, 2017, at 8:49 AM, Jason Lixfeld <[hidden email]> wrote:
>
> I tend to fumble around debugging stuff like this, so forgive me if I’m not doing what you ask; I really have no idea how :)
>
> What I was able to piece together was starting up with LD_DEBUG=all :
>
> root@build:/var/log/kea# LD_DEBUG=all /usr/local/sbin/kea-dhcp4 -c /usr/local/etc/kea/kea.conf -d &> kea2.log
>
> Chopping through that log file, I found this:
>
> 2017-09-06 07:33:28.874 ERROR [kea-dhcp4.hooks/46864] HOOKS_LOAD_ERROR 'load' function in hook library /usr/local/lib/hooks/libdhcp_flex_id.so returned error 1
>
> Following that back up the logfile I found this:
>
> 2017-09-06 07:33:28.874 ERROR [kea-dhcp4.flex-id/46864] FLEX_ID_EXPRESSION_NOT_DEFINED Expression (identifier-expression) is not defined.
>
> And following that back up further still, I found this:
>
> /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: subnet4_select (fatal)
>
> So then I pulled out anything related to that particular error for the flex_id library:
>
> root@build:/var/log/kea# grep "/usr/local/lib/hooks/libdhcp_flex_id.so: error:" kea2.log
>     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: buffer4_receive (fatal)
>     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: buffer4_send (fatal)
>     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: context_create (fatal)
>     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: context_destroy (fatal)
>     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: control_command_receive (fatal)
>     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease4_decline (fatal)
>     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease4_expire (fatal)
>     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease4_recover (fatal)
>     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease4_release (fatal)
>     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease4_renew (fatal)
>     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease4_select (fatal)
>     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease6_expire (fatal)
>     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease6_rebind (fatal)
>     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease6_recover (fatal)
>     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease6_renew (fatal)
>     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease6_select (fatal)
>     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: pkt4_receive (fatal)
>     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: pkt4_send (fatal)
>     46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: subnet4_select (fatal)
>
> What confuses me though, is that by cherry picking the first undefined symbol itself from the log file, it appears to be there, so I’m not sure why it’s not able to look it up:
>
> root@build:/var/log/kea# grep buffer4_receive kea2.log
>     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/hooks/libdhcp_flex_id.so [0]
>     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-dhcp++.so.5 [0]
>     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-asiolink.so.4 [0]
>     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-dns++.so.0 [0]
>     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-cc.so.2 [0]
>     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-hooks.so.3 [0]
>     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-log.so.3 [0]
>     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-eval.so.5 [0]
>     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-threads.so.1 [0]
>     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-util.so.2 [0]
>     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-exceptions.so.0 [0]
>     46864: symbol=buffer4_receive;  lookup in file=/lib/x86_64-linux-gnu/libgcc_s.so.1 [0]
>     46864: symbol=buffer4_receive;  lookup in file=/lib/x86_64-linux-gnu/libpthread.so.0 [0]
>     46864: symbol=buffer4_receive;  lookup in file=/lib/x86_64-linux-gnu/libc.so.6 [0]
>     46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-cryptolink.so.2 [0]
>     46864: symbol=buffer4_receive;  lookup in file=/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 [0]
>     46864: symbol=buffer4_receive;  lookup in file=/lib/x86_64-linux-gnu/libdl.so.2 [0]
>     46864: symbol=buffer4_receive;  lookup in file=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 [0]
>     46864: symbol=buffer4_receive;  lookup in file=/lib/x86_64-linux-gnu/libm.so.6 [0]
>     46864: symbol=buffer4_receive;  lookup in file=/usr/lib/x86_64-linux-gnu/liblog4cplus-1.1.so.9 [0]
>     46864: symbol=buffer4_receive;  lookup in file=/lib64/ld-linux-x86-64.so.2 [0]
>
> Also, I’m confused about how the LD_LIBRARY_PATH issue would cause runtime issues.  Wouldn’t the hook fail to compile in the first place, or is LD_LIBRARY_PATH required at runtime?
>
> Notwithstanding, I found this:
>
> https://kea.isc.org/ticket/3741
>
> Which suggests that while even though the startup error is different, running ldconfig after make install works, if required, however in my case, that didn’t do much of anything.
>
> So any other insight appreciated :)
>
>> On Sep 6, 2017, at 3:47 AM, Francis Dupont <[hidden email]> wrote:
>>
>> Try to get the HOOKS_OPEN_ERROR which returns errors from dlopen().
>> Note the main reason to get dlopen to not find DSOs is to forget to
>> set LD_LIBRARY_PATH...
>>
>> Regards
>>
>> Francis Dupont <[hidden email]>
>
> _______________________________________________
> Kea-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/kea-users

_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] kea 1.2 - "One or more hook libraries failed to load"

Jason Lixfeld
Hi,

For completeness, the issue was a typo:

        "Dhcp4": {
                "hooks-libraries": [{
                        "library": "/usr/local/lib/hooks/libdhcp_flex_id.so",
                        "parameters": {
—>                                “identifer-expression": "relay4[1].hex"
                        }
                }],

However, running -t said syntax was OK.

I guess this is a bug in the -t switch for kea-dhcp4?

> On Sep 6, 2017, at 8:59 AM, Jason Lixfeld <[hidden email]> wrote:
>
> Oh, I’m sorry - I guess perhaps I should include some system specific info? :/
>
> root@build:/var/log/kea# uname -a
> Linux build 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u2 (2017-06-26) x86_64 GNU/Linux
> root@build:/var/log/kea# cat /etc/debian_version
> 9.1
> root@build:/var/log/kea#
>
> Out from ./configure:
>
>       Kea source configure results:
>    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>
> Package:
>  Name:            kea
>  Version:         1.2.0
>  Extended version:1.2.0 (tarball)
>  OS Family:       Linux
>  Using GNU sed:   yes
>  Premium package: yes
>
> C++ Compiler:
>  CXX:             g++
>  CXX_VERSION:     g++ (Debian 6.3.0-18) 6.3.0 20170516
>  CXX_STANDARD:    201402
>  DEFS:            -DHAVE_CONFIG_H
>  CPPFLAGS:         -DOS_LINUX  -I$(top_srcdir)/ext/coroutine -DBOOST_ASIO_HEADER_ONLY -DBOOST_ASIO_DISABLE_THREADS=1 -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED
>  CXXFLAGS:        -g -O2
>  LDFLAGS:          -lpthread
>  KEA_CXXFLAGS:     -Wall -Wextra -Wnon-virtual-dtor -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -pthread -Wno-missing-field-initializers -fPIC
>
> Python:
>  PYTHON_VERSION:  not needed (because kea-shell is disabled)
>
> Boost:
>  BOOST_VERSION:   1.62
>  BOOST_INCLUDES:
>  BOOST_LIBS:
>
> OpenSSL:
>  CRYPTO_VERSION:  OpenSSL 1.1.0f  25 May 2017
>  CRYPTO_CFLAGS:
>  CRYPTO_INCLUDES:
>  CRYPTO_LDFLAGS:
>  CRYPTO_LIBS:     -lcrypto
>
> Botan: no
>
> Log4cplus:
>  LOG4CPLUS_VERSION: 1.1.2
>  LOG4CPLUS_INCLUDES: -I/usr/include
>  LOG4CPLUS_LIBS:  -L/usr/lib -L/usr/lib64 -llog4cplus
>
> Flex/bison:
>  FLEX:  flex
>  BISON: bison -y
>
> MySQL:
>  no
>
> PostgreSQL:
>  PGSQL_VERSION:   PostgreSQL 9.6.3
>  PGSQL_CPPFLAGS:  -DFRONTEND -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6 -I/usr/include/postgresql -I/usr/include/postgresql/9.6/server
>  PGSQL_LIBS:      -L/usr/lib/x86_64-linux-gnu -lpq
>
> Cassandra CQL:
>  no
>
> Developer:
>  Enable Debugging: no
>  Google Tests: no
>  Valgrind: not found
>  C++ Code Coverage: no
>  Logger checks: no
>  Generate Documentation: no
>  Parser Generation: no
>  Kea-shell: no
>
>> On Sep 6, 2017, at 8:49 AM, Jason Lixfeld <[hidden email]> wrote:
>>
>> I tend to fumble around debugging stuff like this, so forgive me if I’m not doing what you ask; I really have no idea how :)
>>
>> What I was able to piece together was starting up with LD_DEBUG=all :
>>
>> root@build:/var/log/kea# LD_DEBUG=all /usr/local/sbin/kea-dhcp4 -c /usr/local/etc/kea/kea.conf -d &> kea2.log
>>
>> Chopping through that log file, I found this:
>>
>> 2017-09-06 07:33:28.874 ERROR [kea-dhcp4.hooks/46864] HOOKS_LOAD_ERROR 'load' function in hook library /usr/local/lib/hooks/libdhcp_flex_id.so returned error 1
>>
>> Following that back up the logfile I found this:
>>
>> 2017-09-06 07:33:28.874 ERROR [kea-dhcp4.flex-id/46864] FLEX_ID_EXPRESSION_NOT_DEFINED Expression (identifier-expression) is not defined.
>>
>> And following that back up further still, I found this:
>>
>> /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: subnet4_select (fatal)
>>
>> So then I pulled out anything related to that particular error for the flex_id library:
>>
>> root@build:/var/log/kea# grep "/usr/local/lib/hooks/libdhcp_flex_id.so: error:" kea2.log
>>    46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: buffer4_receive (fatal)
>>    46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: buffer4_send (fatal)
>>    46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: context_create (fatal)
>>    46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: context_destroy (fatal)
>>    46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: control_command_receive (fatal)
>>    46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease4_decline (fatal)
>>    46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease4_expire (fatal)
>>    46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease4_recover (fatal)
>>    46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease4_release (fatal)
>>    46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease4_renew (fatal)
>>    46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease4_select (fatal)
>>    46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease6_expire (fatal)
>>    46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease6_rebind (fatal)
>>    46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease6_recover (fatal)
>>    46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease6_renew (fatal)
>>    46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: lease6_select (fatal)
>>    46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: pkt4_receive (fatal)
>>    46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: pkt4_send (fatal)
>>    46864: /usr/local/lib/hooks/libdhcp_flex_id.so: error: symbol lookup error: undefined symbol: subnet4_select (fatal)
>>
>> What confuses me though, is that by cherry picking the first undefined symbol itself from the log file, it appears to be there, so I’m not sure why it’s not able to look it up:
>>
>> root@build:/var/log/kea# grep buffer4_receive kea2.log
>>    46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/hooks/libdhcp_flex_id.so [0]
>>    46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-dhcp++.so.5 [0]
>>    46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-asiolink.so.4 [0]
>>    46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-dns++.so.0 [0]
>>    46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-cc.so.2 [0]
>>    46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-hooks.so.3 [0]
>>    46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-log.so.3 [0]
>>    46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-eval.so.5 [0]
>>    46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-threads.so.1 [0]
>>    46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-util.so.2 [0]
>>    46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-exceptions.so.0 [0]
>>    46864: symbol=buffer4_receive;  lookup in file=/lib/x86_64-linux-gnu/libgcc_s.so.1 [0]
>>    46864: symbol=buffer4_receive;  lookup in file=/lib/x86_64-linux-gnu/libpthread.so.0 [0]
>>    46864: symbol=buffer4_receive;  lookup in file=/lib/x86_64-linux-gnu/libc.so.6 [0]
>>    46864: symbol=buffer4_receive;  lookup in file=/usr/local/lib/libkea-cryptolink.so.2 [0]
>>    46864: symbol=buffer4_receive;  lookup in file=/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 [0]
>>    46864: symbol=buffer4_receive;  lookup in file=/lib/x86_64-linux-gnu/libdl.so.2 [0]
>>    46864: symbol=buffer4_receive;  lookup in file=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 [0]
>>    46864: symbol=buffer4_receive;  lookup in file=/lib/x86_64-linux-gnu/libm.so.6 [0]
>>    46864: symbol=buffer4_receive;  lookup in file=/usr/lib/x86_64-linux-gnu/liblog4cplus-1.1.so.9 [0]
>>    46864: symbol=buffer4_receive;  lookup in file=/lib64/ld-linux-x86-64.so.2 [0]
>>
>> Also, I’m confused about how the LD_LIBRARY_PATH issue would cause runtime issues.  Wouldn’t the hook fail to compile in the first place, or is LD_LIBRARY_PATH required at runtime?
>>
>> Notwithstanding, I found this:
>>
>> https://kea.isc.org/ticket/3741
>>
>> Which suggests that while even though the startup error is different, running ldconfig after make install works, if required, however in my case, that didn’t do much of anything.
>>
>> So any other insight appreciated :)
>>
>>> On Sep 6, 2017, at 3:47 AM, Francis Dupont <[hidden email]> wrote:
>>>
>>> Try to get the HOOKS_OPEN_ERROR which returns errors from dlopen().
>>> Note the main reason to get dlopen to not find DSOs is to forget to
>>> set LD_LIBRARY_PATH...
>>>
>>> Regards
>>>
>>> Francis Dupont <[hidden email]>
>>
>> _______________________________________________
>> Kea-users mailing list
>> [hidden email]
>> https://lists.isc.org/mailman/listinfo/kea-users
>
> _______________________________________________
> Kea-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/kea-users

_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] kea 1.2 - "One or more hook libraries failed to load"

Francis Dupont
Jason Lixfeld writes:
> However, running -t said syntax was OK.

=> -t does not check everything, for instance hook parameters.

Regards

Francis Dupont <[hidden email]>

BTW the manual page says that "hook libraries are not loaded" so
don't expect to have a not loaded hook checking for its particular
parameter syntax...
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] kea 1.2 - "One or more hook libraries failed to load"

Thomas Markwalder
On 9/6/17 12:06 PM, Francis Dupont wrote:
> Jason Lixfeld writes:
>> However, running -t said syntax was OK.
> => -t does not check everything, for instance hook parameters.
Hi Jason:

Hook parameters only have meaning to the hook libraries which consumes
them, making it problematic for the kea servers to verify them.  Sort of
a chicken-egg thing there.  The -t mode is meant catch syntax and
logical errors to the extent possible.   Some values such as hook
parameters, interface names,  IP addresses, and port numbers  cannot be
tested without actually attempting to commit the configuration (i.e use
them).

Cheers,

Thomas Markwalder
ISC Software Engineering

> Regards
>
> Francis Dupont <[hidden email]>
>
> BTW the manual page says that "hook libraries are not loaded" so
> don't expect to have a not loaded hook checking for its particular
> parameter syntax...
> _______________________________________________
> Kea-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/kea-users


_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users