Discussion:
[rancid] End of Run Issue with Cisco devices
Tayfun Sarı
2013-11-29 10:26:41 UTC
Permalink
Hi all,

I got the following config in clogin file as below.AAA is done with ACS 4.2
and I am able to run the all commands with rancid user.But in rancid I got
the error below.Any idea on this?


172.24.82.3: missed cmd(s): show running-config view full,write term,show
running-config
172.24.82.3: End of run not found


add method * ssh telnet
add user * rancid
add password * ***@nc1duz3r
add autoenable * 1

Regards
Alan McKinnon
2013-11-29 14:00:25 UTC
Permalink
Post by Tayfun Sarı
Hi all,
I got the following config in clogin file as below.AAA is done with ACS
4.2 and I am able to run the all commands with rancid user.But in rancid
I got the error below.Any idea on this?
172.24.82.3 <http://172.24.82.3>: missed cmd(s): show running-config
view full,write term,show running-config
172.24.82.3 <http://172.24.82.3>: End of run not found
add method * ssh telnet
add user * rancid
add autoenable * 1
Your question cannot be answered on such limited information. All we
know at this point is that something didn't work. What we don't know is
which one of many possible causes is responsible.

rancid -d <hostname>

will give some debugging information. If that doesn't show the problem,
run the entire clogin command as displayed manually and see if the
script can at least log in and run the commands properly.

But first do read all the man pages plus the FAQ files shipped in the
tarball. They contain a wealth of information, all useful in tracking
down what your root cause here
--
Alan McKinnon
***@gmail.com
Tayfun Sarı
2013-11-29 15:08:28 UTC
Permalink
Here is my output;


I verified that some commands could not be run in the current IOS such as
sh redundancy secondary.



executing clogin -t 90 -c"show version;show redundancy secondary;show
idprom backplane;show install active;show env all;show rsp
chassis-info;show gsr chassis;show diag chassis-info;show boot;show
bootvar;show variables boot;show flash;dir /all nvram:;dir /all
bootflash:;dir /all slot0:;dir /all disk0:;dir /all slot1:;dir /all
disk1:;dir /all slot2:;dir /all disk2:;dir /all harddisk:;dir /all
harddiska:;dir /all harddiskb:;dir /all sup-bootdisk:;dir /all
sup-bootflash:;dir /all sup-microcode:;dir /all slavenvram:;dir /all
slavebootflash:;dir /all slaveslot0:;dir /all slavedisk0:;dir /all
slaveslot1:;dir /all slavedisk1:;dir /all slaveslot2:;dir /all
slavedisk2:;dir /all slavesup-bootflash:;dir /all sec-nvram:;dir /all
sec-bootflash:;dir /all sec-slot0:;dir /all sec-disk0:;dir /all
sec-slot1:;dir /all sec-disk1:;dir /all sec-slot2:;dir /all sec-disk2:;show
controllers;show controllers cbus;show diagbus;show diag;show capture;show
module;show spe version;show c7200;show inventory raw;show vtp status;show
vlan;show vlan-switch;show debug;show shun;more system:running-config;show
running-config view full;show running-config;write term" 172.24.82.3

PROMPT MATCH: 4510_BB2#

HIT COMMAND:4510_BB2#show version

In ShowVersion: 4510_BB2#show version

TYPE = 4500

HIT COMMAND:4510_BB2#show redundancy secondary

In ShowRedundancy: 4510_BB2#show redundancy secondary

HIT COMMAND:4510_BB2#show idprom backplane

In ShowIDprom: 4510_BB2#show idprom backplane

HIT COMMAND:4510_BB2#show install active

In ShowInstallActive: 4510_BB2#show install active

HIT COMMAND:4510_BB2#show env all

In ShowEnv: 4510_BB2#show env all

HIT COMMAND:4510_BB2#show rsp chassis-info

In ShowRSP: 4510_BB2#show rsp chassis-info

HIT COMMAND:4510_BB2#show gsr chassis

In ShowGSR: 4510_BB2#show gsr chassis

HIT COMMAND:4510_BB2#show diag chassis-info

In ShowGSR: 4510_BB2#show diag chassis-info

HIT COMMAND:4510_BB2#show boot

In ShowBoot: 4510_BB2#show boot

HIT COMMAND:4510_BB2#show bootvar

In ShowBoot: 4510_BB2#show bootvar

HIT COMMAND:4510_BB2#show variables boot

In ShowBoot: 4510_BB2#show variables boot

HIT COMMAND:4510_BB2#show flash

In ShowFlash: 4510_BB2#show flash

HIT COMMAND:4510_BB2#dir /all nvram:

In DirSlotN: 4510_BB2#dir /all nvram:

HIT COMMAND:4510_BB2#dir /all bootflash:

In DirSlotN: 4510_BB2#dir /all bootflash:

HIT COMMAND:4510_BB2#dir /all slot0:

In DirSlotN: 4510_BB2#dir /all slot0:

HIT COMMAND:4510_BB2#dir /all disk0:

In DirSlotN: 4510_BB2#dir /all disk0:

HIT COMMAND:4510_BB2#dir /all slot1:

In DirSlotN: 4510_BB2#dir /all slot1:

HIT COMMAND:4510_BB2#dir /all disk1:

In DirSlotN: 4510_BB2#dir /all disk1:

HIT COMMAND:4510_BB2#dir /all slot2:

In DirSlotN: 4510_BB2#dir /all slot2:

HIT COMMAND:4510_BB2#dir /all disk2:

In DirSlotN: 4510_BB2#dir /all disk2:

HIT COMMAND:4510_BB2#dir /all harddisk:

In DirSlotN: 4510_BB2#dir /all harddisk:

HIT COMMAND:4510_BB2#dir /all harddiska:

In DirSlotN: 4510_BB2#dir /all harddiska:

HIT COMMAND:4510_BB2#dir /all harddiskb:

In DirSlotN: 4510_BB2#dir /all harddiskb:

HIT COMMAND:4510_BB2#dir /all sup-bootdisk:

In DirSlotN: 4510_BB2#dir /all sup-bootdisk:

HIT COMMAND:4510_BB2#dir /all sup-bootflash:

In DirSlotN: 4510_BB2#dir /all sup-bootflash:

HIT COMMAND:4510_BB2#dir /all sup-microcode:

In DirSlotN: 4510_BB2#dir /all sup-microcode:

HIT COMMAND:4510_BB2#dir /all slavenvram:

In DirSlotN: 4510_BB2#dir /all slavenvram:

HIT COMMAND:4510_BB2#dir /all slavebootflash:

In DirSlotN: 4510_BB2#dir /all slavebootflash:

HIT COMMAND:4510_BB2#dir /all slaveslot0:

In DirSlotN: 4510_BB2#dir /all slaveslot0:

HIT COMMAND:4510_BB2#dir /all slavedisk0:

In DirSlotN: 4510_BB2#dir /all slavedisk0:

HIT COMMAND:4510_BB2#dir /all slaveslot1:

In DirSlotN: 4510_BB2#dir /all slaveslot1:

HIT COMMAND:4510_BB2#dir /all slavedisk1:

In DirSlotN: 4510_BB2#dir /all slavedisk1:

HIT COMMAND:4510_BB2#dir /all slaveslot2:

In DirSlotN: 4510_BB2#dir /all slaveslot2:

HIT COMMAND:4510_BB2#dir /all slavedisk2:

In DirSlotN: 4510_BB2#dir /all slavedisk2:

HIT COMMAND:4510_BB2#dir /all slavesup-bootflash:

In DirSlotN: 4510_BB2#dir /all slavesup-bootflash:

HIT COMMAND:4510_BB2#dir /all sec-nvram:

In DirSlotN: 4510_BB2#dir /all sec-nvram:

HIT COMMAND:4510_BB2#dir /all sec-bootflash:

In DirSlotN: 4510_BB2#dir /all sec-bootflash:

HIT COMMAND:4510_BB2#dir /all sec-slot0:

In DirSlotN: 4510_BB2#dir /all sec-slot0:

HIT COMMAND:4510_BB2#dir /all sec-disk0:

In DirSlotN: 4510_BB2#dir /all sec-disk0:

HIT COMMAND:4510_BB2#dir /all sec-slot1:

In DirSlotN: 4510_BB2#dir /all sec-slot1:

HIT COMMAND:4510_BB2#dir /all sec-disk1:

In DirSlotN: 4510_BB2#dir /all sec-disk1:

HIT COMMAND:4510_BB2#dir /all sec-slot2:

In DirSlotN: 4510_BB2#dir /all sec-slot2:

HIT COMMAND:4510_BB2#dir /all sec-disk2:

In DirSlotN: 4510_BB2#dir /all sec-disk2:

HIT COMMAND:4510_BB2#show controllers

In ShowContAll: 4510_BB2#show controllers

HIT COMMAND:4510_BB2#show controllers cbus

In ShowContCbus: 4510_BB2#show controllers cbus

HIT COMMAND:4510_BB2#show diagbus

In ShowDiagbus: 4510_BB2#show diagbus

HIT COMMAND:4510_BB2#show diag

In ShowDiag: 4510_BB2#show diag

HIT COMMAND:4510_BB2#show capture

In ShowCapture: 4510_BB2#show capture

HIT COMMAND:4510_BB2#show module

In ShowModule: 4510_BB2#show module

HIT COMMAND:4510_BB2#show spe version

In ShowSpeVersion: 4510_BB2#show spe version

HIT COMMAND:4510_BB2#show c7200

In ShowC7200: 4510_BB2#show c7200

HIT COMMAND:4510_BB2#show inventory raw

In ShowInventory: 4510_BB2#show inventory raw

HIT COMMAND:4510_BB2#show vtp status

In ShowVTP: 4510_BB2#show vtp status

HIT COMMAND:4510_BB2#show vlan

In ShowVLAN: 4510_BB2#show vlan

HIT COMMAND:4510_BB2#show vlan-switch

In ShowVLAN: 4510_BB2#show vlan-switch

HIT COMMAND:4510_BB2#show debug

In ShowDebug: 4510_BB2#show debug

HIT COMMAND:4510_BB2#show shun

In ShowShun: 4510_BB2#show shun

HIT COMMAND:4510_BB2#more system:running-config

In WriteTerm: 4510_BB2#more system:running-config

write(spawn_id=1): broken pipe

while executing

"send_user -- "$expect_out(buffer)""

invoked from within

"expect -nobrace -re+ { exp_continue } -re {^[^

*]*4510_BB2([^#>\r\n]+)?[#>](\([^)\r\n]+\))?} { send_user --
"$expect_out(buffer)"

} -re {^[^..."

invoked from within

"expect {

-re "\b+" { exp_continue }

-re "^\[^\n\r *]*$reprompt" { send_user --
"$expect_out(buffer)"

}

-re "^\[^\n\r]*$reprom..."

(procedure "run_commands" line 27)

invoked from within

"run_commands $prompt $command"

("foreach" body line 186)

invoked from within

"foreach router [lrange $argv $i end] {

set router [string tolower $router]

# attempt at platform switching.

set platform ""

send_user ..."

(file "/usr/local/rancid/bin/clogin" line 740)

172.24.82.3: missed cmd(s): show running-config view full,write term,show
running-config

172.24.82.3: missed cmd(s): show running-config view full,write term,show
running-config

172.24.82.3: End of run not found

172.24.82.3: End of run not found
Post by Alan McKinnon
Post by Tayfun Sarı
Hi all,
I got the following config in clogin file as below.AAA is done with ACS
4.2 and I am able to run the all commands with rancid user.But in rancid
I got the error below.Any idea on this?
172.24.82.3 <http://172.24.82.3>: missed cmd(s): show running-config
view full,write term,show running-config
172.24.82.3 <http://172.24.82.3>: End of run not found
add method * ssh telnet
add user * rancid
add autoenable * 1
Your question cannot be answered on such limited information. All we
know at this point is that something didn't work. What we don't know is
which one of many possible causes is responsible.
rancid -d <hostname>
will give some debugging information. If that doesn't show the problem,
run the entire clogin command as displayed manually and see if the
script can at least log in and run the commands properly.
But first do read all the man pages plus the FAQ files shipped in the
tarball. They contain a wealth of information, all useful in tracking
down what your root cause here
--
Alan McKinnon
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Alan McKinnon
2013-11-29 15:53:31 UTC
Permalink
Don't worry about invalid commands that don't exist on your IOS in use,
the code detects the error message and moves onto the next command. This
is by design so that one rancid parser script can work fine on many
device types.

On this device, rancid works correctly till it gets to the end of
"more system:running-config" or perhaps the beginning of
"show running-config view full"

log in manually (using plain telnet and again with clogin) as the rancid
user and run those commands by hand, looking for odd and unusual output.
Something at that point in your output is causing this expect error in
clogin:

write(spawn_id=1): broken pipe

I'm not familiar enough with expect to know what that means, but
plugging the error into Google shows quite a few cases where people have
had it with differing causes. I reckon you should start by checking the
rancid user has permissions to run those commands, then seeing if there
is something in the clogin environment causing the script to exit early.

One we establish the nature of the problem, then we can determine how to
fix it.

As a last resort you could even comment out the command in rancid line
2055/6, the comments indicate they are there for very specific platforms
(show run being the general one-size-fits-all command)
Post by Tayfun Sarı
Here is my output;
I verified that some commands could not be run in the current IOS such
as sh redundancy secondary.
executing clogin -t 90 -c"show version;show redundancy secondary;show
idprom backplane;show install active;show env all;show rsp
chassis-info;show gsr chassis;show diag chassis-info;show boot;show
bootvar;show variables boot;show flash;dir /all nvram:;dir /all
bootflash:;dir /all slot0:;dir /all disk0:;dir /all slot1:;dir /all
disk1:;dir /all slot2:;dir /all disk2:;dir /all harddisk:;dir /all
harddiska:;dir /all harddiskb:;dir /all sup-bootdisk:;dir /all
sup-bootflash:;dir /all sup-microcode:;dir /all slavenvram:;dir /all
slavebootflash:;dir /all slaveslot0:;dir /all slavedisk0:;dir /all
slaveslot1:;dir /all slavedisk1:;dir /all slaveslot2:;dir /all
slavedisk2:;dir /all slavesup-bootflash:;dir /all sec-nvram:;dir /all
sec-bootflash:;dir /all sec-slot0:;dir /all sec-disk0:;dir /all
sec-slot1:;dir /all sec-disk1:;dir /all sec-slot2:;dir /all
sec-disk2:;show controllers;show controllers cbus;show diagbus;show
diag;show capture;show module;show spe version;show c7200;show inventory
raw;show vtp status;show vlan;show vlan-switch;show debug;show shun;more
system:running-config;show running-config view full;show
running-config;write term" 172.24.82.3
PROMPT MATCH: 4510_BB2#
HIT COMMAND:4510_BB2#show version
In ShowVersion: 4510_BB2#show version
TYPE = 4500
HIT COMMAND:4510_BB2#show redundancy secondary
In ShowRedundancy: 4510_BB2#show redundancy secondary
HIT COMMAND:4510_BB2#show idprom backplane
In ShowIDprom: 4510_BB2#show idprom backplane
HIT COMMAND:4510_BB2#show install active
In ShowInstallActive: 4510_BB2#show install active
HIT COMMAND:4510_BB2#show env all
In ShowEnv: 4510_BB2#show env all
HIT COMMAND:4510_BB2#show rsp chassis-info
In ShowRSP: 4510_BB2#show rsp chassis-info
HIT COMMAND:4510_BB2#show gsr chassis
In ShowGSR: 4510_BB2#show gsr chassis
HIT COMMAND:4510_BB2#show diag chassis-info
In ShowGSR: 4510_BB2#show diag chassis-info
HIT COMMAND:4510_BB2#show boot
In ShowBoot: 4510_BB2#show boot
HIT COMMAND:4510_BB2#show bootvar
In ShowBoot: 4510_BB2#show bootvar
HIT COMMAND:4510_BB2#show variables boot
In ShowBoot: 4510_BB2#show variables boot
HIT COMMAND:4510_BB2#show flash
In ShowFlash: 4510_BB2#show flash
HIT COMMAND:4510_BB2#show controllers
In ShowContAll: 4510_BB2#show controllers
HIT COMMAND:4510_BB2#show controllers cbus
In ShowContCbus: 4510_BB2#show controllers cbus
HIT COMMAND:4510_BB2#show diagbus
In ShowDiagbus: 4510_BB2#show diagbus
HIT COMMAND:4510_BB2#show diag
In ShowDiag: 4510_BB2#show diag
HIT COMMAND:4510_BB2#show capture
In ShowCapture: 4510_BB2#show capture
HIT COMMAND:4510_BB2#show module
In ShowModule: 4510_BB2#show module
HIT COMMAND:4510_BB2#show spe version
In ShowSpeVersion: 4510_BB2#show spe version
HIT COMMAND:4510_BB2#show c7200
In ShowC7200: 4510_BB2#show c7200
HIT COMMAND:4510_BB2#show inventory raw
In ShowInventory: 4510_BB2#show inventory raw
HIT COMMAND:4510_BB2#show vtp status
In ShowVTP: 4510_BB2#show vtp status
HIT COMMAND:4510_BB2#show vlan
In ShowVLAN: 4510_BB2#show vlan
HIT COMMAND:4510_BB2#show vlan-switch
In ShowVLAN: 4510_BB2#show vlan-switch
HIT COMMAND:4510_BB2#show debug
In ShowDebug: 4510_BB2#show debug
HIT COMMAND:4510_BB2#show shun
In ShowShun: 4510_BB2#show shun
HIT COMMAND:4510_BB2#more system:running-config
In WriteTerm: 4510_BB2#more system:running-config
write(spawn_id=1): broken pipe
while executing
"send_user -- "$expect_out(buffer)""
invoked from within
"expect -nobrace -re+ { exp_continue } -re {^[^
*]*4510_BB2([^#>\r\n]+)?[#>](\([^)\r\n]+\))?} { send_user --
"$expect_out(buffer)"
} -re {^[^..."
invoked from within
"expect {
-re "\b+" { exp_continue }
-re "^\[^\n\r *]*$reprompt" { send_user --
"$expect_out(buffer)"
}
-re "^\[^\n\r]*$reprom..."
(procedure "run_commands" line 27)
invoked from within
"run_commands $prompt $command"
("foreach" body line 186)
invoked from within
"foreach router [lrange $argv $i end] {
set router [string tolower $router]
# attempt at platform switching.
set platform ""
send_user ..."
(file "/usr/local/rancid/bin/clogin" line 740)
172.24.82.3 <http://172.24.82.3>: missed cmd(s): show running-config
view full,write term,show running-config
172.24.82.3 <http://172.24.82.3>: missed cmd(s): show running-config
view full,write term,show running-config
172.24.82.3 <http://172.24.82.3>: End of run not found
172.24.82.3 <http://172.24.82.3>: End of run not found
Post by Tayfun Sarı
Hi all,
I got the following config in clogin file as below.AAA is done
with ACS
Post by Tayfun Sarı
4.2 and I am able to run the all commands with rancid user.But in
rancid
Post by Tayfun Sarı
I got the error below.Any idea on this?
172.24.82.3 <http://172.24.82.3>: missed cmd(s): show running-config
view full,write term,show running-config
172.24.82.3 <http://172.24.82.3>: End of run not found
add method * ssh telnet
add user * rancid
add autoenable * 1
Your question cannot be answered on such limited information. All we
know at this point is that something didn't work. What we don't know is
which one of many possible causes is responsible.
rancid -d <hostname>
will give some debugging information. If that doesn't show the problem,
run the entire clogin command as displayed manually and see if the
script can at least log in and run the commands properly.
But first do read all the man pages plus the FAQ files shipped in the
tarball. They contain a wealth of information, all useful in tracking
down what your root cause here
--
Alan McKinnon
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
--
Alan McKinnon
***@gmail.com
heasley
2013-12-02 23:48:12 UTC
Permalink
Post by Alan McKinnon
On this device, rancid works correctly till it gets to the end of
"more system:running-config" or perhaps the beginning of
"show running-config view full"
log in manually (using plain telnet and again with clogin) as the rancid
user and run those commands by hand, looking for odd and unusual output.
Something at that point in your output is causing this expect error in
write(spawn_id=1): broken pipe
This would generally point to the router pre-maturely terminating the
login/connection. An IOS bug perhaps, where using that command causes
the parser to crash?

Loading...