Failed to load fxs files to confd using Maapi

Hello, We are trying to load fxs files to confd (confd 7.1) from our JAVA application using Maapi APIs(com.tailf.maapi.Maapi). The fxs load successfully to confd most of the times via maapi client, but fails loading sometimes throwing MaapiException. If the same fxs are placed at default load path of the confd, they are getting loaded successfully during the startup.

From the logs:

com.tailf.maapi.Maapi                    : MAAPI_START_USER_SESSION --> OK
com.tailf.maapi.MaapiSchemas             : MAAPI_LOAD_HASH_DB -->
com.tailf.maapi.MaapiSchemas             : MAAPI_LOAD_HASH_DB --> OK
com.tailf.maapi.MaapiSchemas             : MAAPI_LOAD_ALL_NS -->
com.tailf.maapi.MaapiSchemas             : MAAPI_LOAD_ALL_NS --> OK
com.tailf.maapi.MaapiSchemas             : MAAPI_LOAD_MNS_MAPS -->
com.tailf.maapi.MaapiSchemas             : MAAPI_LOAD_MNS_MAPS --> OK
com.tailf.maapi.Maapi                    : MAAPI_INIT_UPGRADE (timeout:10,flags:1) -->
com.tailf.maapi.Maapi                    : MAAPI_INIT_UPGRADE --> OK
com.tailf.maapi.Maapi                    : MAAPI_PERFORM_UPGRADE (paths:[<path>] )-->
com.tailf.maapi.Maapi                    : MAAPI_ABORT_UPGRADE -->
com.tailf.maapi.MaapiException: internal
        at com.tailf.maapi.MaapiException.mk(MaapiException.java:61) ~[conf-api-7.1.jar!/:na]
        at com.tailf.maapi.MaapiException.mk(MaapiException.java:50) ~[conf-api-7.1.jar!/:na]
        at com.tailf.maapi.Maapi.abortUpgrade(Maapi.java:8455) ~[conf-api-7.1.jar!/:na]

Java Code used for loading the fxs to confd:

        maapi.initUpgrade(10, Maapi.MAAPI_UPGRADE_KILL_ON_TIMEOUT);
        maapi.performUpgrade(fxsPaths.toArray(new String[0]));
        maapi.commitUpgrade();

The exception is thrown at performUpgrade. Could you please suggest what could be the issue here?

Thanks!

Hi,

I think many problems can happen that would fail a “performUpgrade()” but you can find more info in the developer log I believe. Did you have the developer log enabled? Can you check what error message it shows?

Quoting the user guide:
" A number of different problems may be detected during the loading of the new files, e.g. .fxs files may have a version that is incompatible with the ConfD version, or they may reference namespaces that can not be found. These problems will make maapi_perform_upgrade() fail with confd_errno CONFD_ERR_BAD_CONFIG, and confd_lasterr() giving information about the details of the problem. If the loading is successful, CDB will start its special upgrade transaction, and perform any automatic upgrade operations that are needed, before maapi_perform_upgrade() returns."

Thanks,
Nabil