Error using netconf-console or netconf-console-tcp

I am working my way through the examples and am failing when I try netconf-console or netconf-console-tcp. The CLI works fine, but not when trying to use the netconf-console.
OS: Ubuntu 20.04, python 2.7(python command), python3 is also installed. Confd basic 7.6.
The server comes up fine and works without issue against the CLI in the 1-2-3 example.
All server messages say CONFD_OK on startup.

make query gets the following errors: (paramiko is imported into python3, I can only find it for python3 in Ubuntu 20.04).
murrayl@docker-yang-explorer:~/confd-7.6/examples.confd/intro/1-2-3-start-query-model$ make query
/home/murrayl/confd-7.6/bin/netconf-console cmd-get-dhcpd.xml
Traceback (most recent call last):
File “/home/murrayl/confd-7.6/bin/netconf-console.py”, line 1390, in
main(parser, o)
File “/home/murrayl/confd-7.6/bin/netconf-console.py”, line 1311, in main
fd.close()
BrokenPipeError: [Errno 32] Broken pipe
make: *** [Makefile:88: query] Error 1
murrayl@docker-yang-explorer:~/confd-7.6/examples.confd/intro/1-2-3-start-query-model$

when using the tcp option, still no joy.
murrayl@docker-yang-explorer:~/confd-7.6/examples.confd/intro/1-2-3-start-query-model$ netconf-console-tcp cmd-get-dhcpd.xml
Failed to connect to localhost: [Errno 111] Connection refused
murrayl@docker-yang-explorer:~/confd-7.6/examples.confd/intro/1-2-3-start-query-model$

I’m open to changing OSes or versions so that I can properly evaluate the product, but just need to get the product exercised so I can properly evaluate a purchase.

Seems like a Python installation issue. Required versions when using ConfD 7.6 should be:

  • Python Paramiko - 2.2 or higher
  • Python - 3.7 or higher. (3.5 support is deprecated and was removed in ConfD 7.7)
$ head -n10 $CONFD_DIR/bin/netconf-console
#!/bin/sh

PY=$(which python3)

if [ -z "$PY" ]; then
   PY=$(which python2)
   if [ -z "$PY" ]; then
       PY=$(which python)
   fi
fi

Check your python3 version:

$ which python3
/usr/local/bin/python3
$ /usr/local/bin/python3 --version
Python 3.9.9

Hi cohult,

I also got the same error when using confD-7.7.1:

root@sc2:~/confd-7.7.1/examples.confd/intro/python/1-2-3-start-query-model# netconf-console cmd-get-dhcpd.xml
Traceback (most recent call last):
File “/root/confd-7.7.1/bin/netconf-console.py”, line 1390, in
main(parser, o)
File “/root/confd-7.7.1/bin/netconf-console.py”, line 1311, in main
fd.close()
BrokenPipeError: [Errno 32] Broken pipe

root@sc2:~/confd-7.7.1/examples.confd/intro/python/1-2-3-start-query-model# python3 --version
Python 3.8.10

root@sc2:~/confd-7.7.1/examples.confd/intro/python/1-2-3-start-query-model# pip show paramiko
Name: paramiko
Version: 2.9.2
Summary: SSH2 protocol library
Home-page: https://paramiko.org
Author: Jeff Forcier
Author-email: jeff@bitprophet.org
License: LGPL
Location: /usr/local/lib/python3.8/dist-packages
Requires: bcrypt, cryptography, pynacl
Required-by: scp

root@sc2:~/confd-7.7.1/examples.confd/intro/python/1-2-3-start-query-model# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.4 LTS
Release:        20.04
Codename:       focal

This is most likely caused by that you do not have xmllint installed; looks like netconf-console might do a better job at detecting that. On Ubuntu-based distributions, install the libxml2-utils package.

1 Like

This works for me. Thanks a lot.

Thanks for guidance. It works just as your info.

Hello, I’m fairly new to ConfD and I am encountering some errors with the netconf examples. Please can anyone help?
THIS IS THE PRINTOUT MESSAGE I GET:

lawson@lawson:~/confd/examples.confd/intro/1-2-3-start-query-model$ netconf-console cmd-get-dhcpd.xml
Traceback (most recent call last):
File “/home/lawson/.local/bin/netconf-console”, line 5, in
from ncc.ncc import main
File “/home/lawson/.local/lib/python3.8/site-packages/ncc/init.py”, line 1, in
from . import ncc
File “/home/lawson/.local/lib/python3.8/site-packages/ncc/ncc.py”, line 17, in
from . import nctransport, completions, operations
File “/home/lawson/.local/lib/python3.8/site-packages/ncc/operations.py”, line 82, in
manager.VENDOR_OPERATIONS.update(rpc=ExecuteRpc, get_config_ncc=GetConfigRpc, get_ncc=GetRpc,
AttributeError: module ‘ncclient.manager’ has no attribute ‘VENDOR_OPERATIONS’

You are using an old and unsupported variant of the netconf-console tool; there are executables netconf-console and netconf-console-tcp packaged with ConfD, but you are using netconf-console from a PyPI package. Please remove the latter by

$ pip uninstall netconf-console

There is also netconf-console2 PyPI package that is renamed and updated variant of the old package. Either that one or the variant distributed with ConfD should work.

Thanks for the guidance.
I removed the older version of the netconf-console and tried to run the examples with netconf-console2 but I still get some errors. Please have a look:

lawson@lawson:~/confd/examples.confd/intro/1-2-3-start-query-model$ netconf-console2 cmd-get-dhcpd.xml
Exception: Incompatible ssh peer (no acceptable host key)
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/paramiko/transport.py”, line 2083, in run
self._handler_table[ptype](self, m)
File “/usr/lib/python3/dist-packages/paramiko/transport.py”, line 2198, in _negotiate_keys
self._parse_kex_init(m)
File “/usr/lib/python3/dist-packages/paramiko/transport.py”, line 2377, in _parse_kex_init
raise SSHException(
paramiko.ssh_exception.SSHException: Incompatible ssh peer (no acceptable host key)

Operation failed: SSHError - Negotiation failed: Incompatible ssh peer (no acceptable host key)

The error means that ConfD does not offer key-exchange algorithm that is understood by netconf-console2 (or more precisely, paramiko library). This is caused by either old ConfD release or by too restrictive ConfD configuration. Have a look at /confdConfig/ssh/algorithms/kex in man confd.conf; try setting that in your confd.conf to an empty string, in that case ConfD offers all known algorithms. If that does not help, you might need to update ConfD.