CESNET / netopeer2

NETCONF toolset
BSD 3-Clause "New" or "Revised" License
299 stars 188 forks source link

NC Server auto destroy after couple of rpc get-schema failure. #1382

Closed robbynet closed 1 year ago

robbynet commented 1 year ago

netopeer2-server 2.1.49 in used. When a NC client ( based on libnetconf2 ) is requested to download a module that does not exist, we can see following logs sequence : [INF]: NP: Session 4: thread 2 event new RPC. [INF]: SR: Published event "rpc" "/ietf-netconf-monitoring:get-schema" with ID 53 priority 0 for 1 subscribers. [INF]: SR: Processing "/ietf-netconf-monitoring:get-schema" "rpc" event with ID 53 priority 0 (remaining 1 subscribers). [INF]: NP: Module "o-ran-wg4-features@" was requested. [INF]: SR: Failed processing of "rpc" event with ID 53 priority 0 (remaining 1 subscribers). [ERR]: SR: NETCONF error occurred. [WRN]: SR: Event "rpc" with ID 53 priority 0 failed (Invalid argument). [ERR]: SR: User callback failed. [ERR]: NP: Failed to send an RPC (User callback failed).

[INF]: NP: Session 4: thread 1 event new RPC. [INF]: NP: Session 4: thread 1 event reply error. [INF]: SR: Published event "rpc" "/ietf-netconf-monitoring:get-schema" with ID 54 priority 0 for 1 subscribers. [INF]: SR: Processing "/ietf-netconf-monitoring:get-schema" "rpc" event with ID 54 priority 0 (remaining 1 subscribers). [INF]: NP: Module "o-ran-wg4-features@" was requested. [INF]: SR: Failed processing of "rpc" event with ID 54 priority 0 (remaining 1 subscribers). [ERR]: SR: NETCONF error occurred. [WRN]: SR: Event "rpc" with ID 54 priority 0 failed (Invalid argument). [ERR]: SR: User callback failed. [ERR]: NP: Failed to send an RPC (User callback failed). [INF]: NP: Session 4: thread 0 event new RPC. [INF]: NP: Session 4: thread 0 event reply error.

After several sequence like that, it ended with the following : [INF]: SR: Published event "rpc" "/ietf-netconf:get" with ID 37 priority 0 for 1 subscribers. [INF]: SR: Processing "/ietf-netconf:get" "rpc" event with ID 37 priority 0 (remaining 1 subscribers). [INF]: SR: Successful processing of "rpc" event with ID 37 priority 0 (remaining 0 subscribers). [INF]: SR: Event "rpc" with ID 37 priority 0 succeeded. [INF]: NP: Session 4: thread 0 event new RPC. [INF]: SR: Published event "rpc" "/ietf-netconf:get" with ID 38 priority 0 for 1 subscribers. [INF]: SR: Processing "/ietf-netconf:get" "rpc" event with ID 38 priority 0 (remaining 1 subscribers). [INF]: SR: Successful processing of "rpc" event with ID 38 priority 0 (remaining 0 subscribers). [INF]: SR: Event "rpc" with ID 38 priority 0 succeeded. [INF]: NP: Session 4: thread 0 event new RPC. [INF]: SR: Published event "rpc" "/ietf-netconf:get" with ID 39 priority 0 for 1 subscribers. [INF]: SR: Processing "/ietf-netconf:get" "rpc" event with ID 39 priority 0 (remaining 1 subscribers). [INF]: SR: Successful processing of "rpc" event with ID 39 priority 0 (remaining 0 subscribers). [INF]: SR: Event "rpc" with ID 39 priority 0 succeeded. [INF]: NP: Session 4: thread 0 event new RPC. [INF]: NP: Session 4: thread 1 event new RPC. [INF]: NP: Session 4: thread 1 event session terminated. [INF]: SR: There are no subscribers for "ietf-netconf-notifications" notifications. [INF]: NP: Generated new event (netconf-session-end) => !! NC Server auto destroy !!

It is expected NC Server behavior ?

michalvasko commented 1 year ago

Based on this log I would say it is the client that disconnected.

robbynet commented 1 year ago

Thanks for the clue !