netopeer2 icon indicating copy to clipboard operation
netopeer2 copied to clipboard

Connecting to sysrepo failed (libyang error).

Open rydy opened this issue 3 years ago • 1 comments

Hi, Environment Version: libyang1 The following problems occasionally occur after a long run.

root@OpenWrt:~# cat /tmp/log/netopeer2-server.log
[INF]: LY: Plugin "/usr/lib/libyang1/extensions/yangdata.so" successfully loaded.
[INF]: LY: Plugin "/usr/lib/libyang1/extensions/nacm.so" successfully loaded.
[INF]: LY: Plugin "/usr/lib/libyang1/extensions/metadata.so" successfully loaded.
[INF]: LY: Plugin "/usr/lib/libyang1/user_types/user_yang_types.so" successfully loaded.
[INF]: LY: Plugin "/usr/lib/libyang1/user_types/user_inet_types.so" successfully loaded.
[INF]: LY: Reading module "ietf-yang-metadata".
[INF]: LY: Module "ietf-yang-metadata@2016-08-05" successfully parsed as implemented.
[INF]: LY: Reading module "yang".
[INF]: LY: Resolving "yang" unresolved schema nodes and their constraints...
[INF]: LY: All "yang" schema nodes and constraints resolved.
[INF]: LY: Module "yang@2017-02-20" successfully parsed as implemented.
[INF]: LY: Reading module "ietf-inet-types".
[INF]: LY: Resolving derived type "union" failed, it will be attempted later.
[INF]: LY: Resolving derived type "union" failed, it will be attempted later.
[INF]: LY: Resolving derived type "union" failed, it will be attempted later.
[INF]: LY: Resolving derived type "union" failed, it will be attempted later.
[INF]: LY: Resolving "ietf-inet-types" unresolved schema nodes and their constraints...
[INF]: LY: All "ietf-inet-types" schema nodes and constraints resolved.
[INF]: LY: Module "ietf-inet-types@2013-07-15" successfully parsed as implemented.
[INF]: LY: Reading module "ietf-yang-types".
[INF]: LY: Module "ietf-yang-types@2013-07-15" successfully parsed as implemented.
[INF]: LY: Searching for "ietf-yang-types" in /mnt/sysrepo/yang.
[INF]: LY: Resolving "sysrepo" unresolved schema nodes and their constraints...
[INF]: LY: All "sysrepo" schema nodes and constraints resolved.
[INF]: LY: Module "sysrepo@2021-01-18" successfully parsed as implemented.
[ERR]: LY: Failed to find matching hash for a child of "installed-module". (/sysrepo:sysrepo-modules/installed-module)
[ERR]: SR: Failed to find matching hash for a child of "installed-module".
[ERR]: NP: Connecting to sysrepo failed (libyang error).
[ERR]: NP: Server init failed.
[INF]: NP: Server terminated.


root@OpenWrt:~# sysrepoctl -l
[ERR]: Failed to find matching hash for a child of "installed-module". (path: /sysrepo:sysrepo-modules/installed-module)
sysrepoctl error: Failed to connect (libyang error)

After deleting SYSREPO, restart the deployment to return to normal.

Thanks.

rydy avatar Dec 23 '21 09:12 rydy

Depending on the exact libyang version, it may be fixed in more recent version (of v1). But if not, it seems like a serious LYB format error (alternatively caused by corrupted LYB file), which are really difficult to debug. So, unless there was a simple way to reproduce, I will not be spending time on this obsolete version.

michalvasko avatar Jan 03 '22 12:01 michalvasko