CESNET / libnetconf2

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

Failed to run libnetconf2 example #472

Closed ipseokri closed 6 months ago

ipseokri commented 6 months ago

Hi, I'm a student who is studying network config protocol. I have a problem with starting libnetconf example server and client. I revised user name of config.json , same with my Linux user-name. but it still not working. how to solve this problem? Is there any guideline to run example codes?

libyang[0]: Node "endpoint" not found as a child of "listen" node. (path: Data location "/ietf-netconf-server:netconf-server/listen", line number 5.) Application of configuration data failed.

Roytak commented 6 months ago

Hi, there were some changes to the YANG models and API and we forgot to reflect these changes in the examples. I will try to fix it today, however, I attached a fixed config.json, which should get you by for now. Note that only SSH will work with this config and run the server with ./server and the client with ./client --port 10000 get for example. If you have any other questions then feel free to ask, happy to help. config.json

ipseokri commented 6 months ago

Thank you for your reply,

When I try to run the server, I am still getting the same error message on the libyang file. Is there anything I should change in the config.json file, such as the username or any other details?

image

ipseokri commented 6 months ago

I finished it by mistake. sorry @Roytak

Roytak commented 6 months ago

The username or anything similar has no impact on the issue you're facing. The config.json in the master branch is missing an endpoints element. Switch to the devel branch if you can (preferred), otherwise replace config.json file with the one I attached to my previous reply.

ipseokri commented 6 months ago

there is an error about libyang project's version. I'm sorry for the confusion. Thank you for your kindness. Have a good day.