[sysrepo-devel] Unable to send <rpc> message to netopeer2-server while running sysrepo datastore.

Rajanishkumar Upadhyay urajanis at palcnetworks.com
Mon Jan 22 12:35:33 UTC 2018


Hi All !!
I was trying to emulate the demo of dnsmasq and sysrepo integration as
mentioned on dnsmasq-demo <http://www.sysrepo.org/dnsmasq-demo>.
1. During the installation, based on dnsmasq-sysrepo-github
<https://github.com/sysrepo/dnsmasq-sysrepo> :
    Third step asks for the following command:
     sysrepoctl --init --module=sysrepo-dnsmasq

     which results in the following error:
     sysrepoctl: urecognized option '--init'
     sysrepoctl: option '-' is invalid. Exiting.

     Inorder to fix this issue I followed the reply given on : init-query
<http://lists.sysrepo.org/archives/sysrepo-devel/2017-April/000248.html>
     where it was mentioned that instead of init, install may do the task.

     So I do the following, and get the following result:
     [root at rajneesh yang]# sysrepoctl -i --yang "sysrepo-dnsmasq at 2016-01-
               22.yang"
     Installing a new module from file 'sysrepo-dnsmasq at 2016-01-22.yang'...
     Installing the YANG file to '/etc/sysrepo/yang/sysrepo-dnsmasq at 2016-01-
             22.yang'...
     Installing data files for module 'sysrepo-dnsmasq'...
     Notifying sysrepo about the change...
     Install operation completed successfully.

     Then I do the next step:
      [root at rajneesh yang]# sysrepocfg --import=dnsmasq.xml
--datastore=startup          sysrepo-dnsmasq
      The new configuration was successfully applied.
2. Expecting that all configurations are applied successfully I tried to
emulate the video on dnsmasq-demo-video <https://asciinema.org/a/47977>.
     a) It may be noted that the video uses direct ssh rather than using
the netopeer2-cli with the command :
        ssh admin at 127.0.0.1 -p 6001 -s netconf (Followed suite with
requisite changes.)
         At 1:26 in the video, the person typing makes an <rpc> call to get
the configuration of the dnsmasq:
        #252
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
    <get-config>
        <source>
            <running\>
        </source>
        <filter>
            <dnsmasq-cfg xmlns="urn:ietf:params:xml:ns:yang:dnsmasq"/>
        </filter>
    </get-config>
</rpc>
##

      *  But when I follow the step my Netopeer2-server hangs on the
following step:*
*        [2018/01/22 11:35:10.231346, 2] grow_window:  growing window
(channel                43:0) to 1280000 bytes*
*        netopeer2-server[354]: Session 3: inactive read timeout elapsed.*


       Which implies I couldn't perform the <rpc> call.
3. To try by some other means I utilized the netopeer2-cli program obtained
from Netopeer2-github <https://github.com/CESNET/Netopeer2> .
     wherein after connecting to the server I try get-config with the
following unsuccessful attempts.

   a) get-config --source running
       output: DATA
       output: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="2">
                   <data xmlns="urn:ietf:params:xml:ns:
netconf:base:1.0"/></rpc-reply>
   b) get-config --source running --filter-xpath
urn:ietf/params:xml/ns:yang/dnsmasq
       output:
       ly VERBOSE: Resolving unresolved data nodes and their constraints...
       ly VERBOSE: All data nodes and constraints resolved.
       ly ERROR: Module name "urn" refers to an unknown module.
       cli_send_recv: Failed to send the RPC.
   c) get-config --source running --filter-xpath "yang/dnsmasq"
       output:
       <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="3">
       <rpc-error><error-type>application</error-type><
error-tag>operation-failed</error-tag>
       <error-severity>error</error-severity>
       <error-message xml:lang="en">np2srv_sr_get_items_iter failed
(sysrepo: Invalid argument).</error-message>
       </rpc-error></rpc-reply>

       ERROR
        type:     application
        tag:      operation-failed
        severity: error
        message:  np2srv_sr_get_items_iter failed (sysrepo: Invalid
argument).

    The expected output is:
     <rpc-reply message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
     <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
     <dnsmasq-cfg xmlns="urn:ietf:params:xml:ns:yang:dnsmasq">
     <username>root</username>
     <groupname>root</groupname>
     <dns-server><enabled>true</enabled><port>53</port></dns-server>
     </dnsmasq-cfg></data></rpc-reply>

*What shall be the correct procedure to run the same ? Any help or advice
shall be of great value.*

Regards
Rajanish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sysrepo.org/archives/sysrepo-devel/attachments/20180122/995ada69/attachment.html>


More information about the sysrepo-devel mailing list