[Kea-users] Kea with hook

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

[Kea-users] Kea with hook

Mayank Tiwari
Hi,

  I was trying to make hook work on kea version 1.5.0. I have picked the sample hook code from https://github.com/zorun/kea-hook-runscript and was trying it out.

The hook code compiles successfully. However, when I run the code I get following error:
root@fc8f2167ca26:/src/build_ws/kea-code# /usr/local/sbin/kea-dhcp4 -c /src/build_ws/kea-code/kea-dhcp4.conf
2019-04-15 21:54:52.983 INFO  [kea-dhcp4.dhcp4/49278] DHCP4_STARTING Kea DHCPv4 server version 1.5.0 starting
2019-04-15 21:54:52.987 ERROR [kea-dhcp4.dhcp4/49278] DHCP4_CONFIG_LOAD_FAIL configuration error using file: /src/build_ws/kea-code/kea-dhcp4.conf, reason: hooks libraries failed to validate - library or libraries in error are: /src/build_ws/kea-code/kea-hook-runscript/kea-hook-runscript.so(/src/build_ws/kea-code/kea-dhcp4.conf:9:5)
2019-04-15 21:54:52.987 ERROR [kea-dhcp4.dhcp4/49278] DHCP4_INIT_FAIL failed to initialize Kea server: configuration error using file '/src/build_ws/kea-code/kea-dhcp4.conf': hooks libraries failed to validate - library or libraries in error are: /src/build_ws/kea-code/kea-hook-runscript/kea-hook-runscript.so(/src/build_ws/kea-code/kea-dhcp4.conf:9:5)

  This is how I include the library:
    "hooks-libraries": [
        {
          "library": "/src/build_ws/kea-code/kea-hook-runscript/kea-hook-runscript.so",
          "parameters": {
            "script": "/src/build_ws/kea-code/script.sh"
          }
        }
    ],

The "so" file exists in the required path. Can you please give me pointers to further debug this issue.

Thanks and Regards,
Mayank

_______________________________________________
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 with hook

Francis Dupont
Try with full logging including using the KEA_LOGGER_DESTINATION
environment variable to get the call to dlopen() to print the error.
Usually it is a bad path, lack of LD_LIBRARY_PATH or something similar:
with the full diagnostic it is easy to understand the problem and to fix it.

Regards

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