cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
435
Views
0
Helpful
6
Replies
Highlighted
Beginner

Trying to execute hello world sample app but getting error RuntimeError: YCPPClientError

I installed libydk and related ietf/openconfig/cisco* packages for ydk-py. When I run the hello world app I get the below error. Any probable issues I can debug ? I am using a cisco switch on GNS3.

-ThinkCentre-M92p:$ python hello.py

BEFORE  Provider

Traceback (most recent call last):

  File "hello.py", line 13, in <module>

    provider = NetconfServiceProvider(address="10.138.77.124", port=830, username="test", password="test123", protocol="ssh")

RuntimeError: YCPPClientError: Could not connect to 10.138.77.124

6 REPLIES 6
Highlighted
Cisco Employee

Hi Roshan,

Is the port 830 the correct port for your device?

Thanks

Highlighted

I am using Cisco 7200 on GNS3 with IoS 15.2. I am assuming the default port used for Netconf is 830 since I couldnt find any config command to change the Netconf port. When I connect to netconf using the command "ssh -v  -s test@10.138.77.179 netconf" it works fine but returns connection refused error when I use "-p 830" option as part of the ssh command.

Anyway I can find the port number being used by  Netconf on Cisco switch ?

Thanks for your response.

Regards,

-Roshan.

Highlighted

Roshan,

A Cisco 7200 only supports at best legacy Netconf (RFC 4741-compliant), but the YDK is for RFC6241+RFC6020-compliant devices only. For IOS, this means IOS-XE 16.3.1 or later.

Cheers,

Einar

Highlighted

Thanks Einar, will upgrade and check once.

Highlighted
Beginner

Hi , i have IOS-XE 16.8.1a but still facing this issue. Can you please help ?

Highlighted

Could you please be more specific and post your test environment, script and YDK log with enabled DEBUG level.

Were you able connect to the Netconf server from CLI? The command is:

$ ssh <uname>@<IP-address> -p 830 -v -s netconf

I also would suggest to open new discussian thread as YDK changed a lot since 2017 and some SSH issues have already been addressed.

Yan Gorelik
YDK Solutions