ConfD User Community

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.

This works for me. Thanks a lot.