How to avoid "syntax error: unknown argument"

I am having yang model as below

   container statistics
   {
     tailf:info "Application statistics";
 
     container detail
     {
       tailf:info "Detail statistics";
       list data {
         key "category name instance";
         config false;
         tailf:callpoint statistic-detail;

         leaf category {
           type string;
         }
         leaf name {
           type string;
         }
         leaf instance {
           type string;
         }
         leaf current
         {
           type decimal64 { fraction-digits 2; }
         }
         leaf average
         {
           type decimal64 { fraction-digits 2; }
         }
         leaf min
         {
           type decimal64 { fraction-digits 2; }
         }
         leaf max
         {
           type decimal64 { fraction-digits 2; }
         }
         leaf timestamp
         {
           type yang:date-and-time;
         }
       }
    }
  } 

I am facing ‘syntax error: unknown argument’ as below if data is absent

admin@orchestrator# show statistics detail data directortps
---------------------------------------------------------------------------^
syntax error: unknown argument

But this issue is not seen if name(directortps) is removed

admin@orchestrator[master-0]# show statistics detail data   
% No entries found.
admin@orchestrator[master-0]#

Is there any way I can avoid ‘syntax error: unknown argument’ message? Should I use tailf:default-ref for name leaf?

Try adding

container detail
{
presence true;

Hello, this did not help. Is there any other way to fix this?

Regards,
Kedar.

There is no member with “directopts” present.
BR

yes, there is no member with “directortps” as it is value of leaf

name

So, in this case, should I recommend to avoid using

directortps

as confd does not seem to have any solution to

syntax error: unknown argument

error ?

Thank you for your support.

So what does the ConfD developer log (with log level set to trace) say about what your data provider is providing back to ConfD. I.e. your data provider application that registered for the “statistics-detail” callpoint?

Hello,
I tried to enable confd logs but do not see much of helpful info,

root@configuration-engine:/# ls -ltr /var/confd/var/confd/log/
total 8
-rw-r–r-- 1 root root 0 Sep 4 16:19 snmp.log
-rw-r–r-- 1 root root 0 Sep 4 16:19 netconf.log
-rw-r–r-- 1 root root 0 Sep 4 16:19 audit.log
-rw-r–r-- 1 root root 791 Sep 4 16:19 devel.log
-rw-r–r-- 1 root root 0 Sep 4 16:19 netconf.trace
-rw-r–r-- 1 root root 3410 Sep 4 16:19 confd.log
root@configuration-engine:/#

As you can see, netconf.trace is empty, and confd.log has below contents

INFO> 4-Sep-2019::16:19:17.423 configuration-engine confd[15]: - Enabling error log

<INFO> 4-Sep-2019::16:19:17.456 configuration-engine confd[15]: - Writing error log to /tmp/confderr.log

<INFO> 4-Sep-2019::16:19:17.483 configuration-engine confd[15]: - Writing daemon log to /var/confd/var/confd/log/confd.log

<INFO> 4-Sep-2019::16:19:17.484 configuration-engine confd[15]: - Writing NETCONF log to /var/confd/var/confd/log/netconf.log

<INFO> 4-Sep-2019::16:19:17.484 configuration-engine confd[15]: - Writing SNMP log to /var/confd/var/confd/log/snmp.log

<INFO> 4-Sep-2019::16:19:17.485 configuration-engine confd[15]: - Writing audit log to /var/confd/var/confd/log/audit.log

<INFO> 4-Sep-2019::16:19:17.485 configuration-engine confd[15]: - Writing developer log to /var/confd/var/confd/log/devel.log

<INFO> 4-Sep-2019::16:19:17.485 configuration-engine confd[15]: - Daemon logging started

<DEBUG> 4-Sep-2019::16:19:17.531 configuration-engine confd[15]: - Loading file /var/confd/etc/confd/iana-crypt-hash.fxs

<DEBUG> 4-Sep-2019::16:19:17.533 configuration-engine confd[15]: - Loading file /var/confd/etc/confd/ietf-netconf-monitoring.fxs

<DEBUG> 4-Sep-2019::16:19:17.549 configuration-engine confd[15]: - Loading file /var/confd/etc/confd/tailf-common-monitoring.fxs

<DEBUG> 4-Sep-2019::16:19:17.573 configuration-engine confd[15]: - Loading file /var/confd/etc/confd/ietf-netconf-acm.fxs

<DEBUG> 4-Sep-2019::16:19:17.585 configuration-engine confd[15]: - Loading file /var/confd/etc/confd/ietf-yang-library.fxs

<DEBUG> 4-Sep-2019::16:19:17.590 configuration-engine confd[15]: - Loading file /var/confd/etc/confd/ietf-restconf-monitoring.fxs

<DEBUG> 4-Sep-2019::16:19:17.592 configuration-engine confd[15]: - Loading file /var/confd/etc/confd/ietf-netconf-notifications.fxs

<DEBUG> 4-Sep-2019::16:19:17.598 configuration-engine confd[15]: - Loading file /var/confd/etc/confd/tailf-netconf-monitoring.fxs

<DEBUG> 4-Sep-2019::16:19:17.603 configuration-engine confd[15]: - Loading file /var/confd/etc/confd/tailf-confd-monitoring.fxs

<DEBUG> 4-Sep-2019::16:19:17.609 configuration-engine confd[15]: - Loading file /var/confd/etc/confd/tailf-acm.fxs

<DEBUG> 4-Sep-2019::16:19:17.614 configuration-engine confd[15]: - Loading file /var/confd/etc/confd/tailf-webui.fxs

<DEBUG> 4-Sep-2019::16:19:17.625 configuration-engine confd[15]: - Loading file /var/confd/etc/confd/tailf-rollback.fxs

<DEBUG> 4-Sep-2019::16:19:17.638 configuration-engine confd[15]: - Loading file /var/confd/etc/confd/tailf-kicker.fxs

<DEBUG> 4-Sep-2019::16:19:17.642 configuration-engine confd[15]: - Loading file /var/confd/etc/confd/tailf-aaa.fxs

<DEBUG> 4-Sep-2019::16:19:17.656 configuration-engine confd[15]: - Loading file /var/confd/etc/confd/tailf-cps-policy.fxs

<DEBUG> 4-Sep-2019::16:19:17.691 configuration-engine confd[15]: - Loading file /var/confd/etc/confd/confd.ccl

<INFO> 4-Sep-2019::16:19:17.824 configuration-engine confd[15]: - Starting to listen for Internal IPC on 0.0.0.0:4565

<INFO> 4-Sep-2019::16:19:18.235 configuration-engine confd[15]: - Starting to listen for NETCONF SSH on 0.0.0.0:2022

<INFO> 4-Sep-2019::16:19:19.766 configuration-engine confd[15]: - Starting to listen for CLI SSH on 0.0.0.0:2024

<INFO> 4-Sep-2019::16:19:20.016 configuration-engine confd[15]: - Starting to listen for WebUI TCP on 0.0.0.0:8008

<INFO> 4-Sep-2019::16:19:21.041 configuration-engine confd[15]: - ConfD started vsn: 6.3

I get empty list contents from call point configured,

WARN [2019-09-04 16:34:58,588] com.broadhop.orchestration.engine.callbacks.StatisticsCallback: experimenting… in detailsIterator
WARN [2019-09-04 16:34:58,588] com.broadhop.orchestration.engine.callbacks.StatisticsCallback: experimenting… size of the list 0

Please let me know if you have any input, thank you

ConfD developer log is the log that allows you to see such error details. the NETCONF trace log you showed is not relevant here since you are using CLI.

/confdConfig/logs/developerLog
developerLog is a debug log for troubleshooting user-written code, AAA rules etc. Enable and check
this log for problems with validation code etc. This log can be configured as
/confdConfig/logs/confdLog. The log is not rotated, i.e. use logrotate(8).

It looks like your list is empty in backend if you get “No entries found”.

Thank you for quick response however I am trying to convey that I did not get any helpful info from confd.log. I have enabled all logs except ‘webuiAccessLog’ in confd. Here is how I enabled confd.log. Am I configuring anything incorrect?

<confdLog>
  <enabled>true</enabled>
  <file>
     <enabled>true</enabled>
     <name>/var/confd/var/confd/log/confd.log</name>
  </file>
  <syslog>
     <enabled>true</enabled>
  </syslog>
</confdLog>

Trying to understand, if, is there any solution to fix this cosmetic error ‘syntax error: unknown arguement’ or there is no any solution released yet. I already attempted ‘presence:true’ however it also did not help.

Why do you want to get anything from confd.log?
The man page and the user guide state:

 /confdConfig/logs/confdLog
       confdLog is ConfD's daemon log. Check this log for startup problems of the ConfD daemon itself. This
       log is not rotated, i.e. use logrotate(8).

This is not related to ConfD startup. isn’t it?
I don’t see a cosmetic error here.
What did you want the output to look like when you enter arguments that don’t exist?

So, confdLog is not the correct log to troubleshoot this issue as it is useful only for startup.
I totally understand your point about why will some one want to enter an argument that is not supported however customer approached with this defect so thought of checking with confd core team for support.
Let me know if you have any other input otherwise we can close this thread concluding that this particular behavior is as expected and does not have any other workaround so Users are supposed to exact parameters which are allowed in YANG model.

Can anyone help me in resolving the “syntax error : element does not exist”
when i try to do with “show running-config movie”


This is the part of my xml file.

The reason is most likely either the same as for your “bad namespace” error, i.e. that you haven’t loaded the relevant .fxs file, or that you haven’t loaded the data in “your xml file” into ConfD. I.e. obviously the existence of some data in an xml file doesn’t per se cause that data to exist in ConfD - how did you attempt to load it? Was it successful?