netopeer2
netopeer2 copied to clipboard
Out of memory error comes
Hi @michalvasko can you help out here: I had given the following configuration and got the following error.
> user-rpc
<chg-password xmlns="urn:o-ran:user-mgmt:1.0">
<currentPassword>vaibhav123</currentPassword>
<newPassword>vaibhav1</newPassword>
<newPasswordConfirm>vaibhav1</newPasswordConfirm>
</chg-password>
ERROR
type: application
tag: operation-failed
severity: error
message: Out of memory
RU-System Logs
Oct 29 11:47:50 abey daemon.info netopeer2-server[2019]: Resolving unresolved data nodes and their constraints...
Oct 29 11:47:50 abey daemon.info netopeer2-server[2019]: All data nodes and constraints resolved.
Oct 29 11:47:50 abey daemon.info netopeer2-server[2019]: Resolving unresolved data nodes and their constraints...
Oct 29 11:47:50 abey daemon.info netopeer2-server[2019]: All data nodes and constraints resolved.
Oct 29 11:47:50 abey daemon.info netopeer2-server[2019]: Published event "rpc" "/o-ran-usermgmt:chg-password" with ID 2 priority 0 for 1 subs.
Oct 29 11:47:50 abey daemon.info netopeer2-server[2019]: Processing "ietf-netconf-monitoring" "operational" event with ID 2.
Oct 29 11:47:50 abey daemon.info netopeer2-server[2019]: Successful processing of "operational" event with ID 2.
Oct 29 11:47:50 abey user.err USERMGMT[2043]: error in get item list !!
Oct 29 11:47:50 abey daemon.err netopeer2-server[2019]: Out of memory
Oct 29 11:47:50 abey daemon.warn netopeer2-server[2019]: Event "rpc" with ID 2 priority 0 failed (Out of memory).
Oct 29 11:47:50 abey daemon.err netopeer2-server[2019]: Failed to send an RPC (User callback failed).
Oct 29 11:47:50 abey daemon.info netopeer2-server[2019]: Session 1: thread 2 event new RPC.
Oct 29 11:47:50 abey daemon.info netopeer2-server[2019]: Session 1: thread 2 event reply error.`
Please note that this is in root user. Can you tell me how out of memory error is coming
I seem to remember fixing something like this some time ago, what netopeer2/sysrepo version are you using?
Hi @michalvasko , I am using Netopeer_server v1.1.70 and Sysrepo v1.4.122. Can you suggest a stable release
You can try using the latest v1 release 1.4.140.
Ok thanks
Hi @michalvasko , I have used v1 release v1 1.4.140 in server still same issue had come.
Please provide the code snippet generating the following message
Oct 29 11:47:50 abey user.err USERMGMT[2043]: error in get item list !!
Hi @michalvasko , I got the same error out of memory did you know how to resolve that, i install the latest version of libyang, libnetconf, sysrepo and netopeer2 but this error is still come.
What exactly "latest version" means, could you write the exact versions? Also, please provide some details, at least the output of netopeer2
when run with -v2
and the steps leading to the problem.
netopeer2(2.0.30),libyang (v2.0.97), libnetconf2 (v2.0.19) and sysrepo (v2.0.47) these version i am using.
Okay, then please do the rest I have asked you to.
Also, please provide some details, at least the output of netopeer2 when run with -v2 and the steps leading to the problem.
netopeer2 (2.0.28) , libyang (v2.0.88), libnetconf2 (v2.0.17) and sysrepo (v2.0.41).
netopeer2-server 2.0.28 compile time: Sep 28 2021, 09:52:31
Same steps as @Abrahamma97 follows.
Okay, then do what I asked before.
Please provide the code snippet generating the following message Oct 29 11:47:50 abey user.err USERMGMT[2043]: error in get item list !!
Hi @michalvasko , please see the code snippet below
char *findUser(sr_session_ctx_t *session, sr_conn_ctx_t *connection, char *username)
{
sr_session_ctx_t *oper_session;
rc = sr_session_start(connection, SR_DS_OPERATIONAL, &oper_session);
if (rc != SR_ERR_OK) {
PRINT(ERR, "USERMGMT", "error in start session !!%s", "\n");
return NULL;`
No, this code prints error in start session !!...
and not error in get item list !!
.
Hi @michalvasko , sorry I forgot to add rest of snippet.
user = sr_session_get_nc_id(session);
asprintf(&username_xpath, "/ietf-netconf-monitoring:netconf-state/sessions/session[session-id=%d]/username", user);
rc = sr_get_item(oper_session, username_xpath , 0, &value);
if (rc != SR_ERR_OK) {
PRINT(ERR, "USERMGMT", "error in get item list !!%s", "\n");
ret = rc;
goto cleanup;
}
```
What I do not understand is that why no error is printed by sr_get_item
if SR_ERR_NO_MEMORY
is returned? In any case, you are using an obsolete sysrepo version and it would be a waste of time for me to try to debug this, especially since the whole problem is so odd.