ConfD is up and running and try to run the application hello manually .
hello.fxs is present in /etc/confd
Getting an error
DEBUG Library MAXDEPTH/MAXKEYLEN 20/9 for confd_hkeypath_t are too small, ConfD needs 23/5
[vm-root@bin]$ ./hello
Before loading
DEBUG Library MAXDEPTH/MAXKEYLEN 20/9 for confd_hkeypath_t are too small, ConfD needs 23/5
val of error = -1 errval = 2
int main(int argc, char **argv)
{
struct sockaddr_in addr;
int debuglevel = CONFD_DEBUG;
struct confd_action_cbs acb;
struct pollfd set[3];
int ret;
int i = confd_load_schemas((struct sockaddr*)&addr,
sizeof (struct sockaddr_in));
if ( i != 0) { printf("val of error = %d errval = %d", i,errno); }
if ((dctx = confd_init_daemon("hello_daemon")) == NULL)
confd_fatal("Failed to initialize ConfD\n");
if ((ctlsock = socket(PF_INET, SOCK_STREAM, 0)) < 0 )
confd_fatal("Failed to open ctlsocket\n");
see ConfD user guide, chapter “Tuning the size of confd_hkeypath_t” - according to debug message - your model seems to have “too complex” structure.
You will need to recompile ConfD library with modified keypath size as described in the chapter mentioned above.
Then you can use this updated library to compile your application to support bigger model keypaths…
Which means that the change didn’t probably get into the hello application throughout the whole build pipeline… You have multiple options and it depends on your project architecture.
E.g. for development purposes, i usually directly edit source code of my confd-lib in $CONFD_DIR/src/confd/libconfd and then rebuild the library.
(by changing the #defines of MAXKEYLEN etc. in header files, but you can skip this, and just use -D EXTRA_CFLAGS to rebuild it…)
(edit - one next step below is maybe unnecessary, and is my legacy from very old confd-lib times - i will need to check confd-lib sources makefile to see if it is needed or done automatically already by make process)
Afterwards, i copy appropriate updated/built files from libconfd built directory to a few levels up - to $CONFD_DIR/lib and $CONFD_DIR/include.
This need to be done only once, and then any application that uses this “hacked” confd instance has the updated keypaths without any needed edits into app sources/makefiles…
(when it uses the hacked confd directory to build - using its confd-lib that i hacked/rebuilt before…)
Text that you pasted above seems like you use the updated values for the hello application build - but the description recommends rebuilding the ConfD library with the -D make parameters - located in the $CONFD_DIR/src/confd/libconfd. Then the updated library can be used to build the compatible hello app…