<br><font size=2 face="sans-serif">I have the answer!!...</font>
<br>
<br><font size=2 face="sans-serif">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.</font>
<br>
<br><font size=2 face="sans-serif">Now on to all of the other nxrancid
problems.</font>
<br>
<br>
<br>
<br>
<p><font size=1 color=#800080 face="sans-serif">To:
</font><font size=1 face="sans-serif">Dan_Mitton@YMP.GOV</font>
<br><font size=1 color=#800080 face="sans-serif">cc:
</font><font size=1 face="sans-serif">john heasley <heas@shrubbery.net>,
rancid-discuss@shrubbery.net</font><font size=1 color=#800080 face="sans-serif">
</font>
<br><font size=1 color=#800080 face="sans-serif">Subject:
</font><font size=1 face="sans-serif">Re: [rancid]
Nexus expect looping</font>
<div align=right>
<br><font size=1 face="sans-serif">LSN: </font><font size=1 color=#008000 face="sans-serif">Not
Relevant - Not Privileged</font>
<br><font size=1 face="sans-serif">User Filed as: </font><font size=1 color=blue face="sans-serif">Excl/AdminMgmt-14-4/QA:N/A</font>
<br></div>
<br><tt><font size=2>Tue, Oct 06, 2009 at 03:27:10PM -0700, Dan_Mitton@YMP.GOV:<br>
> Ok, some more info I just discovered...<br>
> <br>
> Our whole configuration is 3 Nexus and about 20 misc. other Cisco
IOS and <br>
> CatOS switches/routers. Everything seems to be working except
1 of the <br>
> Nexus servers. It is running a slightly old version of its software
then <br>
> the other 2...<br>
> <br>
> Broken:<br>
> <br>
> Software<br>
> BIOS: version 1.2.0<br>
> loader: version N/A<br>
> kickstart: version 4.0(1a)N2(1)<br>
> system: version 4.0(1a)N2(1)<br>
> BIOS compile time: 06/19/08<br>
> kickstart image file is: bootflash:/n5000-uk9-kickstart.4.0.1a.N2.1.bin<br>
> kickstart compile time: 2/25/2009 0:00:00 [02/25/2009
08:29:12]<br>
> system image file is: bootflash:/n5000-uk9.4.0.1a.N2.1.bin<br>
> system compile time: 2/25/2009 0:00:00 [02/25/2009
08:56:57]<br>
> <br>
> Working:<br>
> <br>
> Software<br>
> BIOS: version 1.2.0<br>
> loader: version N/A<br>
> kickstart: version 4.1(3)N1(1)<br>
> system: version 4.1(3)N1(1)<br>
> BIOS compile time: 06/19/08<br>
> kickstart image file is: bootflash:/n5000-uk9-kickstart.4.1.3.N1.1.bin<br>
> kickstart compile time: 7/23/2009 17:00:00 [07/24/2009
00:53:59]<br>
> system image file is: bootflash:/n5000-uk9.4.1.3.N1.1.bin<br>
> system compile time: 7/23/2009 17:00:00 [07/24/2009
01:42:52]<br>
> <br>
> Doing 'top' on the machine, I see 'expect' doing its normal thing
for a <br>
> while and then waiting (for a long time), before looping to 100% cpu.<br>
<br>
yes, iirc from the debugging, whatever happened before (dont really care)<br>
would leave it with the device having closed the connection to the rancid<br>
host. at that point, expect should receive an EOF when trying to
read<br>
from the half-closed (and drained) pty/file descriptor, but it doesnt.<br>
<br>
Either try rolling back to the suggested tcl/expect or report it to fbsd<br>
ports maintainers.<br>
<br>
> I added some debugging lines to nxrancid, to print out the $linecnt
and $_ <br>
> and found...<br>
> <br>
> linecnt = 57, [vlan 200<br>
> ]<br>
> linecnt = 58, [ name dan-test<br>
> ]<br>
> linecnt = 59, [<br>
> ]<br>
> linecnt = 60, [Error: TIMEOUT reached<br>
> ]<br>
> linecnt = 61, [Hangup<br>
> ]<br>
> <br>
> The 'Hangup' is (I assume) from me 'kill -HUP <pid>' the expect
process. <br>
> If I resize my terminal window from 60 lines, down to 50 lines, I
then <br>
> get...<br>
> <br>
> linecnt = 48, [tacacs-server directed-request<br>
> ]<br>
> linecnt = 49, [<br>
> ]<br>
> linecnt = 50, [Error: TIMEOUT reached<br>
> ]<br>
> linecnt = 51, [Hangup<br>
> ]<br>
> <br>
> So it seems like the 'pager' is involved some how.<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> To: Dan_Mitton@YMP.GOV<br>
> cc: john heasley <heas@shrubbery.net>, rancid-discuss@shrubbery.net
<br>
> Subject: Re: [rancid] Nexus expect looping<br>
> LSN: Not Relevant - Not Privileged<br>
> User Filed as: Excl/AdminMgmt-14-4/QA:N/A<br>
> <br>
> Tue, Oct 06, 2009 at 12:45:46PM -0700, Dan_Mitton@YMP.GOV:<br>
> > pkg_info shows me the same version of expect, but a newer version
of <br>
> > tcl...<br>
> > <br>
> > pkg_info | egrep "expect|tcl"<br>
> > expect-5.43.0_3 A sophisticated scripter based
on tcl/tk<br>
> > tcl-8.4.19_3,1 Tool Command Language<br>
> > <br>
> > Do you think I should go back to the older version of tcl?<br>
> <br>
> Please try it; I dont use fbsd regularly, but I know the combination<br>
> below is working.<br>
> <br>
> > Dan<br>
> > <br>
> > <br>
> > <br>
> > <br>
> > To: Dan_Mitton@YMP.GOV<br>
> > cc: rancid-discuss@shrubbery.net <br>
> > Subject: Re: [rancid] Nexus expect
looping<br>
> > LSN: Not Relevant - Not Privileged<br>
> > User Filed as: Excl/AdminMgmt-14-4/QA:N/A<br>
> > <br>
> > Tue, Oct 06, 2009 at 10:28:01AM -0700, Dan_Mitton@YMP.GOV:<br>
> > > John,<br>
> > > <br>
> > > Thanks for your reply. I'm running FreeBSD 7.2:<br>
> > > <br>
> > > FreeBSD host.ymp.gov 7.2-RELEASE FreeBSD 7.2-RELEASE #0:
Fri May 1 <br>
> > > 07:18:07 UTC 2009 <br>
> > > root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
amd64<br>
> > > <br>
> > > expect verion:<br>
> > > <br>
> > > expect version 5.43.0<br>
> > <br>
> > Its most likely your expect/tcl set. A friend (and others)
has had<br>
> > this problem a few times. He recently updated his ports
and the set<br>
> > of tcl/expect that he got with that update has been working.
pkginfo<br>
> > on that host gives me:<br>
> > <br>
> > expect-5.43.0_3 A sophisticated scripter based
on tcl/tk<br>
> > tcl-8.3.5_8 Tool Command Language<br>
> > <br>
> > > <br>
> > > <br>
> > > <br>
> > > To: Dan_Mitton@YMP.GOV<br>
> > > cc: rancid-discuss@shrubbery.net <br>
> > > Subject: Re: [rancid] Nexus
expect looping<br>
> > > LSN: Not Relevant - Not Privileged<br>
> > > User Filed as: Excl/AdminMgmt-14-4/QA:N/A<br>
> > > <br>
> > > Tue, Oct 06, 2009 at 10:01:23AM -0700, Dan_Mitton@YMP.GOV:<br>
> > > > I am trying to get Rancid to scan a Cisco Nexus 5000,
but I'm having <br>
> <br>
> > > > problems.<br>
> > > > <br>
> > > > First, it tried to run the command 'show version build-info
all', <br>
> > which <br>
> > > > doesn't exist, so I commented it out of the nxrancid
file.<br>
> > > <br>
> > > that should not be necessary, it should just skip it.<br>
> > > <br>
> > > > Second, it seems to get most of the way through (I
think), but then <br>
> > the <br>
> > > > expect process goes to 100% CPU until it is killed.<br>
> > > > <br>
> > > > The Nexus 5000 is running:<br>
> > > > <br>
> > > > Software<br>
> > > > BIOS: version 1.2.0<br>
> > > > loader: version N/A<br>
> > > > kickstart: version 4.1(3)N1(1)<br>
> > > > system: version 4.1(3)N1(1)<br>
> > > > BIOS compile time: 06/19/08<br>
> > > > kickstart image file is: <br>
> > bootflash:/n5000-uk9-kickstart.4.1.3.N1.1.bin<br>
> > > > kickstart compile time: 7/23/2009 17:00:00
[07/24/2009 00:53:59]<br>
> > > > system image file is: bootflash:/n5000-uk9.4.1.3.N1.1.bin<br>
> > > > system compile time: 7/23/2009
17:00:00 [07/24/2009 01:42:52]<br>
> > > > <br>
> > > > and has 1 - 2148 hung off of it.<br>
> > > > <br>
> > > > Any ideas??<br>
> > > <br>
> > > Most like its expect on you O/S. What OS and expect
version? did you<br>
> > > look at the o/s section on the rancid web page.<br>
> > > <br>
> > > <br>
> > <br>
> > <br>
> <br>
> <br>
</font></tt>
<br>
<br>