# Failed to fetch operational data via provide devel-c get\_elem error {proto\_usage, "expect data"} for callpoint

**URL:** <https://dmap-community.ductus.global/t/failed-to-fetch-operational-data-via-provide-devel-c-get-elem-error-proto-usage-expect-data-for-callpoint/614>\
**Category:** CDB and CDB API\
**Created:** [August 4, 2016, 7:41am UTC](https://dmap-community.ductus.global/t/failed-to-fetch-operational-data-via-provide-devel-c-get-elem-error-proto-usage-expect-data-for-callpoint/614 "2016-08-04T07:41:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![issam](https://avatars.discourse-cdn.com/v4/letter/i/f05b48/32.png) [@issam](https://dmap-community.ductus.global/u/issam)\
**Post date:** [August 4, 2016, 7:41am UTC](https://dmap-community.ductus.global/t/failed-to-fetch-operational-data-via-provide-devel-c-get-elem-error-proto-usage-expect-data-for-callpoint/614/1 "2016-08-04T07:41:30Z")

</div>

Hello,

I tried to fetch operational data for some parent leaf, to test it i’am using confd\_cli, the first show command work fine, if i try i second one i get “Error: application protocol error”.  
In confd log i found many error “devel-c get\_elem error {proto\_usage, “expect data”} for callpoint”.  
I need to know more about this error ,can i change the log level of confd for debugging ?  
What can be the issue ?

Many thanks

---

<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:** [August 4, 2016, 8:58am UTC](https://dmap-community.ductus.global/t/failed-to-fetch-operational-data-via-provide-devel-c-get-elem-error-proto-usage-expect-data-for-callpoint/614/2 "2016-08-04T08:58:59Z")

</div>

Hi,

> [@issam](#):
>
> What can be the issue ?

The issue is likely that you return a null pointer to the data in your get\_elem() callback when calling confd\_data\_reply\_value().  
See examples.confd/intro/5-c\_stats for guidance.  
Search for 5-c\_stats in this forum for more that can be done with that ConfD example.

> [@issam](#):
>
> I need to know more about this error ,can i change the log level of confd for debugging ?

Besides checking out the ConfD UG Chapter “General Troubleshooting Strategies”. To debug data provider errors:

**1.** In your c-application that link with the libconfd library, increase the debug level to CONFD\_TRACE when calling confd\_init(). Example:  
`confd_init("arpe_daemon", stderr, CONFD_TRACE);`  
For more on libconfd debug levels see “confd\_init” in man/man3/confd\_lib\_lib.3 man page.  
If you enable the libconfd debug output at trace level, for your issue you will likely see something like (if you were supposed to return data of type string):

```
TRACE CALL data get_elem(thandle=7,/my/path --> CONFD_OK
DEBUG confd_value_t val.s is NULL for C_STR
DEBUG Expect call to return data, cannot return CONFD_OK when no data is sent thandle=7

```

**2.** In your ConfD configuration file, confd.conf, set developer log level to TRACE. See confd.conf man page. I.e:

```
<logs>
…
<developerLogLevel>trace</developerLogLevel>
</logs>

```

Not much more helpful info here in your case. You would then have seen something like:

```
<DEBUG> 4-Aug-2016::10:50:41.060 CO confd[86422]: devel-c get_elem request for callpoint xyz ...
<ERR> 4-Aug-2016::10:50:41.060 CO confd[86422]: devel-c get_elem error {proto_usage, "expect data"} for callpoint xyz ...

```

---

<div class="post-metadata">

**Author:** ![issam](https://avatars.discourse-cdn.com/v4/letter/i/f05b48/32.png) [@issam](https://dmap-community.ductus.global/u/issam)\
**Post date:** [August 4, 2016, 9:08am UTC](https://dmap-community.ductus.global/t/failed-to-fetch-operational-data-via-provide-devel-c-get-elem-error-proto-usage-expect-data-for-callpoint/614/4 "2016-08-04T09:08:47Z")

</div>

> [@cohult](#):
>
> confd\_data\_reply\_value

OK, thank you for your reply
