CESNET / libnetconf2

C NETCONF library
BSD 3-Clause "New" or "Revised" License
203 stars 147 forks source link

[Query] Netconf notification not being received by Client Application #483

Closed ankit7gup closed 6 months ago

ankit7gup commented 6 months ago

Hi @michalvasko,

I would need your support/advice in one situation. We are using below mentioned versions for Netconf server and Libnetconf2. libnetconf2 2.1.31 libyang 2.1.55 sysrepo 2.2.60 netopeer2-server 2.1.59

The Netopeer2-server is running in one device and sending Netconf notifications to the connected client via SSH callhome with no errors observed. The client application is developed using an old(very old) version of Libnetconf2(v0.11.r1). It is beyond our control for the client application to be upgraded.

Device 1(With Netconf server)

_2024-05-03 07:05:09.695260 info netopeer2-server[1538]: EV LISTEN: "o-ran-supervision" "notif" ID 1875 processing. 2024-05-03 07:05:09.695964 info netopeer2-server[1538]: EV LISTEN: "o-ran-supervision" "notif" ID 1875 priority 0 success (remaining 0 subscribers). =>This notification was not received/detected at client side.

2024-05-03 07:05:35.741589 info netopeer2-server[1538]: EV LISTEN: "o-ran-uplane-conf" "notif" ID 5 processing. 2024-05-03 07:05:35.742290 info netopeer2-server[1538]: EV LISTEN: "o-ran-uplane-conf" "notif" ID 5 priority 0 success (remaining 0 subscribers). 2024-05-03 07:05:35.771778 info netopeer2-server[1538]: EV LISTEN: "o-ran-uplane-conf" "notif" ID 6 processing. 2024-05-03 07:05:35.772450 info netopeer2-server[1538]: EV LISTEN: "o-ran-uplane-conf" "notif" ID 6 priority 0 success (remaining 0 subscribers). 2024-05-03 07:05:36.865185 info netopeer2-server[1538]: EV LISTEN: "ietf-hardware" "notif" ID 2 processing. 2024-05-03 07:05:36.866045 info netopeer2-server[1538]: EV LISTEN: "ietf-hardware" "notif" ID 2 priority 0 success (remaining 0 subscribers). 2024-05-03 07:05:36.925735 info netopeer2-server[1538]: EV LISTEN: "ietf-netconf-notifications" "notif" ID 10 processing. 2024-05-03 07:05:36.926011 info netopeer2-server[1538]: EV LISTEN: "ietf-netconf-notifications" "notif" ID 10 priority 0 success (remaining 0 subscribers). 2024-05-03 07:05:36.962968 info netopeer2-server[1538]: EV LISTEN: "o-ran-uplane-conf" "notif" ID 7 processing. 2024-05-03 07:05:36.963681 info netopeer2-server[1538]: EV LISTEN: "o-ran-uplane-conf" "notif" ID 7 priority 0 success (remaining 0 subscribers). 2024-05-03 07:05:36.993489 info netopeer2-server[1538]: EV LISTEN: "o-ran-uplane-conf" "notif" ID 8 processing. 2024-05-03 07:05:36.994201 info netopeer2-server[1538]: EV LISTEN: "o-ran-uplane-conf" "notif" ID 8 priority 0 success (remaining 0 subscribers). 2024-05-03 07:05:37.843200 err netopeer2-server[1538]: Session 2: SSH channel unexpected EOF. 2024-05-03 07:05:37.843245 info netopeer2-server[1538]: Session 2: thread 0 event session terminated.

Device 2(Netconf client)

[May: 3: 7:05:35:901483][ERR][ncClient.cpp:1054][1392][lnc2_print_clb()][nc ERROR: Session 2: inactive read timeout elapsed.] [May: 3: 7:05:35:901519][ERR][ncClient.cpp:1060][1392][lnc2_printclb()][nc VERBOSE: Session 2: notification thread exit.]

While the notifications are successful from Netconf server side, the first notification as shown below is not being received/detected at the client application side, and subsequent notification gives error errors and then session is closed. Post session closure, when new session is created using call-home, all notifications are again successful.

Is it possible to confirm, issue is in client or server side. Also, I know this is very old version and client side, but by any chance would it be possible to confirm if such issue was there is the Libnetconf2 which was fixed in the past.

Sorry for bothering you with this issue and such an old version, but your advice/confirmation would help me to go ahead and make the client application upgrade the libnetconf2 version to fix this issue, if that is the case.

Thanks in advance! Would really appreciate your help as always.

Regards, Ankit

michalvasko commented 6 months ago

The issue is that the client does not like the formatting of the NETCONF message of the notification for some reason. Although highly unlikely, there may even be a problem on the server side but to decide, you would have to print the messages being sent/received. For the server, you just run it with -c MSG, I cannot help you with the client. Other than that, updating the client is pretty much certain to fix the issue.

ankit7gup commented 6 months ago

Hi @michalvasko, Sorry for the late response. We shall try the scenario by upgrading the client version.