Subscription to netopeer server fails from netopeer-cli

259 views
Skip to first unread message

sbab...@gmail.com

unread,
Feb 26, 2015, 10:54:55 AM2/26/15
to neto...@googlegroups.com
Hi,

I have downloaded the latest libnetconf and netopeer. I could able to do basic configurations(get, get-config, edit-config, etc..). But, i have problems in subscribing for notifications. Please find below error received in cli.


netconf>
netconf>
netconf>
netconf> subscribe
NETCONF error: operation-not-supported (application) - Request could not be completed because the requested operation is not supported by this implementation.
NETCONF error: operation-not-supported (application) - Request could not be completed because the requested operation is not supported by this implementation.
NETCONF error: operation-not-supported (application) - Request could not be completed because the requested operation is not supported by this implementation.
netconf>



I could also see the below log message in /var/log/messages in server. As per the code, this error message is in default case of ncds_apply_rpc function.


>>Feb 26 20:11:35 sys-214-26 ncserver[15734]: E| ncds_apply_rpc: unsupported NETCONF operation requested.
>>Feb 26 20:11:35 sys-214-26 ncserver[15734]: E| ncds_apply_rpc: unsupported NETCONF operation requested.
>>Feb 26 20:11:35 sys-214-26 ncserver[15734]: E| ncds_apply_rpc: unsupported NETCONF operation requested.


Is subscription not supported in latest code? or Am i missing something?
Please help.

Thanks,
Babu

Radek Krejčí

unread,
Feb 26, 2015, 11:00:56 AM2/26/15
to sbab...@gmail.com, neto...@googlegroups.com
Hi Babu,

notifications should be supported. I just tried it and it works for me. Can you post config.log from libnetconf and netopeer-server ?

Best regards,
Radek


Dne 26.2.2015 v 15:51 sbab...@gmail.com napsal(a):

sbab...@gmail.com

unread,
Feb 26, 2015, 2:18:57 PM2/26/15
to neto...@googlegroups.com, sbab...@gmail.com
Hi Radek,

Please find attached config.log files of libnetconf and server-sl.

As i mentioned earlier, there is no switch case in ncds_apply_rpc function to handle NC_OP_CREATESUBSCRIPTION case.

Regards,
Babu
libnetconf_config.log
server-sl_config.log

Radek Krejčí

unread,
Feb 27, 2015, 2:11:36 AM2/27/15
to sbab...@gmail.com, neto...@googlegroups.com
hmm, that is strange. According to logs, the notifications should be enabled. The subscribe rpc is not handled by the libnetconf in nc_apply_rpc() but it should be handled by the server before calling nc_apply_rpc() (in yor case check main.c:166). The weird thing is, that you are getting the error message 3-times.

Can you try netopeer-server instead of the netopeer-server-sl, which is deprecated and will be removed from the source codes soon? In the CLI, please also print the session info using status command and try to print more detaile info about communication using the debug command and then try to subscribe.

Regards,
Radek


Dne 26.2.2015 v 20:18 sbab...@gmail.com napsal(a):

sbab...@gmail.com

unread,
Feb 27, 2015, 2:54:40 AM2/27/15
to neto...@googlegroups.com, sbab...@gmail.com
Hi Radek,

Thanks for the response.

I was also expecting the same to be done by server in NC_OP_CREATESUBSCRIPTION req_op in main.c. But, this can hit only when (req_type == NC_RPC_SESSION).

In my case, the req_type is NC_RPC_UNKNOWN and not NC_RPC_SESSION in main.c

Are you saying that single-level server does not support subscription?

Regards,
Babu

Radek Krejčí

unread,
Feb 27, 2015, 1:19:48 PM2/27/15
to sbab...@gmail.com, neto...@googlegroups.com
Hi Babu,

Dne 27.2.2015 v 08:54 sbab...@gmail.com napsal(a):
> Hi Radek,
>
> Thanks for the response.
>
> I was also expecting the same to be done by server in NC_OP_CREATESUBSCRIPTION req_op in main.c. But, this can hit only when (req_type == NC_RPC_SESSION).
>
> In my case, the req_type is NC_RPC_UNKNOWN and not NC_RPC_SESSION in main.c
>

this information was very helpful :) Please try to pull current
libnetconf (bugfix is in both master and 0.9.x branches).

> Are you saying that single-level server does not support subscription?

No, I'm just saying that I'm not willing to test it :)


Best regards,
Radek

>
> Regards,
> Babu
>

sbab...@gmail.com

unread,
Mar 2, 2015, 4:12:26 AM3/2/15
to neto...@googlegroups.com, sbab...@gmail.com

Hi Radek,

Thanks for the solution. I will check with the fix.

Regards,
Babu
Reply all
Reply to author
Forward
0 new messages