Discussion:
[rancid] anyone have rancid working for a nexus 5000?
Lee
2010-10-27 20:12:53 UTC
Permalink
rancid log says

write(spawn_id=1): broken pipe
while executing
"send_user -- "$expect_out(buffer)""
invoked from within

when trying to get the config from a nexus 5000. I've tried it with
the device configured as type "cisco" as well as "cisco-nx" - no joy
either way.

For whatever it's worth, rancid does fine on a nexus 7000 (device
type=cisco-nx) and a nexus 4000 (device type=cisco). Any hints on
getting it working or figuring out what the problem is with a nexus
5000?


Thanks,
Lee
Jeremy Bresley
2010-10-27 23:18:55 UTC
Permalink
Post by Lee
rancid log says
write(spawn_id=1): broken pipe
while executing
"send_user -- "$expect_out(buffer)""
invoked from within
when trying to get the config from a nexus 5000. I've tried it with
the device configured as type "cisco" as well as "cisco-nx" - no joy
either way.
For whatever it's worth, rancid does fine on a nexus 7000 (device
type=cisco-nx) and a nexus 4000 (device type=cisco). Any hints on
getting it working or figuring out what the problem is with a nexus
5000?
Thanks,
Lee
I've got rancid 2.3.5 working against 3 N5020s. We don't have TACACS on
ours yet, just using local auth, one change you might need is to add the
following to .cloginrc:
add autoenable <devicename> 1

Hope this helps.

Jeremy
Lee
2010-10-29 13:52:45 UTC
Permalink
Post by Jeremy Bresley
Post by Lee
rancid log says
write(spawn_id=1): broken pipe
while executing
"send_user -- "$expect_out(buffer)""
invoked from within
when trying to get the config from a nexus 5000. I've tried it with
the device configured as type "cisco" as well as "cisco-nx" - no joy
either way.
For whatever it's worth, rancid does fine on a nexus 7000 (device
type=cisco-nx) and a nexus 4000 (device type=cisco). Any hints on
getting it working or figuring out what the problem is with a nexus
5000?
Thanks,
Lee
I've got rancid 2.3.5 working against 3 N5020s. We don't have TACACS on
ours yet, just using local auth, one change you might need is to add the
add autoenable <devicename> 1
Hope this helps.
Yes, it does. Works for you means it's something I've done, something
special in our login banner or ?? Have you applied the patch for
dealing with autoenable being left out?
(http://www.shrubbery.net/pipermail/rancid-discuss/2010-August/005160.html)
Maybe I'll try backing that out.

Thanks,
Lee
Lee
2010-11-01 18:34:27 UTC
Permalink
Post by Lee
rancid log says
write(spawn_id=1): broken pipe
while executing
"send_user -- "$expect_out(buffer)""
invoked from within
when trying to get the config from a nexus 5000.
The problem turned out to be "show version build-info all" - ie:

nexus5000-1# show version build-info all
^
% Invalid command at '^' marker.
nexus5000-1#

Comment out the "{'show version build-info all' =>
'ShowVersionBuild'}," line and rancid (actually nxrancid - I spent
more time than I'd like to admit looking at rancid) is able to grab
the config. So all's fine with that box now, but the next n5k is
still failing; log file shows

Trying to get all of the configs.
nexus5000-2: missed cmd(s): show license
=====================================
Getting missed routers: round 1.
nexus5000-2: missed cmd(s): show license


ssh into the box & typing in the command doesn't give any output:

nexus5000-2# show license
nexus5000-2#

Help getting around this one would be appreciated.

Lee
john heasley
2010-11-01 21:11:52 UTC
Permalink
Post by Lee
Post by Lee
rancid log says
write(spawn_id=1): broken pipe
while executing
"send_user -- "$expect_out(buffer)""
invoked from within
when trying to get the config from a nexus 5000.
nexus5000-1# show version build-info all
^
% Invalid command at '^' marker.
nexus5000-1#
plz report that to cisco. running a command that isnt supported on the
platform should not cause it to disconnect the client.
Post by Lee
Comment out the "{'show version build-info all' =>
'ShowVersionBuild'}," line and rancid (actually nxrancid - I spent
more time than I'd like to admit looking at rancid) is able to grab
the config. So all's fine with that box now, but the next n5k is
still failing; log file shows
Trying to get all of the configs.
nexus5000-2: missed cmd(s): show license
=====================================
Getting missed routers: round 1.
nexus5000-2: missed cmd(s): show license
nexus5000-2# show license
nexus5000-2#
Help getting around this one would be appreciated.
set NOPIPE=YES in your environment and run nxrancid -d hostname. look
in hostname.raw for this command and it's output. can also run nxrancid
-d -f hostname.raw to help trace it.
Lee
2010-11-01 23:40:37 UTC
Permalink
Post by john heasley
Post by Lee
Post by Lee
rancid log says
write(spawn_id=1): broken pipe
while executing
"send_user -- "$expect_out(buffer)""
invoked from within
when trying to get the config from a nexus 5000.
nexus5000-1# show version build-info all
^
% Invalid command at '^' marker.
nexus5000-1#
plz report that to cisco. running a command that isnt supported on the
platform should not cause it to disconnect the client.
I don't think it's a cisco problem. In the above example I did a
"clogin nexus5000-1" and then typed in "show version build-info all"
at the prompt. Got the error msg & new prompt - no disconnect.

& I just noticed that doing an "export NOPIPE=YES" before the
"rancid-run -r nexus5000-1" doesn't have the 'broken pipe' msg. I
don't get a new config since it complains about missing commands, but
if it was cisco ending the ssh session wouldn't I still be getting the
broken pipe error message?
Post by john heasley
Post by Lee
Comment out the "{'show version build-info all' =>
'ShowVersionBuild'}," line and rancid (actually nxrancid - I spent
more time than I'd like to admit looking at rancid) is able to grab
the config. So all's fine with that box now, but the next n5k is
still failing; log file shows
Trying to get all of the configs.
nexus5000-2: missed cmd(s): show license
=====================================
Getting missed routers: round 1.
nexus5000-2: missed cmd(s): show license
nexus5000-2# show license
nexus5000-2#
Help getting around this one would be appreciated.
set NOPIPE=YES in your environment and run nxrancid -d hostname. look
in hostname.raw for this command and it's output. can also run nxrancid
-d -f hostname.raw to help trace it.
I must be especially slow today - what am I looking for? Looking in
nexus5000-2.raw shows some extra "^M"s, but it's still the same as my
earlier example - no output:

plugin^M
Core Plugin, Ethernet Plugin^Mnexus5000-2# show license^M^M
^Mnexus5000-2# show license usage^M^M
Feature Ins Lic Status Expiry Date Comments^M
Count^M

and the last few lines in my terminal window are:

HIT COMMAND:nexus5000-2# show running-config
In WriteTerm: nexus5000-2# show running-config
nexus5000-2: found exit
nexus5000-2: missed cmd(s): show license
nexus5000-2: missed cmd(s): show license


Thank you - I really appreciate the help.
Lee
john heasley
2010-11-02 01:59:17 UTC
Permalink
Post by Lee
Post by john heasley
Post by Lee
Post by Lee
rancid log says
write(spawn_id=1): broken pipe
while executing
"send_user -- "$expect_out(buffer)""
invoked from within
when trying to get the config from a nexus 5000.
nexus5000-1# show version build-info all
^
% Invalid command at '^' marker.
nexus5000-1#
plz report that to cisco. running a command that isnt supported on the
platform should not cause it to disconnect the client.
I don't think it's a cisco problem. In the above example I did a
"clogin nexus5000-1" and then typed in "show version build-info all"
at the prompt. Got the error msg & new prompt - no disconnect.
you will have to try it with all of the preceeding commands too.
Post by Lee
& I just noticed that doing an "export NOPIPE=YES" before the
"rancid-run -r nexus5000-1" doesn't have the 'broken pipe' msg. I
don't get a new config since it complains about missing commands, but
if it was cisco ending the ssh session wouldn't I still be getting the
broken pipe error message?
so maybe it doesnt like the TERM.
Post by Lee
Post by john heasley
Post by Lee
Comment out the "{'show version build-info all' =>
'ShowVersionBuild'}," line and rancid (actually nxrancid - I spent
more time than I'd like to admit looking at rancid) is able to grab
the config. So all's fine with that box now, but the next n5k is
still failing; log file shows
Trying to get all of the configs.
nexus5000-2: missed cmd(s): show license
=====================================
Getting missed routers: round 1.
nexus5000-2: missed cmd(s): show license
nexus5000-2# show license
nexus5000-2#
Help getting around this one would be appreciated.
set NOPIPE=YES in your environment and run nxrancid -d hostname. look
in hostname.raw for this command and it's output. can also run nxrancid
-d -f hostname.raw to help trace it.
I must be especially slow today - what am I looking for? Looking in
nexus5000-2.raw shows some extra "^M"s, but it's still the same as my
plugin^M
Core Plugin, Ethernet Plugin^Mnexus5000-2# show license^M^M
^ where the newline?
so, show version is missing a newline at the end of it's output.
Post by Lee
^Mnexus5000-2# show license usage^M^M
Feature Ins Lic Status Expiry Date Comments^M
Count^M
HIT COMMAND:nexus5000-2# show running-config
In WriteTerm: nexus5000-2# show running-config
nexus5000-2: found exit
nexus5000-2: missed cmd(s): show license
nexus5000-2: missed cmd(s): show license
Thank you - I really appreciate the help.
Lee
Lee
2010-11-02 06:26:24 UTC
Permalink
I've got a work-around :)
Post by john heasley
Post by Lee
Post by john heasley
Post by Lee
Post by Lee
rancid log says
write(spawn_id=1): broken pipe
while executing
"send_user -- "$expect_out(buffer)""
invoked from within
when trying to get the config from a nexus 5000.
nexus5000-1# show version build-info all
^
% Invalid command at '^' marker.
nexus5000-1#
plz report that to cisco. running a command that isnt supported on the
platform should not cause it to disconnect the client.
I don't think it's a cisco problem. In the above example I did a
"clogin nexus5000-1" and then typed in "show version build-info all"
at the prompt. Got the error msg & new prompt - no disconnect.
you will have to try it with all of the preceeding commands too.
did - no problems. Then I remembered that clogin adds a "term len 0"
when you give it a list of commands, so did that, repeated the
commands again & got the missing newline at the end out the 'show
version' output. But no disconnect.

... snip ...
Post by john heasley
Post by Lee
I must be especially slow today - what am I looking for? Looking in
nexus5000-2.raw shows some extra "^M"s, but it's still the same as my
plugin^M
Core Plugin, Ethernet Plugin^Mnexus5000-2# show license^M^M
^ where the newline?
so, show version is missing a newline at the end of it's output.
Yes & that's the problem - thanks!! Adding a "term len 60" before the
"show version" and a "term len 0" after fixes it. So my commandtable
now looks like this:
@commandtable = (
{'term no monitor-force' => 'RunCommand'},
{'term len 60' => 'RunCommand'}, # -LR-
{'show version' => 'ShowVersion'},
{'term len 0' => 'RunCommand'}, # -LR-
{'show version build-info all' => 'ShowVersionBuild'},


Thank you!
Lee

Continue reading on narkive:
Search results for '[rancid] anyone have rancid working for a nexus 5000?' (Questions and Answers)
8
replies
Women over 40 ???
started 2006-10-20 10:22:45 UTC
women's health
Loading...