how to run client/server examples

1,733 views
Skip to first unread message

joy.n...@gmail.com

unread,
Oct 15, 2013, 10:55:15 PM10/15/13
to libne...@googlegroups.com
Hi, I am new to netconf and try to use this.
I downloaded and compiled 0.4.x branch since it is claimed to be more stable..

Could someone share step by step instruction on how to run the client/server examples provided?

thanks.
joy

Radek Krejčí

unread,
Oct 16, 2013, 2:47:04 AM10/16/13
to joy.n...@gmail.com, libne...@googlegroups.com
Hi Joy,
where is claimed that 0.4.x is more stable? We should correct such
information because there are newer stable branches that you should use
- currently it is 0.6.x. There is also step-by-step README inside the
examples/ directory with instructions how to run server and client
should be very intuitive providing information via help command - did
you try it?

Please note, that in the master branch, examples were moved from
libnetconf into the Netopeer project (https://code.google.com/p/netopeer/).

Best regards,
Radek Krejci

Dne 16.10.2013 04:55, joy.n...@gmail.com napsal(a):

hel...@ufersa.edu.br

unread,
Oct 17, 2013, 11:21:55 AM10/17/13
to libne...@googlegroups.com

Hi to all.

I've just downloaded libnetconf (using git) and tried to generate the examples by compiling with the '--with-examples' option. In fact, they haven't been generated at all, but I should mention that INSTALL file instructs the use of that option, even although the 'configure' script doesn't recognize it.

I'd like to see an example of source code showing how to develop NETCONF client and server applications. But it seems those kind of examples have not appeared yet, have they?

Best regards.

Helcio

joy.n...@gmail.com

unread,
Oct 17, 2013, 12:56:16 PM10/17/13
to libne...@googlegroups.com, joy.n...@gmail.com
Thanks.
I checkout 0.6.x version and compiled and followed the instruction.
I could not connect the server.

netconf> connect --port 830 --login vamuser localhost
libnetconf ERROR: Unable to connect to the server (Connection refused).
connect: connecting to the localhost failed.

Radek Krejčí

unread,
Oct 17, 2013, 1:47:01 PM10/17/13
to joy.n...@gmail.com, libne...@googlegroups.com
Hi,
did you set sshd config to listen on port 830 and restarted sshd? This
is tipical behavior when the port you are trying to connect to is
closed. You should be able to connect with ssh via port 830, so try:

$ ssh -l vamuser -p 830 localhost

if you get the same result, problem is in sshd configuration.

Best regards,
Radek Krejci

Dne 17.10.2013 18:56, joy.n...@gmail.com napsal(a):

rkr...@cesnet.cz

unread,
Oct 17, 2013, 2:10:50 PM10/17/13
to libne...@googlegroups.com, hel...@ufersa.edu.br
Hi Helcio,
thanks for the notice - I just removed information about examples from
the INSTALL file - if you will find it somewhere else, please let us
know. The examples were moved to a separated project Netopeer
(https://code.google.com/p/netopeer/) where we will develop them. In
libnetconf repository, you can still find examples in 0.6.x branch.

We plan to add _very_ simple (single purpose, probably only client side)
example applications to the libnetconf's master branch during next few
weeks.

Best regards,
Radek Krejci

Dne čtvrtek, 17. října 2013 17:21:55 UTC+2 hel...@ufersa.edu.br napsal(a):

joy.n...@gmail.com

unread,
Oct 21, 2013, 3:33:49 PM10/21/13
to libne...@googlegroups.com, joy.n...@gmail.com
thanks. I got it to connect. But now it has the authentication failure. But I am sure of the password is the right password.

joy.n...@gmail.com

unread,
Oct 21, 2013, 3:38:07 PM10/21/13
to libne...@googlegroups.com, joy.n...@gmail.com
On Thursday, October 17, 2013 1:47:01 PM UTC-4, Radek Krejčí wrote:
More exactly I can ssh to my localhost in the regular prompt. But running netconf client using "connect --port 803 --login vamuser localhost", I got the error

Radek Krejčí

unread,
Oct 22, 2013, 3:39:27 AM10/22/13
to joy.n...@gmail.com, libne...@googlegroups.com
Hi,
I'm not sure if the --port 803 is typo in the mail or if you are
connecting to a wrong port.

Anyway, if you are getting Authentication failure, you are not using the
right password for the user. Try to see sshd's logs if it can help you.
With this description (without any printouts or logs) I cannot help you.

Regards,
Radek Krejci

Dne 21.10.2013 21:38, joy.n...@gmail.com napsal(a):

Radek Krejčí

unread,
Oct 22, 2013, 10:06:45 AM10/22/13
to Joy Na Wang, libne...@googlegroups.com
Hi,
please see (or send me) the related messages from syslog (usually
/var/log/messages). This happens when the server doesn't start and it
should log the reason into the syslog.

Regards,
Radek

Dne 22.10.2013 15:51, Joy Na Wang napsal(a):
> Now it looks like it is a different error.
>
> netconf> connect --port 830 --login vamuser localhost
> libnetconf WARNING: Unable to check against the knownhost file.
> The authenticity of the host 'localhost' cannot be established.
> RSA key fingerprint is f0:49:d5:7e:43:88:7b:b4:b1:a6:2c:d9:6d:4f:8c:57.
> Are you sure you want to continue connecting (yes/no)? yes
> vamuser@localhost password:
> libnetconf ERROR: Server has closed the communication socket
> libnetconf ERROR: Malformed message received, closing the session .
> connect: connecting to the localhost failed.
> netconf>
>
>
>
>
>
> On Tue, Oct 22, 2013 at 12:39 AM, Radek Krej�� <rkr...@cesnet.cz
> <mailto:rkr...@cesnet.cz>> wrote:
>
> Hi,
> I'm not sure if the --port 803 is typo in the mail or if you are
> connecting to a wrong port.
>
> Anyway, if you are getting Authentication failure, you are not using the
> right password for the user. Try to see sshd's logs if it can help you.
> With this description (without any printouts or logs) I cannot help you.
>
> Regards,
> Radek Krejci
>
> Dne 21.10.2013 21:38, joy.n...@gmail.com
> <mailto:joy.n...@gmail.com> napsal(a):

Radek Krejčí

unread,
Oct 23, 2013, 4:36:42 AM10/23/13
to Joy Na Wang, libne...@googlegroups.com
Hi Joy,
according to the log, you have some issue with DBus. This is out of
scope of the libnetconf, please check that you have correctly installed
and running DBus. Alternatively, you can disable notification in
libnetconf and DBus will not be used (but NETCONF notifications will not
be available):

$ ./configure --disable-notifications

Regards,
Radek

Dne 22.10.2013 17:13, Joy Na Wang napsal(a):
> Oct 22 08:10:16 vam ncserver[60673]: D-Bus connection error (Failed to
> connect to socket /usr/local/var/run/dbus/system_bus_socket: No such
> file or directory)
> Oct 22 08:10:16 vam ncserver[60673]: Unable to connect to the D-Bus's
> system bus
> Oct 22 08:10:16 vam ncserver[60673]: libnetconf initiation failed.
>

hel...@ufersa.edu.br

unread,
Oct 28, 2013, 10:11:14 AM10/28/13
to libne...@googlegroups.com, hel...@ufersa.edu.br

Hi, Radek.

Thank you. I've downloaded the release 0.6.x of libnetconf and generated the examples. Now I'd like to know where I can find information about how to use them.

I've started netconf-server and (later) netconf-client, both without any parameter. So I've typed "connect --port 830 --login helcio localhost" within the prompt supplied by netconf-client. It did work, but I don't know what to do next.

As long as I can remember, the former Yuma project supplied a sample YANG module aimed to configure a toaster. It had also a documentation regarding how to launch both server and client to use that module. That's what I am looking for here in libnetconf: an example about how to use both netconf-server and netconf-client to accomplish simple NETCONF operations.

Again, thank you.

Helcio

rkr...@cesnet.cz

unread,
Oct 28, 2013, 2:18:18 PM10/28/13
to libne...@googlegroups.com, hel...@ufersa.edu.br
Hi Helcio,
libnetconf project is more focused on NETCONF client/server developers instead of users of such applications. This is actually reason why examples were moved from libnetconf to the Netopeer project.

However, the example server, you are using, also provides toaster module took over from Yuma. To work with it from the example client, please follow help descriptions in client's interface:

netconf> help

netconf> <command> --help

and you can also show toaster YANG schema using the following command:

netconf> get-schema toaster

To execute RPC operations defined in YANG modules (e.g. make-toast in toaster YANG module) you have to utilize user-rpc command in the CLI and type operation on your own.

In Netopeer project, we plan to work more user-friendly CLI. In libnetconf examples, we suppose that a user is kind of familiar with YANG and NETCONF operations.

A common problem with example server is access control - please see http://libnetconf.googlecode.com/git/doc/doxygen/html/dd/d59/nacm.html


Regards,
Radek


Dne pondělí, 28. října 2013 15:11:14 UTC+1 hel...@ufersa.edu.br napsal(a):

ak.madh...@gmail.com

unread,
Apr 14, 2014, 2:33:01 PM4/14/14
to libne...@googlegroups.com
Hi Joy,

With reference to this thread, I am wondering whether this issue got resolved.

I am trying hard to install netopeer-cli, which connects to netconf server. Just wondering if you can help on how to install netopeer cli.

I appreciate any suggestions.

Thanks,
Madhusudhan
Reply all
Reply to author
Forward
0 new messages