"framing_error" when do action with special characters in input

Hi Guys,
I have a question about using special character in the input of action as below

netconf request works

<action xmlns="urn:ietf:params:xml:ns:yang:1" xmlns:nc="http://tail-f.com/ns/netconf/actions/1.0">
            <container-a xmlns="urn:rdns:com:company:oammodel:company-complete">
                <action-with-passphrase-input-and-output>
                    <input-string>input string</input-string>
                </action-with-passphrase-input-and-output>
            </container-a>
</action>

Here is the trace log in ConfD:

<INFO> 11-Jan-2022::05:51:59.976 cm-yang-provider-5d49c886d8-zshmh confd[60]: netconf id=30 got rpc: {urn:ietf:params:xml:ns:yang:1}action attrs: message-id="2"
<INFO> 11-Jan-2022::05:51:59.984 cm-yang-provider-5d49c886d8-zshmh confd[60]: netconf id=30 action name={'urn:rdns:com:company:oammodel:company-complete'}'action-with-passphrase-input-and-output' instance-identifier=/ccomplete:container-a, attrs: message-id="2"
<INFO> 11-Jan-2022::05:52:00.047 cm-yang-provider-5d49c886d8-zshmh confd[60]: netconf id=30 sending rpc-reply, attrs: message-id="2"

netconf request does not work

<action xmlns="urn:ietf:params:xml:ns:yang:1" xmlns:nc="http://tail-f.com/ns/netconf/actions/1.0">
            <container-a xmlns="urn:rdns:com:company:oammodel:company-complete">
                <action-with-passphrase-input-and-output>
                    <input-string>inputäê  string</input-string>
                </action-with-passphrase-input-and-output>
            </container-a>
</action>

The only difference between the 2 requests in the 2 special characters in input-string. Here is the trace log in ConfD:

<INFO> 11-Jan-2022::04:18:08.355 cm-yang-provider-5d49c886d8-zshmh confd[60]: netconf id=29 got rpc: {urn:ietf:params:xml:ns:yang:1}action attrs: message-id="2"
<INFO> 11-Jan-2022::04:18:08.359 cm-yang-provider-5d49c886d8-zshmh confd[60]: netconf id=29 framing_error

The question is why there is “framing_error”? Is there any restrictions of special characters such as ä, ê and so on in the input of ConfD action?

BRs
Michael

Hi,

Check that your NETCONF client can handle those characters. ConfD can handle UTF-8 characters as the NETCONF standard specifies, which includes those ISO 8859-1 (Latin-1) characters.

Hi cohult,
When only one special character ê or ä is used in the input, there is no “framing_error”. The action request is as blow:

<action xmlns="urn:ietf:params:xml:ns:yang:1" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
        <container-a xmlns="urn:rdns:com:company:oammodel:company-complete">
        <action-with-passphrase-input-and-output>
        <input-string>inputê string</input-string>
        </action-with-passphrase-input-and-output>
        </container-a>
</action>

And here is the netconf log in ConfD:

<INFO> 12-Jan-2022::06:08:34.821 cm-yang-provider-5d49c886d8-zshmh confd[60]: netconf id=86 new tcp session for user "user1" from 192.168.52.160
<INFO> 12-Jan-2022::06:08:37.825 cm-yang-provider-5d49c886d8-zshmh confd[60]: netconf id=86 got rpc: {urn:ietf:params:xml:ns:yang:1}action attrs: message-id="2"
<INFO> 12-Jan-2022::06:08:37.830 cm-yang-provider-5d49c886d8-zshmh confd[60]: netconf id=86 action name={'urn:rdns:com:company:oammodel:company-complete'}'action-with-passphrase-input-and-output' instance-identifier=/ccomplete:container-a, attrs: message-id="2"
<INFO> 12-Jan-2022::06:08:37.880 cm-yang-provider-5d49c886d8-zshmh confd[60]: netconf id=86 sending rpc-reply, attrs: message-id="2"

So I think the NETCONF client can handle these special characters.

I am not sure if the yang definition may cause this error. Anyway I add it as below:

    import company-yang-extensions {
        prefix yexte;
    }


        action action-with-passphrase-input-and-output {
            description "action with passphrase input and output";
            input {
                leaf input-string {
                    type string;
                    yexte:is-passphrase;
                }
            }
            output {
                leaf output-string {
                    type string;
                    yexte:is-passphrase;
                }
            }
        }

And “is-passphrase” is an extension defined in the imported module.

I suggest you turn on the netconf trace log or in some other way find out what your client is sending.

I modified the examples.confd/intro/7-c_actions example to do exactly what you do (except your yexte extensions) and that works as expected.