cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

273
Views
0
Helpful
4
Replies
sparrow109
Beginner

How can I capture communication logs between device and NSO

Our device is neconf based.

I've made a NED package for the device.

Once I connect to the device from NSO, I got error. The ssh connection is closed by NSO.

How can I capture the log from NSO?

I've set "devices global-settings trace pretty", but I didn't get the error from the trace log.

I've installed Drned examiner, but I don't how and if it's possible to capture related logs by using it.

 

Can some one give me some clue to capture the communication errors?

Thanks!

4 REPLIES 4
sparrow109
Beginner

From the trace log, I could see the hello message, the capalibilities have been replied by device. 

The last lines of the trace log are as follows:

>>>>out 15-Nov-2021::18:16:44.552 user: admin/180 thandle 1893 hostname localhost.localdomain device R6K_81_52 session-id=12
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="1">
<get>
<filter>
<yang-library xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library"/>
<modules-state xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library"/>
</filter>
</get>
</rpc>

If the <get> request is the last message you see in the trace-log, the device didn't reply in time.

 

It could be an error on the device side but it could also be too short timeouts in NSO. 

 

The global timeouts for device communication is fairly short by default:

admin@ncs# show running-config devices global-settings read-timeout
devices global-settings read-timeout 20
admin@ncs# show running-config devices global-settings write-timeout
devices global-settings write-timeout 20

 

I usually set the timeouts to 300 or something like that in the device. like this:

admin@ncs# show running-config devices device nc1 read-timeout
devices device nc1
read-timeout 300
!
admin@ncs# show running-config devices device nc1 write-timeout
devices device nc1
write-timeout 300
!

 

 

 

I've set the read-timeout and write timeout for the device to 600, but NSO still failed to connect to device.

From the trace log, the output ended at the get part:

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
<data>
<yang-library xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library">

.....

 

<module>
<name>openconfig-inet-types</name>
<revision>2021-01-07</revision>
<schema>file:///md/sysrepo/yang/openconfig-inet-types@2021-01-07.yang</schema>
<namespace>http://ope

 

Is this a timeout issue?

 

Thanks!

yale.prince
Beginner

ncs_cli -C

conf t

device device bob trace raw

commit

exit

exit

do this things you want capture

eg

conf t

devices device bob

hostname bob1

commit

exit

exit

got to

cd /var/log/ncs

there will be a log file call bob.trace

open with you favourite txt editor