# MAAPI\_APPLY\_TRANS(Internal Error)

**URL:** <https://dmap-community.ductus.global/t/maapi-apply-trans-internal-error/4127>\
**Category:** CDB and CDB API\
**Created:** [June 30, 2022, 12:23pm UTC](https://dmap-community.ductus.global/t/maapi-apply-trans-internal-error/4127 "2022-06-30T12:23:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bani](https://avatars.discourse-cdn.com/v4/letter/b/c6cbf5/32.png) [@bani](https://dmap-community.ductus.global/u/bani)\
**Post date:** [June 30, 2022, 12:23pm UTC](https://dmap-community.ductus.global/t/maapi-apply-trans-internal-error/4127/1 "2022-06-30T12:23:22Z")

</div>

Hi ConfD Team,

We have included the CONFD(tried with both 7.3 & 7.6 version) files & subdirectories as per the ConfD\_Basic\_License Agreement 1.1.pdf in our distribution package. When we deploy the same with our application, we are not able to apply changes to operational parameters via MAAPI. We are getting the following error logs:

TRACE Connected (maapi) to ConfD  
[30/06/2022 16:47:04:138768]TRACE Connected (maapi) to ConfD  
TRACE MAAPI\_START\_USER\_SESSION [30/06/2022 16:47:04:138823]TRACE MAAPI\_START\_USER\_SESSION  
30-Jun-2022::16:47:04.138 22312/7f60886d1700/6 SEND op=100 isrel=0 th=-1 {#Bin,{{0,0,45115,60,24703,0,20595,33936},0},system,1,false,[#Bin],{undefined,undefined,undefined,#Bin\</root/bksingh/repo/5(90)…\>}}  
 → CONFD\_OK  
[30/06/2022 16:47:04:138972] → CONFD\_OK  
TRACE MAAPI\_START\_TRANS [30/06/2022 16:47:04:138990]TRACE MAAPI\_START\_TRANS  
30-Jun-2022::16:47:04.139 22312/7f60886d1700/6 SEND op=140 isrel=0 th=-1 {2,2,0,0,0,{undefined,undefined,undefined,#Bin\</root/bksingh/repo/5(90)…\>}}  
30-Jun-2022::16:47:04.139 22312/7f60886d1700/6 GOT 10  
 → CONFD\_OK  
[30/06/2022 16:47:04:139446] → CONFD\_OK  
TRACE MAAPI\_SET\_ELEM2 /ME/swVersion[30/06/2022 16:47:04:139501]TRACE MAAPI\_SET\_ELEM2 /ME/swVersion  
30-Jun-2022::16:47:04.139 22312/7f60886d1700/6 SEND op=173 isrel=0 th=10 {#Bin\<RSYS\_ODU\_Q1\_2022\_RC1(3)…\>,[‘ME’,swVersion]}  
 → CONFD\_OK  
[30/06/2022 16:47:04:139638] → CONFD\_OK  
_**TRACE MAAPI\_APPLY\_TRANS [30/06/2022 16:47:04:139649]TRACE MAAPI\_APPLY\_TRANS**_  
\*\*\* 30-Jun-2022::16:47:04.139 22312/7f60886d1700/6 SEND op=143 isrel=0 th=10 {false,0}\*\*\*  
_ **DEBUG external error - Internal error** _  
_**[30/06/2022 16:47:04:150721]DEBUG external error - Internal error**_  
\*\*\* → CONFD\_ERR\*\*\*  
[30/06/2022 16:47:04:150728] → CONFD\_ERR  
TRACE MAAPI\_STOP\_TRANS [30/06/2022 16:47:04:150736]TRACE MAAPI\_STOP\_TRANS → CONFD\_OK  
[30/06/2022 16:47:04:150860] → CONFD\_OK  
TRACE MAAPI\_END\_USER\_SESSION [30/06/2022 16:47:04:150867]TRACE MAAPI\_END\_USER\_SESSION → CONFD\_OK  
[30/06/2022 16:47:04:150980] → CONFD\_OK

On further analysis we found that the issue was fixed by adding the following two files to the distribution package:  
/lib/confd/lib/cli/cli.ez  
/lib/confd/lib/cli/cli/priv/cli-builtin.fxs

Success Logs:  
TRACE Connected (maapi) to ConfD  
2 [01/07/2022 11:41:27:34976]TRACE Connected (maapi) to ConfD  
3 TRACE MAAPI\_START\_USER\_SESSION [01/07/2022 11:41:27:35035]TRACE MAAPI\_START\_USER\_SESSION → CONFD\_OK  
4 [01/07/2022 11:41:27:35201] → CONFD\_OK  
5 TRACE MAAPI\_START\_TRANS [01/07/2022 11:41:27:35219]TRACE MAAPI\_START\_TRANS → CONFD\_OK  
6 [01/07/2022 11:41:27:36201] → CONFD\_OK  
7 TRACE MAAPI\_SET\_ELEM2 /ME/swVersion[01/07/2022 11:41:27:36292]TRACE MAAPI\_SET\_ELEM2 /ME/swVersion → CONFD\_OK  
8 [01/07/2022 11:41:27:37367] → CONFD\_OK  
9 TRACE MAAPI\_APPLY\_TRANS [01/07/2022 11:41:27:37382]TRACE MAAPI\_APPLY\_TRANS → CONFD\_OK  
10 [01/07/2022 11:41:27:46367] → CONFD\_OK  
11 TRACE MAAPI\_STOP\_TRANS [01/07/2022 11:41:27:46376]TRACE MAAPI\_STOP\_TRANS → CONFD\_OK  
12 [01/07/2022 11:41:27:46489] → CONFD\_OK  
13 TRACE MAAPI\_END\_USER\_SESSION [01/07/2022 11:41:27:46496]TRACE MAAPI\_END\_USER\_SESSION → CONFD\_OK  
14 [01/07/2022 11:41:27:46596] → CONFD\_OK  
15 TRACE Connected (maapi) to ConfD  
16 [01/07/2022 11:41:27:46744]TRACE Connected (maapi) to ConfD  
17 TRACE MAAPI\_LOAD\_ALL\_NS  
18 [01/07/2022 11:41:27:46754]TRACE MAAPI\_LOAD\_ALL\_NS  
19 TRACE MAAPI\_LOAD\_MNS\_MAPS  
20 [01/07/2022 11:41:27:77194]TRACE MAAPI\_LOAD\_MNS\_MAPS  
21 TRACE MAAPI\_LOAD\_HASH\_DB  
22 [01/07/2022 11:41:27:77777]TRACE MAAPI\_LOAD\_HASH\_DB  
23 TRACE Connected (dp) to ConfD  
24 [01/07/2022 11:41:27:82890]TRACE Connected (dp) to ConfD  
25 TRACE Received daemon id 0  
26 [01/07/2022 11:41:27:82933]TRACE Received daemon id 0  
27 TRACE Connected (dp) to ConfD  
28 [01/07/2022 11:41:27:83018]TRACE Connected (dp) to ConfD  
29 TRACE Picked up old user session: 12 for user:system ctx:system  
30 [01/07/2022 11:41:27:83137]TRACE Picked up old user session: 12 for user:system ctx:system  
31 TRACE Picked up old user session: 11 for user:system ctx:system  
32 [01/07/2022 11:41:27:83147]TRACE Picked up old user session: 11 for user:system ctx:system  
“sw\_mgr\_confd\_lib\_22\_07\_01\_11\_41\_27.log” 36L, 2114C

But as per the license these are not permitted as part of the distribution package. Please let us know how can we fix the above issue.

Thanks,  
Bani

---

<div class="post-metadata">

**Author:** ![bani](https://avatars.discourse-cdn.com/v4/letter/b/c6cbf5/32.png) [@bani](https://dmap-community.ductus.global/u/bani)\
**Post date:** [July 6, 2022, 4:16am UTC](https://dmap-community.ductus.global/t/maapi-apply-trans-internal-error/4127/2 "2022-07-06T04:16:04Z")

</div>

Hi @cohult,

Looking forward to your input on the above query.

Thanks,  
Bani

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [July 6, 2022, 9:12am UTC](https://dmap-community.ductus.global/t/maapi-apply-trans-internal-error/4127/3 "2022-07-06T09:12:32Z")

</div>

Hi,  
Since it is an “external error” I am guessing that a subscriber, transform, or hook application (etc.) used a CLI feature or a function related to the CLI which caused the internal error that is reported. See the developer log (with developerLogLevel trace in confd.conf) for more details on what application failed when the transaction was applied/committed.

---

<div class="post-metadata">

**Author:** ![iyyappa](https://avatars.discourse-cdn.com/v4/letter/i/9f8e36/32.png) [@iyyappa](https://dmap-community.ductus.global/u/iyyappa)\
**Post date:** [July 7, 2022, 12:50pm UTC](https://dmap-community.ductus.global/t/maapi-apply-trans-internal-error/4127/4 "2022-07-07T12:50:04Z")

</div>

Hi

Looks like I am not able to enable developerLogLevel, after I tried to enable ConfD debug logs by setting ‘developerLogLevel’ to ‘btrace’ in /etc/confd/confd.conf.

Not able to login switch.

23-Jun-2022::05:45:37.739 sw0 confd[1154]: - Daemon NOS Distributed Configuration Manager died  
 23-Jun-2022::05:45:41.624 sw0 confd[1154]: - ConfD stopping (confd --stop called by root in /)  
 23-Jun-2022::05:45:41.654 sw0 confd[1154]: - Stopping to listen for NETCONF TCP on [127.0.0.1:2023](http://127.0.0.1:2023/)  
 23-Jun-2022::05:45:41.782 sw0 confd[1154]: - Daemon logging terminating, reason: shutdown

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [July 7, 2022, 2:00pm UTC](https://dmap-community.ductus.global/t/maapi-apply-trans-internal-error/4127/5 "2022-07-07T14:00:01Z")

</div>

‘btrace’ should be ‘trace’, or was that a typo in your post here?

---

<div class="post-metadata">

**Author:** ![greg](https://avatars.discourse-cdn.com/v4/letter/g/71c47a/32.png) [@greg](https://dmap-community.ductus.global/u/greg)\
**Post date:** [July 7, 2022, 6:48pm UTC](https://dmap-community.ductus.global/t/maapi-apply-trans-internal-error/4127/6 "2022-07-07T18:48:34Z")

</div>

Bani,  
Could you describe that data that you are trying to set in your transaction? I assume it is ‘config false’, but is the data stored in CDB or do you use the data provider API? If you can attach the YANG file, or at least a snippet where this data is defined, that would be helpful.

Best regards,  
Greg

---

<div class="post-metadata">

**Author:** ![bani](https://avatars.discourse-cdn.com/v4/letter/b/c6cbf5/32.png) [@bani](https://dmap-community.ductus.global/u/bani)\
**Post date:** [July 12, 2022, 4:17am UTC](https://dmap-community.ductus.global/t/maapi-apply-trans-internal-error/4127/7 "2022-07-12T04:17:33Z")

</div>

Hi @greg ,

We had config false data in the yang and we were using the “maapi\_start\_trans” API with “CONFD\_RUNNING” option, which was causing the issue. If we use “CONFD\_OPERATIONAL” for config false data, issue was not seen. Now we are moving forward with a 2 socket approach i.e. for config false parameters we will be using CONFD\_OPERATIONAL & for config true data we will be using CONFD\_RUNNING.

Looking forward to your view on the above approach.

Thanks,  
Bani

---

<div class="post-metadata">

**Author:** ![iyyappa](https://avatars.discourse-cdn.com/v4/letter/i/9f8e36/32.png) [@iyyappa](https://dmap-community.ductus.global/u/iyyappa)\
**Post date:** [July 13, 2022, 12:06pm UTC](https://dmap-community.ductus.global/t/maapi-apply-trans-internal-error/4127/8 "2022-07-13T12:06:57Z")

</div>

Hi @greg ,

Please find the code snippet for Yang module…

```auto
module xxxx-system-monitor {

    namespace "urn:xxxx.com:mgmt:xxxx-system-monitor";
    prefix "system-monitor";

    import tailf-common {
        prefix tailf;
    }

    import brocade-rbridge {
        prefix rbridge;
    }

    import ietf-inet-types {
        prefix inet;
    }
   grouping system-monitor-group {
        container fan {
            tailf:info "Configure threshold and alert setting for
                         component:FAN";
            tailf:cli-incomplete-no;
            container threshold {
                tailf:info "Configure threshold for component:FAN";
                tailf:cli-incomplete-no;
                tailf:callpoint smsetFanThreshold;
                tailf:cli-compact-syntax;
                leaf marginal-threshold {
                    tailf:info "Minimum number contributing to
                                MARGINAL state of component:FAN";
                    type uint32 {
                        tailf:info "Marginal threshold value";
                    }

```

Thanks,  
Iyyappa.

---

<div class="post-metadata">

**Author:** ![bani](https://avatars.discourse-cdn.com/v4/letter/b/c6cbf5/32.png) [@bani](https://dmap-community.ductus.global/u/bani)\
**Post date:** [July 17, 2022, 4:43pm UTC](https://dmap-community.ductus.global/t/maapi-apply-trans-internal-error/4127/9 "2022-07-17T16:43:19Z")

</div>

Hi @greg,

Looking forward to your response.

Thanks,  
Bani
