ConfD User Community

Netconf-console has no response


#1

Hi,
I install the netconf-console with
pip install ncclient
pip install netconf-console

After it is installed, if I input the simple command, it is hung there and doesn’t response anything, maybe several minutes later it has responses:
$ # netconf-console -h

Whether there is way to trace the root cause, seems it has a boot time?

Thanks
Darcy


#2

I’m afraid you’re in the wrong forum for this question… ConfD comes with a Python program called netconf-console, but it doesn’t require any installation, it is ready to run when you have sourced <confd-installation-directory>/confdrc, and it doesn’t use ncclient. It seems you are trying to use https://pypi.org/project/netconf-console/, which has nothing to do with ConfD - if you have problems with that, I’d suggest that you contact the author (who just happens to be someone with a very long experience in working with ConfD and ConfD’s netconf-console, I have to wonder why he has created this confusion…).


#3

@per
Really thanks for the response!
I always thought they are the same thing but two different installation ways.
I have contacted the owner for help.

I also use the netconf-console in ConfD and seems it doesn’t have the issue.

Thanks
Darcy


#4

The author of the new netconf-console here: the idea (not just mine) was to create backward-compatible opensource replacement for the old console, which is somewhat difficult to maintain, and maintenance it needs to port it to Python3. The problem with the result is that it has too many dependencies, and not all of them are always easily available on less standard hardware platforms; so the old one is to stay, hence the confusion. (OTOH, due to backward compatibility you usually should not notice.)

@darcyl I have not seen the issue you are describing, -h should immediately show you the standard help screen. We can continue dealing with this on the project page.

Martin


#5

I also do not have issue with the netconf-console. Maybe you can try it directly from git repo:

git clone git@bitbucket.org:martin_volf/ncc.git
cd ncc
./netconf-console -h

#6

That’s a great idea - giving it the same name is not, in my opinion.


#7

Thanks very much for all the response!
Based on Martin’s response! The clone(16) consumes lots of time and do you have any suggestions what the cause is?

I use “strace -f -r -o /tmp/strace netconf-console -h” to get the log below:

300 0.000025 fstat(17, {st_mode=S_IFREG|0644, st_size=4510, ...}) = 0 300 0.000022 read(17, "m_addR\33\0\0\0(\5\0\0\0t\1\0\0\0at\1\0\0\0bR\23\0\0\0"..., 4096) = 414 300 0.000022 read(17, "", 4096) = 0 300 0.000048 close(17) = 0 300 0.000021 munmap(0x7fca661aa000, 4096) = 0 300 0.000046 close(16) = 0 300 0.000064 open("/dev/random", O_RDONLY) = 16 300 0.000037 poll([{fd=16, events=POLLIN}], 1, -1) = 1 ([{fd=16, revents=POLLIN}]) 300 560.227922 close(16) = 0 300 0.000040 open("/dev/urandom", O_RDONLY) = 16 300 0.000059 fstat(16, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 9), ...}) = 0 300 0.000039 fcntl(16, F_GETFD) = 0 300 0.000021 fcntl(16, F_SETFD, FD_CLOEXEC) = 0 300 0.000060 read(16, "U\322\314\2>\300\0\344&\375\256\362\37\225\222a", 16) = 16 300 0.000377 close(15) = 0

ps: Now I use the netconf-console in confd as the netconf client and connect to some remote netconf server, it also has the same issue and after use strace to trace, the 5347 consumes lots of time and the two logs are similar:

5333 9167 0.000025 open("/usr/lib64/python2.7/site-packages/nacl/bindings/utils.py", O_RDONLY) = 8 5334 9167 0.000027 fstat(8, {st_mode=S_IFREG|0644, st_size=4420, ...}) = 0 5335 9167 0.000023 open("/usr/lib64/python2.7/site-packages/nacl/bindings/utils.pyc", O_RDONLY) = 9 5336 9167 0.000032 fstat(9, {st_mode=S_IFREG|0644, st_size=4510, ...}) = 0 5337 9167 0.000022 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2097432000 5338 9167 0.000022 read(9, "\3\363\r\n\20\234\311[c\0\0\0\0\0\0\0\0\2\0\0\0@\1\0s\222\0\0\0d\0"…, 4096) = 4096
5339 9167 0.000026 fstat(9, {st_mode=S_IFREG|0644, st_size=4510, ...}) = 0 5340 9167 0.000023 read(9, "m_addR\33\0\0\0(\5\0\0\0t\1\0\0\0at\1\0\0\0bR\23\0\0\0"..., 4096) = 414 5341 9167 0.000021 read(9, "", 4096) = 0 5342 9167 0.000054 close(9) = 0 5343 9167 0.000043 munmap(0x7f2097432000, 4096) = 0 5344 9167 0.000050 close(8) = 0 5345 9167 0.000051 open("/dev/random", O_RDONLY) = 8 5346 9167 0.000035 poll([{fd=8, events=POLLIN}], 1, -1) = 1 ([{fd=8, revents=POLLIN}]) 5347 9167 524.278281 close(8) = 0 5348 9167 0.000027 open("/dev/urandom", O_RDONLY) = 8 5349 9167 0.000076 fstat(8, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 9), ...}) = 0 5350 9167 0.000027 fcntl(8, F_GETFD) = 0 5351 9167 0.000021 fcntl(8, F_SETFD, FD_CLOEXEC) = 0 5352 9167 0.000057 read(8, "ZkR\237\276=\323?\213@\373\261\231{\205\33", 16) = 16 5353 9167 0.000574 close(7) = 0 5354 9167 0.000185 stat("/usr/lib64/python2.7/site-packages/nacl/encoding", 0x7ffea8081b90) = -1 ENOENT (No such file or directory) 5355 9167 0.000064 open("/usr/lib64/python2.7/site-packages/nacl/encoding.so", O_RDONLY) = -1 ENOENT (No such file or directory) 5356 9167 0.000055 open("/usr/lib64/python2.7/site-packages/nacl/encodingmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory) 5357 9167 0.000046 open("/usr/lib64/python2.7/site-packages/nacl/encoding.py", O_RDONLY) = 7 5358 9167 0.000072 fstat(7, {st_mode=S_IFREG|0644, st_size=1928, ...}) = 0 5359 9167 0.000034 open("/usr/lib64/python2.7/site-packages/nacl/encoding.pyc", O_RDONLY) = 9 5360 9167 0.000051 fstat(9, {st_mode=S_IFREG|0644, st_size=3847, ...}) = 0 5361 9167 0.000025 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2097432000