CESNET / netopeer2

NETCONF toolset
BSD 3-Clause "New" or "Revised" License
296 stars 187 forks source link

Failing to "get" and other basics with Version 2.1.62 #1407

Closed sjd-xlnx closed 1 year ago

sjd-xlnx commented 1 year ago

I recently updated sysrepo and netopeer2 from an older version (Nov 8 2022): sysrepo 2.2.12, netopeer2 2.1.42. I can start the server, and connect with netopeer2-cli. However, I am getting errors, for example, if I use "get" from the client...

> get
ERROR
        type:     application
        tag:      operation-failed
        severity: error
        message:  Getting GID grp entry failed (Numerical result out of range).

        type:     application
        tag:      operation-failed
        severity: error
        message:  User callback failed.

I looked into this "GID grp entry failed" and wondered if it relates to NACM, but I do have my NACM disabled, and also my user set as the recovery user. I also went back to the "working version" mentioned above, and see that I do also get these errors shown on the server, but they don't appear to affect anything (i.e. more like warnings than errors).

Here's the log when I "connect"...

> verb 2
> connect -p 5678
nc VERBOSE: Trying to connect via IPv4 to 127.0.0.1:5678.
nc VERBOSE: Successfully connected to localhost:5678 over IPv4.
nc VERBOSE: Publickey athentication.
nc VERBOSE: Trying to authenticate using pair "/home/stevend/.ssh/id_rsa" "/home/stevend/.ssh/id_rsa.pub".
nc VERBOSE: Authentication successful.
ly VERBOSE: Searching for "ietf-inet-types" in "/home/stevend/netconf".
ly VERBOSE: Newer revision than "ietf-inet-types@2013-07-15" not found, using this as the latest revision.
ly VERBOSE: Searching for "ietf-yang-types" in "/home/stevend/netconf".
ly VERBOSE: Newer revision than "ietf-yang-types@2013-07-15" not found, using this as the latest revision.
nc VERBOSE: Capability for <get-schema> support found.
nc VERBOSE: Capability for yang-library support found.
nc VERBOSE: Capability for XPath filter support found.
nc VERBOSE: Capability for NMDA RPCs support not found.
nc VERBOSE: Reading module "ietf-netconf@<latest>" from local file "/home/stevend/.local/share/yang/modules/ietf-netconf@2013-09-29.yang".
nc VERBOSE: Reading module "ietf-netconf-acm@2018-02-14" from local file "/home/stevend/.local/share/yang/modules/ietf-netconf-acm@2018-02-14.yang".
nc VERBOSE: Reading module "ietf-yang-metadata@2016-08-05" from local file "/home/stevend/.local/share/yang/modules/libyang/ietf-yang-metadata@2016-08-05.yang".
nc VERBOSE: Reading module "ietf-yang-library@2019-01-04" from local file "/home/stevend/.local/share/yang/modules/sysrepo/ietf-yang-library@2019-01-04.yang".
nc VERBOSE: Unable to identify revision of the import module "ietf-datastores" from the available server side information.
nc VERBOSE: Reading module "ietf-datastores@<latest>" from server via get-schema.
nc WARNING: Unexpected reply without data to a <get> RPC.
nc VERBOSE: Trying to use capabilities instead of ietf-yang-library data.
nc VERBOSE: Reading module "sysrepo-plugind@2022-08-26" from local file "/home/stevend/.local/share/yang/modules/sysrepo/sysrepo-plugind.yang".
nc VERBOSE: Reading module "ietf-netconf-with-defaults@2011-06-01" from local file "/home/stevend/.local/share/yang/modules/sysrepo/ietf-netconf-with-defaults.yang".
nc VERBOSE: Reading module "ietf-netconf-notifications@2012-02-06" from local file "/home/stevend/.local/share/yang/modules/sysrepo/ietf-netconf-notifications.yang".
nc VERBOSE: Reading module "nc-notifications@2008-07-14" from local file "/home/stevend/.local/share/yang/modules/netopeer2/nc-notifications@2008-07-14.yang".
nc VERBOSE: Reading module "notifications@2008-07-14" from local file "/home/stevend/.local/share/yang/modules/netopeer2/notifications@2008-07-14.yang".
nc VERBOSE: Reading module "ietf-x509-cert-to-name@2014-12-10" from local file "/home/stevend/.local/share/yang/modules/netopeer2/ietf-x509-cert-to-name@2014-12-10.yang".
nc VERBOSE: Reading module "iana-crypt-hash@2014-08-06" from local file "/home/stevend/.local/share/yang/modules/netopeer2/iana-crypt-hash@2014-08-06.yang".
nc WARNING: Unexpected reply without data to a <get> RPC.

You can see these "Unexpected reply without data to a RPC" messages, which I think is when the server throws error due to the "grp entry failure".

I can do "status"...

> status
Current NETCONF session:
  ID          : 2
  Host        : 127.0.0.1
  Port        : 5678
  Transport   : SSH
  Capabilities:
        urn:ietf:params:netconf:base:1.0
        urn:ietf:params:netconf:base:1.1
        urn:ietf:params:netconf:capability:writable-running:1.0
        urn:ietf:params:netconf:capability:candidate:1.0
        urn:ietf:params:netconf:capability:confirmed-commit:1.1
        urn:ietf:params:netconf:capability:rollback-on-error:1.0
        urn:ietf:params:netconf:capability:validate:1.1
        urn:ietf:params:netconf:capability:startup:1.0
        urn:ietf:params:netconf:capability:xpath:1.0
        urn:ietf:params:netconf:capability:with-defaults:1.0?basic-mode=explicit&also-supported=report-all,report-all-tagged,trim,explicit
        urn:ietf:params:netconf:capability:notification:1.0
        urn:ietf:params:netconf:capability:interleave:1.0
        urn:ietf:params:netconf:capability:url:1.0?scheme=scp,http,https,ftp,sftp,ftps,file
        urn:ietf:params:xml:ns:yang:ietf-yang-metadata?module=ietf-yang-metadata&revision=2016-08-05
        urn:ietf:params:xml:ns:yang:ietf-inet-types?module=ietf-inet-types&revision=2013-07-15
        urn:ietf:params:xml:ns:yang:ietf-yang-types?module=ietf-yang-types&revision=2013-07-15
        urn:ietf:params:xml:ns:yang:ietf-netconf-acm?module=ietf-netconf-acm&revision=2018-02-14
        urn:ietf:params:netconf:capability:yang-library:1.1?revision=2019-01-04&content-id=2195666445
        urn:sysrepo:plugind?module=sysrepo-plugind&revision=2022-08-26
        urn:ietf:params:xml:ns:netconf:base:1.0?module=ietf-netconf&revision=2013-09-29&features=writable-running,candidate,confirmed-commit,rollback-on-error,validate,startup,url,xpath
        urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults?module=ietf-netconf-with-defaults&revision=2011-06-01
        urn:ietf:params:xml:ns:yang:ietf-netconf-notifications?module=ietf-netconf-notifications&revision=2012-02-06
        urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring?module=ietf-netconf-monitoring&revision=2010-10-04
        urn:ietf:params:xml:ns:netmod:notification?module=nc-notifications&revision=2008-07-14
        urn:ietf:params:xml:ns:netconf:notification:1.0?module=notifications&revision=2008-07-14
        urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name?module=ietf-x509-cert-to-name&revision=2014-12-10
        urn:ietf:params:xml:ns:yang:iana-crypt-hash?module=iana-crypt-hash&revision=2014-08-06

I should also say that when changing version, I cleared out the data stores, and did a sysrepo "shm_clean", etc.

I've also been back to the "working" version to check that it still does work (it does), although as I said, I do see these "[ERR]: SR: Getting GID grp entry failed (Numerical result out of range)." on the server, but they don't appear to affect operation.

Did something change in netopeer2 and now these "grp entry errors" are causing operations to get aborted, whereas before they were ignored? What causes the "grp entry errors"? Any ideas?

I'm going to try a try some other versions (between my "working" version and the current "latest" and see if I can find where the problem starts - I'll let you know what I find).

Thanks in advance.

PS: I am using "Red Hat Enterprise Linux Workstation 7.5 (Maipo)"

michalvasko commented 1 year ago

There was some obsolete code still in sysrepo NACM, it should all be updated and this error fixed, please try it with the latest sysrepo devel.

sjd-xlnx commented 1 year ago

@michalvasko yes, that fixed it! I just used "devel" branch on sysrepo and netopeer2 back on master/HEAD. The "grp entry error" has gone, and I can do "get", and other things OK. Great work. Thankyou :-)