ConfD User Community

DEBUG Library MAXDEPTH/MAXKEYLEN 20/9 for confd_hkeypath_t are too small, ConfD needs 28/4


I have imported the ietf-isis@2018-12-04.fxs in the 6-c_config. When make start, it raised the following error

zhaohongji@ubuntu:~/confd-6.4.3/examples.confd/intro/6-c_config$ make start 
*### Killing any confd daemon and HOSTS confd agents
/home/zhaohongji/confd-6.4.3/bin/confd --stop || true
killall hosts || true
hosts: no process found
/home/zhaohongji/confd-6.4.3/bin/confd  -c confd.conf --addloadpath /home/zhaohongji/confd-6.4.3/etc/confd
*### * In one terminal window, run: tail -f ./confd.log
*### * In another terminal window, run queries
*###   (try 'make query' for an example)
*### * In this window, the HOSTS confd daemon now starts:
Starting with empty DB
DEBUG Library MAXDEPTH/MAXKEYLEN 20/9 for confd_hkeypath_t are too small, ConfD needs 28/4
Failed to load schemas from confd
Makefile:59: recipe for target 'start' failed
make: *** [start] Error 1

The confd userguide suggests that tuning the size of confd_hkeypath_t. I recompiled the libconfd source code by the following commands and generated libconfd.a and

I used the latest libconfd.a and to replace the old ones.

zhaohongji@ubuntu:~/confd-6.4.3/lib$ pwd
zhaohongji@ubuntu:~/confd-6.4.3/lib$ ll *libconfd*
-rw-r--r-- 1 zhaohongji zhaohongji 4463082 Dec 12 23:40 libconfd.a
-rwxr-xr-x 1 zhaohongji zhaohongji 1918344 Dec 12 23:40*

At last it still raised the error. Who knows how to deal with it? Thanks a lot!


After you replaced the static libconfd.a library, did you link the new library with the 6-c_config example application?

cc -o hosts hosts.o dlist.o $(CONFD_DIR)/lib/libconfd.a -lpthread -lm -L/opt/local/lib


It couldn’t link the new library automatically, could it?


Probably not, unless you are developing an AGI application that relinks it self to a static library after it rebuilt the statically linked libconfd.a.
If your application link dynamically with, then yes.

Google selected this for me after a search:


Actually, as the User Guide explains, it is not sufficient to relink (or use dynamic linking), since the applications also need to be compiled with the changed values for MAXDEPTH/MAXKEYLEN - otherwise they would be using a different definition of confd_hkeypath_t than the library is using, and e.g. data provider callbacks receiving a hkeypath built by the library as a parameter would not be able to interpret it correctly. Such a mismatch between applcation and library will actually be detected by the confd_init() call, which will terminate the application with an error message.

As for “automatic”, Makefiles in e.g. the examples could of course have more dependencies, but depending on how the change is done - the User Guide discusses some alternatives - this may not be sufficient. E.g. a dependency on $CONFD_DIR/include/confd_lib.h will only help if that file is actually modified, which may be undesirable.