Discussion:
[rancid] Nexus expect looping
D***@YMP.GOV
2009-10-06 17:01:23 UTC
Permalink
I am trying to get Rancid to scan a Cisco Nexus 5000, but I'm having
problems.

First, it tried to run the command 'show version build-info all', which
doesn't exist, so I commented it out of the nxrancid file.

Second, it seems to get most of the way through (I think), but then the
expect process goes to 100% CPU until it is killed.

The Nexus 5000 is running:

Software
BIOS: version 1.2.0
loader: version N/A
kickstart: version 4.1(3)N1(1)
system: version 4.1(3)N1(1)
BIOS compile time: 06/19/08
kickstart image file is: bootflash:/n5000-uk9-kickstart.4.1.3.N1.1.bin
kickstart compile time: 7/23/2009 17:00:00 [07/24/2009 00:53:59]
system image file is: bootflash:/n5000-uk9.4.1.3.N1.1.bin
system compile time: 7/23/2009 17:00:00 [07/24/2009 01:42:52]

and has 1 - 2148 hung off of it.

Any ideas??

Thanks,

Dan
john heasley
2009-10-06 17:06:10 UTC
Permalink
Post by D***@YMP.GOV
I am trying to get Rancid to scan a Cisco Nexus 5000, but I'm having
problems.
First, it tried to run the command 'show version build-info all', which
doesn't exist, so I commented it out of the nxrancid file.
that should not be necessary, it should just skip it.
Post by D***@YMP.GOV
Second, it seems to get most of the way through (I think), but then the
expect process goes to 100% CPU until it is killed.
Software
BIOS: version 1.2.0
loader: version N/A
kickstart: version 4.1(3)N1(1)
system: version 4.1(3)N1(1)
BIOS compile time: 06/19/08
kickstart image file is: bootflash:/n5000-uk9-kickstart.4.1.3.N1.1.bin
kickstart compile time: 7/23/2009 17:00:00 [07/24/2009 00:53:59]
system image file is: bootflash:/n5000-uk9.4.1.3.N1.1.bin
system compile time: 7/23/2009 17:00:00 [07/24/2009 01:42:52]
and has 1 - 2148 hung off of it.
Any ideas??
Most like its expect on you O/S. What OS and expect version? did you
look at the o/s section on the rancid web page.
D***@YMP.GOV
2009-10-06 17:28:01 UTC
Permalink
John,

Thanks for your reply. I'm running FreeBSD 7.2:

FreeBSD host.ymp.gov 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1
07:18:07 UTC 2009
***@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64

expect verion:

expect version 5.43.0




To: ***@YMP.GOV
cc: rancid-***@shrubbery.net
Subject: Re: [rancid] Nexus expect looping
LSN: Not Relevant - Not Privileged
User Filed as: Excl/AdminMgmt-14-4/QA:N/A
Post by D***@YMP.GOV
I am trying to get Rancid to scan a Cisco Nexus 5000, but I'm having
problems.
First, it tried to run the command 'show version build-info all', which
doesn't exist, so I commented it out of the nxrancid file.
that should not be necessary, it should just skip it.
Post by D***@YMP.GOV
Second, it seems to get most of the way through (I think), but then the
expect process goes to 100% CPU until it is killed.
Software
BIOS: version 1.2.0
loader: version N/A
kickstart: version 4.1(3)N1(1)
system: version 4.1(3)N1(1)
BIOS compile time: 06/19/08
kickstart image file is: bootflash:/n5000-uk9-kickstart.4.1.3.N1.1.bin
kickstart compile time: 7/23/2009 17:00:00 [07/24/2009 00:53:59]
system image file is: bootflash:/n5000-uk9.4.1.3.N1.1.bin
system compile time: 7/23/2009 17:00:00 [07/24/2009 01:42:52]
and has 1 - 2148 hung off of it.
Any ideas??
Most like its expect on you O/S. What OS and expect version? did you
look at the o/s section on the rancid web page.
john heasley
2009-10-06 19:01:15 UTC
Permalink
Post by D***@YMP.GOV
John,
FreeBSD host.ymp.gov 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1
07:18:07 UTC 2009
expect version 5.43.0
Its most likely your expect/tcl set. A friend (and others) has had
this problem a few times. He recently updated his ports and the set
of tcl/expect that he got with that update has been working. pkginfo
on that host gives me:

expect-5.43.0_3 A sophisticated scripter based on tcl/tk
tcl-8.3.5_8 Tool Command Language
Post by D***@YMP.GOV
Subject: Re: [rancid] Nexus expect looping
LSN: Not Relevant - Not Privileged
User Filed as: Excl/AdminMgmt-14-4/QA:N/A
Post by D***@YMP.GOV
I am trying to get Rancid to scan a Cisco Nexus 5000, but I'm having
problems.
First, it tried to run the command 'show version build-info all', which
doesn't exist, so I commented it out of the nxrancid file.
that should not be necessary, it should just skip it.
Post by D***@YMP.GOV
Second, it seems to get most of the way through (I think), but then the
expect process goes to 100% CPU until it is killed.
Software
BIOS: version 1.2.0
loader: version N/A
kickstart: version 4.1(3)N1(1)
system: version 4.1(3)N1(1)
BIOS compile time: 06/19/08
kickstart image file is: bootflash:/n5000-uk9-kickstart.4.1.3.N1.1.bin
kickstart compile time: 7/23/2009 17:00:00 [07/24/2009 00:53:59]
system image file is: bootflash:/n5000-uk9.4.1.3.N1.1.bin
system compile time: 7/23/2009 17:00:00 [07/24/2009 01:42:52]
and has 1 - 2148 hung off of it.
Any ideas??
Most like its expect on you O/S. What OS and expect version? did you
look at the o/s section on the rancid web page.
D***@YMP.GOV
2009-10-06 19:45:46 UTC
Permalink
pkg_info shows me the same version of expect, but a newer version of
tcl...

pkg_info | egrep "expect|tcl"
expect-5.43.0_3 A sophisticated scripter based on tcl/tk
tcl-8.4.19_3,1 Tool Command Language

Do you think I should go back to the older version of tcl?

Dan




To: ***@YMP.GOV
cc: rancid-***@shrubbery.net
Subject: Re: [rancid] Nexus expect looping
LSN: Not Relevant - Not Privileged
User Filed as: Excl/AdminMgmt-14-4/QA:N/A
Post by D***@YMP.GOV
John,
FreeBSD host.ymp.gov 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1
07:18:07 UTC 2009
expect version 5.43.0
Its most likely your expect/tcl set. A friend (and others) has had
this problem a few times. He recently updated his ports and the set
of tcl/expect that he got with that update has been working. pkginfo
on that host gives me:

expect-5.43.0_3 A sophisticated scripter based on tcl/tk
tcl-8.3.5_8 Tool Command Language
Post by D***@YMP.GOV
Subject: Re: [rancid] Nexus expect looping
LSN: Not Relevant - Not Privileged
User Filed as: Excl/AdminMgmt-14-4/QA:N/A
Post by D***@YMP.GOV
I am trying to get Rancid to scan a Cisco Nexus 5000, but I'm having
problems.
First, it tried to run the command 'show version build-info all',
which
Post by D***@YMP.GOV
Post by D***@YMP.GOV
doesn't exist, so I commented it out of the nxrancid file.
that should not be necessary, it should just skip it.
Post by D***@YMP.GOV
Second, it seems to get most of the way through (I think), but then
the
Post by D***@YMP.GOV
Post by D***@YMP.GOV
expect process goes to 100% CPU until it is killed.
Software
BIOS: version 1.2.0
loader: version N/A
kickstart: version 4.1(3)N1(1)
system: version 4.1(3)N1(1)
BIOS compile time: 06/19/08
bootflash:/n5000-uk9-kickstart.4.1.3.N1.1.bin
Post by D***@YMP.GOV
Post by D***@YMP.GOV
kickstart compile time: 7/23/2009 17:00:00 [07/24/2009 00:53:59]
system image file is: bootflash:/n5000-uk9.4.1.3.N1.1.bin
system compile time: 7/23/2009 17:00:00 [07/24/2009 01:42:52]
and has 1 - 2148 hung off of it.
Any ideas??
Most like its expect on you O/S. What OS and expect version? did you
look at the o/s section on the rancid web page.
john heasley
2009-10-06 19:55:35 UTC
Permalink
Post by D***@YMP.GOV
pkg_info shows me the same version of expect, but a newer version of
tcl...
pkg_info | egrep "expect|tcl"
expect-5.43.0_3 A sophisticated scripter based on tcl/tk
tcl-8.4.19_3,1 Tool Command Language
Do you think I should go back to the older version of tcl?
Please try it; I dont use fbsd regularly, but I know the combination
below is working.
Post by D***@YMP.GOV
Dan
Subject: Re: [rancid] Nexus expect looping
LSN: Not Relevant - Not Privileged
User Filed as: Excl/AdminMgmt-14-4/QA:N/A
Post by D***@YMP.GOV
John,
FreeBSD host.ymp.gov 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1
07:18:07 UTC 2009
expect version 5.43.0
Its most likely your expect/tcl set. A friend (and others) has had
this problem a few times. He recently updated his ports and the set
of tcl/expect that he got with that update has been working. pkginfo
expect-5.43.0_3 A sophisticated scripter based on tcl/tk
tcl-8.3.5_8 Tool Command Language
Post by D***@YMP.GOV
Subject: Re: [rancid] Nexus expect looping
LSN: Not Relevant - Not Privileged
User Filed as: Excl/AdminMgmt-14-4/QA:N/A
Post by D***@YMP.GOV
I am trying to get Rancid to scan a Cisco Nexus 5000, but I'm having
problems.
First, it tried to run the command 'show version build-info all',
which
Post by D***@YMP.GOV
Post by D***@YMP.GOV
doesn't exist, so I commented it out of the nxrancid file.
that should not be necessary, it should just skip it.
Post by D***@YMP.GOV
Second, it seems to get most of the way through (I think), but then
the
Post by D***@YMP.GOV
Post by D***@YMP.GOV
expect process goes to 100% CPU until it is killed.
Software
BIOS: version 1.2.0
loader: version N/A
kickstart: version 4.1(3)N1(1)
system: version 4.1(3)N1(1)
BIOS compile time: 06/19/08
bootflash:/n5000-uk9-kickstart.4.1.3.N1.1.bin
Post by D***@YMP.GOV
Post by D***@YMP.GOV
kickstart compile time: 7/23/2009 17:00:00 [07/24/2009 00:53:59]
system image file is: bootflash:/n5000-uk9.4.1.3.N1.1.bin
system compile time: 7/23/2009 17:00:00 [07/24/2009 01:42:52]
and has 1 - 2148 hung off of it.
Any ideas??
Most like its expect on you O/S. What OS and expect version? did you
look at the o/s section on the rancid web page.
D***@YMP.GOV
2009-10-06 22:27:10 UTC
Permalink
Ok, some more info I just discovered...

Our whole configuration is 3 Nexus and about 20 misc. other Cisco IOS and
CatOS switches/routers. Everything seems to be working except 1 of the
Nexus servers. It is running a slightly old version of its software then
the other 2...

Broken:

Software
BIOS: version 1.2.0
loader: version N/A
kickstart: version 4.0(1a)N2(1)
system: version 4.0(1a)N2(1)
BIOS compile time: 06/19/08
kickstart image file is: bootflash:/n5000-uk9-kickstart.4.0.1a.N2.1.bin
kickstart compile time: 2/25/2009 0:00:00 [02/25/2009 08:29:12]
system image file is: bootflash:/n5000-uk9.4.0.1a.N2.1.bin
system compile time: 2/25/2009 0:00:00 [02/25/2009 08:56:57]

Working:

Software
BIOS: version 1.2.0
loader: version N/A
kickstart: version 4.1(3)N1(1)
system: version 4.1(3)N1(1)
BIOS compile time: 06/19/08
kickstart image file is: bootflash:/n5000-uk9-kickstart.4.1.3.N1.1.bin
kickstart compile time: 7/23/2009 17:00:00 [07/24/2009 00:53:59]
system image file is: bootflash:/n5000-uk9.4.1.3.N1.1.bin
system compile time: 7/23/2009 17:00:00 [07/24/2009 01:42:52]

Doing 'top' on the machine, I see 'expect' doing its normal thing for a
while and then waiting (for a long time), before looping to 100% cpu.

I added some debugging lines to nxrancid, to print out the $linecnt and $_
and found...

linecnt = 57, [vlan 200
]
linecnt = 58, [ name dan-test
]
linecnt = 59, [
]
linecnt = 60, [Error: TIMEOUT reached
]
linecnt = 61, [Hangup
]

The 'Hangup' is (I assume) from me 'kill -HUP <pid>' the expect process.
If I resize my terminal window from 60 lines, down to 50 lines, I then
get...

linecnt = 48, [tacacs-server directed-request
]
linecnt = 49, [
]
linecnt = 50, [Error: TIMEOUT reached
]
linecnt = 51, [Hangup
]

So it seems like the 'pager' is involved some how.







To: ***@YMP.GOV
cc: john heasley <***@shrubbery.net>, rancid-***@shrubbery.net
Subject: Re: [rancid] Nexus expect looping
LSN: Not Relevant - Not Privileged
User Filed as: Excl/AdminMgmt-14-4/QA:N/A
Post by D***@YMP.GOV
pkg_info shows me the same version of expect, but a newer version of
tcl...
pkg_info | egrep "expect|tcl"
expect-5.43.0_3 A sophisticated scripter based on tcl/tk
tcl-8.4.19_3,1 Tool Command Language
Do you think I should go back to the older version of tcl?
Please try it; I dont use fbsd regularly, but I know the combination
below is working.
Post by D***@YMP.GOV
Dan
Subject: Re: [rancid] Nexus expect looping
LSN: Not Relevant - Not Privileged
User Filed as: Excl/AdminMgmt-14-4/QA:N/A
Post by D***@YMP.GOV
John,
FreeBSD host.ymp.gov 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1
07:18:07 UTC 2009
expect version 5.43.0
Its most likely your expect/tcl set. A friend (and others) has had
this problem a few times. He recently updated his ports and the set
of tcl/expect that he got with that update has been working. pkginfo
expect-5.43.0_3 A sophisticated scripter based on tcl/tk
tcl-8.3.5_8 Tool Command Language
Post by D***@YMP.GOV
Subject: Re: [rancid] Nexus expect looping
LSN: Not Relevant - Not Privileged
User Filed as: Excl/AdminMgmt-14-4/QA:N/A
Post by D***@YMP.GOV
I am trying to get Rancid to scan a Cisco Nexus 5000, but I'm having
problems.
First, it tried to run the command 'show version build-info all',
which
Post by D***@YMP.GOV
Post by D***@YMP.GOV
doesn't exist, so I commented it out of the nxrancid file.
that should not be necessary, it should just skip it.
Post by D***@YMP.GOV
Second, it seems to get most of the way through (I think), but then
the
Post by D***@YMP.GOV
Post by D***@YMP.GOV
expect process goes to 100% CPU until it is killed.
Software
BIOS: version 1.2.0
loader: version N/A
kickstart: version 4.1(3)N1(1)
system: version 4.1(3)N1(1)
BIOS compile time: 06/19/08
bootflash:/n5000-uk9-kickstart.4.1.3.N1.1.bin
Post by D***@YMP.GOV
Post by D***@YMP.GOV
kickstart compile time: 7/23/2009 17:00:00 [07/24/2009 00:53:59]
system image file is: bootflash:/n5000-uk9.4.1.3.N1.1.bin
system compile time: 7/23/2009 17:00:00 [07/24/2009 01:42:52]
and has 1 - 2148 hung off of it.
Any ideas??
Most like its expect on you O/S. What OS and expect version? did you
look at the o/s section on the rancid web page.
john heasley
2009-10-06 23:22:39 UTC
Permalink
Post by D***@YMP.GOV
Ok, some more info I just discovered...
Our whole configuration is 3 Nexus and about 20 misc. other Cisco IOS and
CatOS switches/routers. Everything seems to be working except 1 of the
Nexus servers. It is running a slightly old version of its software then
the other 2...
Software
BIOS: version 1.2.0
loader: version N/A
kickstart: version 4.0(1a)N2(1)
system: version 4.0(1a)N2(1)
BIOS compile time: 06/19/08
kickstart image file is: bootflash:/n5000-uk9-kickstart.4.0.1a.N2.1.bin
kickstart compile time: 2/25/2009 0:00:00 [02/25/2009 08:29:12]
system image file is: bootflash:/n5000-uk9.4.0.1a.N2.1.bin
system compile time: 2/25/2009 0:00:00 [02/25/2009 08:56:57]
Software
BIOS: version 1.2.0
loader: version N/A
kickstart: version 4.1(3)N1(1)
system: version 4.1(3)N1(1)
BIOS compile time: 06/19/08
kickstart image file is: bootflash:/n5000-uk9-kickstart.4.1.3.N1.1.bin
kickstart compile time: 7/23/2009 17:00:00 [07/24/2009 00:53:59]
system image file is: bootflash:/n5000-uk9.4.1.3.N1.1.bin
system compile time: 7/23/2009 17:00:00 [07/24/2009 01:42:52]
Doing 'top' on the machine, I see 'expect' doing its normal thing for a
while and then waiting (for a long time), before looping to 100% cpu.
yes, iirc from the debugging, whatever happened before (dont really care)
would leave it with the device having closed the connection to the rancid
host. at that point, expect should receive an EOF when trying to read
from the half-closed (and drained) pty/file descriptor, but it doesnt.

Either try rolling back to the suggested tcl/expect or report it to fbsd
ports maintainers.
Post by D***@YMP.GOV
I added some debugging lines to nxrancid, to print out the $linecnt and $_
and found...
linecnt = 57, [vlan 200
]
linecnt = 58, [ name dan-test
]
linecnt = 59, [
]
linecnt = 60, [Error: TIMEOUT reached
]
linecnt = 61, [Hangup
]
The 'Hangup' is (I assume) from me 'kill -HUP <pid>' the expect process.
If I resize my terminal window from 60 lines, down to 50 lines, I then
get...
linecnt = 48, [tacacs-server directed-request
]
linecnt = 49, [
]
linecnt = 50, [Error: TIMEOUT reached
]
linecnt = 51, [Hangup
]
So it seems like the 'pager' is involved some how.
Subject: Re: [rancid] Nexus expect looping
LSN: Not Relevant - Not Privileged
User Filed as: Excl/AdminMgmt-14-4/QA:N/A
Post by D***@YMP.GOV
pkg_info shows me the same version of expect, but a newer version of
tcl...
pkg_info | egrep "expect|tcl"
expect-5.43.0_3 A sophisticated scripter based on tcl/tk
tcl-8.4.19_3,1 Tool Command Language
Do you think I should go back to the older version of tcl?
Please try it; I dont use fbsd regularly, but I know the combination
below is working.
Post by D***@YMP.GOV
Dan
Subject: Re: [rancid] Nexus expect looping
LSN: Not Relevant - Not Privileged
User Filed as: Excl/AdminMgmt-14-4/QA:N/A
Post by D***@YMP.GOV
John,
FreeBSD host.ymp.gov 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1
07:18:07 UTC 2009
expect version 5.43.0
Its most likely your expect/tcl set. A friend (and others) has had
this problem a few times. He recently updated his ports and the set
of tcl/expect that he got with that update has been working. pkginfo
expect-5.43.0_3 A sophisticated scripter based on tcl/tk
tcl-8.3.5_8 Tool Command Language
Post by D***@YMP.GOV
Subject: Re: [rancid] Nexus expect looping
LSN: Not Relevant - Not Privileged
User Filed as: Excl/AdminMgmt-14-4/QA:N/A
Post by D***@YMP.GOV
I am trying to get Rancid to scan a Cisco Nexus 5000, but I'm having
problems.
First, it tried to run the command 'show version build-info all',
which
Post by D***@YMP.GOV
Post by D***@YMP.GOV
doesn't exist, so I commented it out of the nxrancid file.
that should not be necessary, it should just skip it.
Post by D***@YMP.GOV
Second, it seems to get most of the way through (I think), but then
the
Post by D***@YMP.GOV
Post by D***@YMP.GOV
expect process goes to 100% CPU until it is killed.
Software
BIOS: version 1.2.0
loader: version N/A
kickstart: version 4.1(3)N1(1)
system: version 4.1(3)N1(1)
BIOS compile time: 06/19/08
bootflash:/n5000-uk9-kickstart.4.1.3.N1.1.bin
Post by D***@YMP.GOV
Post by D***@YMP.GOV
kickstart compile time: 7/23/2009 17:00:00 [07/24/2009 00:53:59]
system image file is: bootflash:/n5000-uk9.4.1.3.N1.1.bin
system compile time: 7/23/2009 17:00:00 [07/24/2009 01:42:52]
and has 1 - 2148 hung off of it.
Any ideas??
Most like its expect on you O/S. What OS and expect version? did you
look at the o/s section on the rancid web page.
D***@YMP.GOV
2009-10-07 18:38:15 UTC
Permalink
I have the answer!!...

clogin tries to do a 'terminal length 0' to turn paging off. Under NX-OS,
that command is only available to users with the roles 'vdc-admin' and
'network-admin'. My rancid user was logging in and was only a
'vdc-operator', so the command failed, so the expect script would hang at
the first --More-- prompt, until it timed out, then it would loop.

Now on to all of the other nxrancid problems.




To: ***@YMP.GOV
cc: john heasley <***@shrubbery.net>, rancid-***@shrubbery.net
Subject: Re: [rancid] Nexus expect looping
LSN: Not Relevant - Not Privileged
User Filed as: Excl/AdminMgmt-14-4/QA:N/A
Post by D***@YMP.GOV
Ok, some more info I just discovered...
Our whole configuration is 3 Nexus and about 20 misc. other Cisco IOS
and
Post by D***@YMP.GOV
CatOS switches/routers. Everything seems to be working except 1 of the
Nexus servers. It is running a slightly old version of its software
then
Post by D***@YMP.GOV
the other 2...
Software
BIOS: version 1.2.0
loader: version N/A
kickstart: version 4.0(1a)N2(1)
system: version 4.0(1a)N2(1)
BIOS compile time: 06/19/08
bootflash:/n5000-uk9-kickstart.4.0.1a.N2.1.bin
Post by D***@YMP.GOV
kickstart compile time: 2/25/2009 0:00:00 [02/25/2009 08:29:12]
system image file is: bootflash:/n5000-uk9.4.0.1a.N2.1.bin
system compile time: 2/25/2009 0:00:00 [02/25/2009 08:56:57]
Software
BIOS: version 1.2.0
loader: version N/A
kickstart: version 4.1(3)N1(1)
system: version 4.1(3)N1(1)
BIOS compile time: 06/19/08
kickstart image file is: bootflash:/n5000-uk9-kickstart.4.1.3.N1.1.bin
kickstart compile time: 7/23/2009 17:00:00 [07/24/2009 00:53:59]
system image file is: bootflash:/n5000-uk9.4.1.3.N1.1.bin
system compile time: 7/23/2009 17:00:00 [07/24/2009 01:42:52]
Doing 'top' on the machine, I see 'expect' doing its normal thing for a
while and then waiting (for a long time), before looping to 100% cpu.
yes, iirc from the debugging, whatever happened before (dont really care)
would leave it with the device having closed the connection to the rancid
host. at that point, expect should receive an EOF when trying to read
from the half-closed (and drained) pty/file descriptor, but it doesnt.

Either try rolling back to the suggested tcl/expect or report it to fbsd
ports maintainers.
Post by D***@YMP.GOV
I added some debugging lines to nxrancid, to print out the $linecnt and
$_
Post by D***@YMP.GOV
and found...
linecnt = 57, [vlan 200
]
linecnt = 58, [ name dan-test
]
linecnt = 59, [
]
linecnt = 60, [Error: TIMEOUT reached
]
linecnt = 61, [Hangup
]
The 'Hangup' is (I assume) from me 'kill -HUP <pid>' the expect process.
If I resize my terminal window from 60 lines, down to 50 lines, I then
get...
linecnt = 48, [tacacs-server directed-request
]
linecnt = 49, [
]
linecnt = 50, [Error: TIMEOUT reached
]
linecnt = 51, [Hangup
]
So it seems like the 'pager' is involved some how.
Subject: Re: [rancid] Nexus expect looping
LSN: Not Relevant - Not Privileged
User Filed as: Excl/AdminMgmt-14-4/QA:N/A
Post by D***@YMP.GOV
pkg_info shows me the same version of expect, but a newer version of
tcl...
pkg_info | egrep "expect|tcl"
expect-5.43.0_3 A sophisticated scripter based on tcl/tk
tcl-8.4.19_3,1 Tool Command Language
Do you think I should go back to the older version of tcl?
Please try it; I dont use fbsd regularly, but I know the combination
below is working.
Post by D***@YMP.GOV
Dan
Subject: Re: [rancid] Nexus expect looping
LSN: Not Relevant - Not Privileged
User Filed as: Excl/AdminMgmt-14-4/QA:N/A
Post by D***@YMP.GOV
John,
FreeBSD host.ymp.gov 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1
07:18:07 UTC 2009
expect version 5.43.0
Its most likely your expect/tcl set. A friend (and others) has had
this problem a few times. He recently updated his ports and the set
of tcl/expect that he got with that update has been working. pkginfo
expect-5.43.0_3 A sophisticated scripter based on tcl/tk
tcl-8.3.5_8 Tool Command Language
Post by D***@YMP.GOV
Subject: Re: [rancid] Nexus expect looping
LSN: Not Relevant - Not Privileged
User Filed as: Excl/AdminMgmt-14-4/QA:N/A
Post by D***@YMP.GOV
I am trying to get Rancid to scan a Cisco Nexus 5000, but I'm
having
Post by D***@YMP.GOV
Post by D***@YMP.GOV
Post by D***@YMP.GOV
Post by D***@YMP.GOV
problems.
First, it tried to run the command 'show version build-info all',
which
Post by D***@YMP.GOV
Post by D***@YMP.GOV
doesn't exist, so I commented it out of the nxrancid file.
that should not be necessary, it should just skip it.
Post by D***@YMP.GOV
Second, it seems to get most of the way through (I think), but
then
Post by D***@YMP.GOV
Post by D***@YMP.GOV
the
Post by D***@YMP.GOV
Post by D***@YMP.GOV
expect process goes to 100% CPU until it is killed.
Software
BIOS: version 1.2.0
loader: version N/A
kickstart: version 4.1(3)N1(1)
system: version 4.1(3)N1(1)
BIOS compile time: 06/19/08
bootflash:/n5000-uk9-kickstart.4.1.3.N1.1.bin
Post by D***@YMP.GOV
Post by D***@YMP.GOV
kickstart compile time: 7/23/2009 17:00:00 [07/24/2009
00:53:59]
Post by D***@YMP.GOV
Post by D***@YMP.GOV
Post by D***@YMP.GOV
Post by D***@YMP.GOV
system image file is: bootflash:/n5000-uk9.4.1.3.N1.1.bin
system compile time: 7/23/2009 17:00:00 [07/24/2009
01:42:52]
Post by D***@YMP.GOV
Post by D***@YMP.GOV
Post by D***@YMP.GOV
Post by D***@YMP.GOV
and has 1 - 2148 hung off of it.
Any ideas??
Most like its expect on you O/S. What OS and expect version? did
you
Post by D***@YMP.GOV
Post by D***@YMP.GOV
Post by D***@YMP.GOV
look at the o/s section on the rancid web page.
john heasley
2009-10-07 19:35:13 UTC
Permalink
Post by D***@YMP.GOV
I have the answer!!...
clogin tries to do a 'terminal length 0' to turn paging off. Under NX-OS,
that command is only available to users with the roles 'vdc-admin' and
'network-admin'. My rancid user was logging in and was only a
'vdc-operator', so the command failed, so the expect script would hang at
the first --More-- prompt, until it timed out, then it would loop.
it (expect) should not spin out, regardless of pager issue.
Post by D***@YMP.GOV
Now on to all of the other nxrancid problems.
Subject: Re: [rancid] Nexus expect looping
LSN: Not Relevant - Not Privileged
User Filed as: Excl/AdminMgmt-14-4/QA:N/A
Post by D***@YMP.GOV
Ok, some more info I just discovered...
Our whole configuration is 3 Nexus and about 20 misc. other Cisco IOS
and
Post by D***@YMP.GOV
CatOS switches/routers. Everything seems to be working except 1 of the
Nexus servers. It is running a slightly old version of its software
then
Post by D***@YMP.GOV
the other 2...
Software
BIOS: version 1.2.0
loader: version N/A
kickstart: version 4.0(1a)N2(1)
system: version 4.0(1a)N2(1)
BIOS compile time: 06/19/08
bootflash:/n5000-uk9-kickstart.4.0.1a.N2.1.bin
Post by D***@YMP.GOV
kickstart compile time: 2/25/2009 0:00:00 [02/25/2009 08:29:12]
system image file is: bootflash:/n5000-uk9.4.0.1a.N2.1.bin
system compile time: 2/25/2009 0:00:00 [02/25/2009 08:56:57]
Software
BIOS: version 1.2.0
loader: version N/A
kickstart: version 4.1(3)N1(1)
system: version 4.1(3)N1(1)
BIOS compile time: 06/19/08
kickstart image file is: bootflash:/n5000-uk9-kickstart.4.1.3.N1.1.bin
kickstart compile time: 7/23/2009 17:00:00 [07/24/2009 00:53:59]
system image file is: bootflash:/n5000-uk9.4.1.3.N1.1.bin
system compile time: 7/23/2009 17:00:00 [07/24/2009 01:42:52]
Doing 'top' on the machine, I see 'expect' doing its normal thing for a
while and then waiting (for a long time), before looping to 100% cpu.
yes, iirc from the debugging, whatever happened before (dont really care)
would leave it with the device having closed the connection to the rancid
host. at that point, expect should receive an EOF when trying to read
from the half-closed (and drained) pty/file descriptor, but it doesnt.
Either try rolling back to the suggested tcl/expect or report it to fbsd
ports maintainers.
Post by D***@YMP.GOV
I added some debugging lines to nxrancid, to print out the $linecnt and
$_
Post by D***@YMP.GOV
and found...
linecnt = 57, [vlan 200
]
linecnt = 58, [ name dan-test
]
linecnt = 59, [
]
linecnt = 60, [Error: TIMEOUT reached
]
linecnt = 61, [Hangup
]
The 'Hangup' is (I assume) from me 'kill -HUP <pid>' the expect process.
If I resize my terminal window from 60 lines, down to 50 lines, I then
get...
linecnt = 48, [tacacs-server directed-request
]
linecnt = 49, [
]
linecnt = 50, [Error: TIMEOUT reached
]
linecnt = 51, [Hangup
]
So it seems like the 'pager' is involved some how.
Subject: Re: [rancid] Nexus expect looping
LSN: Not Relevant - Not Privileged
User Filed as: Excl/AdminMgmt-14-4/QA:N/A
Post by D***@YMP.GOV
pkg_info shows me the same version of expect, but a newer version of
tcl...
pkg_info | egrep "expect|tcl"
expect-5.43.0_3 A sophisticated scripter based on tcl/tk
tcl-8.4.19_3,1 Tool Command Language
Do you think I should go back to the older version of tcl?
Please try it; I dont use fbsd regularly, but I know the combination
below is working.
Post by D***@YMP.GOV
Dan
Subject: Re: [rancid] Nexus expect looping
LSN: Not Relevant - Not Privileged
User Filed as: Excl/AdminMgmt-14-4/QA:N/A
Post by D***@YMP.GOV
John,
FreeBSD host.ymp.gov 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1
07:18:07 UTC 2009
expect version 5.43.0
Its most likely your expect/tcl set. A friend (and others) has had
this problem a few times. He recently updated his ports and the set
of tcl/expect that he got with that update has been working. pkginfo
expect-5.43.0_3 A sophisticated scripter based on tcl/tk
tcl-8.3.5_8 Tool Command Language
Post by D***@YMP.GOV
Subject: Re: [rancid] Nexus expect looping
LSN: Not Relevant - Not Privileged
User Filed as: Excl/AdminMgmt-14-4/QA:N/A
Post by D***@YMP.GOV
I am trying to get Rancid to scan a Cisco Nexus 5000, but I'm
having
Post by D***@YMP.GOV
Post by D***@YMP.GOV
Post by D***@YMP.GOV
Post by D***@YMP.GOV
problems.
First, it tried to run the command 'show version build-info all',
which
Post by D***@YMP.GOV
Post by D***@YMP.GOV
doesn't exist, so I commented it out of the nxrancid file.
that should not be necessary, it should just skip it.
Post by D***@YMP.GOV
Second, it seems to get most of the way through (I think), but
then
Post by D***@YMP.GOV
Post by D***@YMP.GOV
the
Post by D***@YMP.GOV
Post by D***@YMP.GOV
expect process goes to 100% CPU until it is killed.
Software
BIOS: version 1.2.0
loader: version N/A
kickstart: version 4.1(3)N1(1)
system: version 4.1(3)N1(1)
BIOS compile time: 06/19/08
bootflash:/n5000-uk9-kickstart.4.1.3.N1.1.bin
Post by D***@YMP.GOV
Post by D***@YMP.GOV
kickstart compile time: 7/23/2009 17:00:00 [07/24/2009
00:53:59]
Post by D***@YMP.GOV
Post by D***@YMP.GOV
Post by D***@YMP.GOV
Post by D***@YMP.GOV
system image file is: bootflash:/n5000-uk9.4.1.3.N1.1.bin
system compile time: 7/23/2009 17:00:00 [07/24/2009
01:42:52]
Post by D***@YMP.GOV
Post by D***@YMP.GOV
Post by D***@YMP.GOV
Post by D***@YMP.GOV
and has 1 - 2148 hung off of it.
Any ideas??
Most like its expect on you O/S. What OS and expect version? did
you
Post by D***@YMP.GOV
Post by D***@YMP.GOV
Post by D***@YMP.GOV
look at the o/s section on the rancid web page.
Loading...