netopeer2 icon indicating copy to clipboard operation
netopeer2 copied to clipboard

Subscribe call failing

Open meghna-doshi opened this issue 3 years ago • 2 comments

Hi, sysrepoctl - sysrepo YANG schema manipulation tool, compiled with libsysrepo v1.4.147 (SO v5.6.63) netopeer2-server 1.1.77

We are seeing following error in subscribe call:

<2022-01-20 05:10:32.739> <DEVICE> <ERROR> <?xml version="1.0" encoding="UTF-8"?><rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1642655432443">
   <rpc-error>
      <error-type>application</error-type>
      <error-tag>operation-failed</error-tag>
      <error-severity>error</error-severity>
      <error-message xml:lang="en">Invalid argument</error-message>
   </rpc-error>
</rpc-reply>

<2022-01-20 05:10:32.565> <DMS> <DEBUG> <?xml version="1.0" encoding="UTF-8"?><rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1642655432443">
   <create-subscription xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
      <stream>NETCONF</stream>
      <filter>
         <e1-state-info xmlns="urn:commscope:commscope_3gpp-nr-nrm-cuup-node"/>
      </filter>
      <startTime>2027-02-13T19:31:48Z</startTime>
   </create-subscription>
</rpc>

Log snippet on netopeer2-server:

netopeer2-server|INFO "SR" Published event "rpc" "/notifications:create-subscription" with ID 1 priority 0 for 1 subscribers.
netopeer2-server|INFO "SR" Processing "/notifications:create-subscription" "rpc" event with ID 1 priority 0 (remaining 1 subscribers).
netopeer2-server|ERROR "SR" Invalid arguments for function "_sr_event_notif_subscribe".
netopeer2-server|INFO "SR" Failed processing of "rpc" event with ID 1 priority 0 (remaining 1 subscribers).
netopeer2-server|ERROR "SR" Invalid argument
netopeer2-server|WARNING "SR" Event "rpc" with ID 1 priority 0 failed (Invalid argument).
netopeer2-server|ERROR "NP" Failed to send an RPC (User callback failed).
netopeer2-server|INFO "NP" Session 2: thread 0 event new RPC.
netopeer2-server|INFO "NP" Session 2: thread 0 event reply error.

Not able to understand what is "invalid argument" in the subscription call. Can you please suggest.

meghna-doshi avatar Jan 20 '22 05:01 meghna-doshi

If you were using netopeer2 v2, you would get a specific error. In v1 you have to look into the spec to see what is valid and what not.

michalvasko avatar Jan 20 '22 07:01 michalvasko

Hi, Thanks actually we realized that the subscription had startime in future (sometime in 2027). Once we set proper starttime, it works fine.

meghna-doshi avatar Feb 02 '22 00:02 meghna-doshi