Discussion:
[rancid] Problem gathering data from an updated ERX junose
Sven Juergensen (KielNET)
2007-10-02 08:05:42 UTC
Permalink
hi list,

i'm experiencing issues with collecting
data from a juniper erx. the device was
updated from 5.x to 8.x the day before.

logs result the following:

---8<---
Trying to get all of the configs.
<router>: missed cmd(s): show configuration,show hardware,dir
<router>: End of run not found
! srp redundancy: mode is high-availability, state active
=====================================
--->8---

this happens four times and then it
gives up.

according to the troubleshooting-help in
your faq under 3) General, first question,
i can successfully complete the steps of

1) ./clogin <router>
2) ./clogin -c 'show configuration' <router>

3) however does the following:

---8<---
./rancid <router>
sh: clogin: command not found
<router>: missed cmd(s): dir /all slavedisk2:,show rsp chassis-info,dir
/all sec-slot2:,show diag,dir /all disk1:,show gsr chassis,dir /all
sec-nvram:,dir /all disk2:,dir /all sec-bootflash:,show spe version,dir
/all slaveslot2:,dir /all disk0:,show install active,show bootvar,dir
/all slaveslot0:,dir /all sec-slot1:,dir /all harddiska:,dir /all
slavenvram:,show flash,dir /all sec-disk2:,dir /all
slavesup-bootflash:,dir /all sec-disk0:,dir /all harddiskb:,show
variables boot,show boot,dir /all slavedisk1:,show env all,show
module,show controllers,show diagbus,dir /all slavedisk0:,show idprom
backplane,dir /all bootflash:,dir /all sec-slot0:,dir /all
sec-disk1:,write term,show vtp status,dir /all sup-bootflash:,dir /all
slot2:,dir /all harddisk:,dir /all slot0:,dir /all sup-microcode:,show
vlan,dir /all slavebootflash:,show controllers cbus,dir /all
slaveslot1:,dir /all nvram:,show version,show redundancy secondary,show
running-config,show c7200,dir /all slot1:
<router>: End of run not found
!
--->8---

lacking a router.new file, adding a
'-d' results in:

---8<---
./rancid -d <router>
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 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-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 module;show spe version;show c7200;show vtp status;show
vlan;show running-config;write term" <router>
sh: clogin: command not found
<router>: missed cmd(s): dir /all slavedisk2:,show rsp chassis-info,dir
/all sec-slot2:,show diag,dir /all disk1:,show gsr chassis,dir /all
sec-nvram:,dir /all disk2:,dir /all sec-bootflash:,show spe version,dir
/all slaveslot2:,dir /all disk0:,show install active,show bootvar,dir
/all slaveslot0:,dir /all sec-slot1:,dir /all harddiska:,dir /all
slavenvram:,show flash,dir /all sec-disk2:,dir /all
slavesup-bootflash:,dir /all sec-disk0:,dir /all harddiskb:,show
variables boot,show boot,dir /all slavedisk1:,show env all,show
module,show controllers,show diagbus,dir /all slavedisk0:,show idprom
backplane,dir /all bootflash:,dir /all sec-slot0:,dir /all
sec-disk1:,write term,show vtp status,dir /all sup-bootflash:,dir /all
slot2:,dir /all harddisk:,dir /all slot0:,dir /all sup-microcode:,show
vlan,dir /all slavebootflash:,show controllers cbus,dir /all
slaveslot1:,dir /all nvram:,show version,show redundancy secondary,show
running-config,show c7200,dir /all slot1:
<router>: missed cmd(s): dir /all slavedisk2:,show rsp chassis-info,dir
/all sec-slot2:,show diag,dir /all disk1:,show gsr chassis,dir /all
sec-nvram:,dir /all disk2:,dir /all sec-bootflash:,show spe version,dir
/all slaveslot2:,dir /all disk0:,show install active,show bootvar,dir
/all slaveslot0:,dir /all sec-slot1:,dir /all harddiska:,dir /all
slavenvram:,show flash,dir /all sec-disk2:,dir /all
slavesup-bootflash:,dir /all sec-disk0:,dir /all harddiskb:,show
variables boot,show boot,dir /all slavedisk1:,show env all,show
module,show controllers,show diagbus,dir /all slavedisk0:,show idprom
backplane,dir /all bootflash:,dir /all sec-slot0:,dir /all
sec-disk1:,write term,show vtp status,dir /all sup-bootflash:,dir /all
slot2:,dir /all harddisk:,dir /all slot0:,dir /all sup-microcode:,show
vlan,dir /all slavebootflash:,show controllers cbus,dir /all
slaveslot1:,dir /all nvram:,show version,show redundancy secondary,show
running-config,show c7200,dir /all slot1:
<router>: End of run not found
<router>: End of run not found
!


# cat router.new
!RANCID-CONTENT-TYPE: cisco
!
!
!
!
!
--->8---

is this a dialogue with the device at all
or just some dummyattempt? i'm a bit confused
to why it says cisco - it's configured as
'erx' in the cloginrc.

any input on this greatly appreciated.

thanks and best regards,

sven03
Sven Juergensen (KielNET)
2007-10-02 08:26:42 UTC
Permalink
hi again,

after putting clogin into the $PATH and
redoing the /rancid -d <router> results
in

[...]
HIT COMMAND:<router>#write term
<router>: found unexpected command - "write term"
<router>: End of run not found
<router>: End of run not found

this command doesn't exist on the new
junose release or the previous one.

getting closer but not by much.

thanks for any input.

sven03
Post by Sven Juergensen (KielNET)
hi list,
i'm experiencing issues with collecting
data from a juniper erx. the device was
updated from 5.x to 8.x the day before.
---8<---
Trying to get all of the configs.
<router>: missed cmd(s): show configuration,show hardware,dir
<router>: End of run not found
! srp redundancy: mode is high-availability, state active
=====================================
--->8---
this happens four times and then it
gives up.
according to the troubleshooting-help in
your faq under 3) General, first question,
i can successfully complete the steps of
1) ./clogin <router>
2) ./clogin -c 'show configuration' <router>
---8<---
./rancid <router>
sh: clogin: command not found
<router>: missed cmd(s): dir /all slavedisk2:,show rsp chassis-info,dir
/all sec-slot2:,show diag,dir /all disk1:,show gsr chassis,dir /all
sec-nvram:,dir /all disk2:,dir /all sec-bootflash:,show spe version,dir
/all slaveslot2:,dir /all disk0:,show install active,show bootvar,dir
/all slaveslot0:,dir /all sec-slot1:,dir /all harddiska:,dir /all
slavenvram:,show flash,dir /all sec-disk2:,dir /all
slavesup-bootflash:,dir /all sec-disk0:,dir /all harddiskb:,show
variables boot,show boot,dir /all slavedisk1:,show env all,show
module,show controllers,show diagbus,dir /all slavedisk0:,show idprom
backplane,dir /all bootflash:,dir /all sec-slot0:,dir /all
sec-disk1:,write term,show vtp status,dir /all sup-bootflash:,dir /all
slot2:,dir /all harddisk:,dir /all slot0:,dir /all sup-microcode:,show
vlan,dir /all slavebootflash:,show controllers cbus,dir /all
slaveslot1:,dir /all nvram:,show version,show redundancy secondary,show
<router>: End of run not found
!
--->8---
lacking a router.new file, adding a
---8<---
./rancid -d <router>
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 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-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 module;show spe version;show c7200;show vtp status;show
vlan;show running-config;write term" <router>
sh: clogin: command not found
<router>: missed cmd(s): dir /all slavedisk2:,show rsp chassis-info,dir
/all sec-slot2:,show diag,dir /all disk1:,show gsr chassis,dir /all
sec-nvram:,dir /all disk2:,dir /all sec-bootflash:,show spe version,dir
/all slaveslot2:,dir /all disk0:,show install active,show bootvar,dir
/all slaveslot0:,dir /all sec-slot1:,dir /all harddiska:,dir /all
slavenvram:,show flash,dir /all sec-disk2:,dir /all
slavesup-bootflash:,dir /all sec-disk0:,dir /all harddiskb:,show
variables boot,show boot,dir /all slavedisk1:,show env all,show
module,show controllers,show diagbus,dir /all slavedisk0:,show idprom
backplane,dir /all bootflash:,dir /all sec-slot0:,dir /all
sec-disk1:,write term,show vtp status,dir /all sup-bootflash:,dir /all
slot2:,dir /all harddisk:,dir /all slot0:,dir /all sup-microcode:,show
vlan,dir /all slavebootflash:,show controllers cbus,dir /all
slaveslot1:,dir /all nvram:,show version,show redundancy secondary,show
<router>: missed cmd(s): dir /all slavedisk2:,show rsp chassis-info,dir
/all sec-slot2:,show diag,dir /all disk1:,show gsr chassis,dir /all
sec-nvram:,dir /all disk2:,dir /all sec-bootflash:,show spe version,dir
/all slaveslot2:,dir /all disk0:,show install active,show bootvar,dir
/all slaveslot0:,dir /all sec-slot1:,dir /all harddiska:,dir /all
slavenvram:,show flash,dir /all sec-disk2:,dir /all
slavesup-bootflash:,dir /all sec-disk0:,dir /all harddiskb:,show
variables boot,show boot,dir /all slavedisk1:,show env all,show
module,show controllers,show diagbus,dir /all slavedisk0:,show idprom
backplane,dir /all bootflash:,dir /all sec-slot0:,dir /all
sec-disk1:,write term,show vtp status,dir /all sup-bootflash:,dir /all
slot2:,dir /all harddisk:,dir /all slot0:,dir /all sup-microcode:,show
vlan,dir /all slavebootflash:,show controllers cbus,dir /all
slaveslot1:,dir /all nvram:,show version,show redundancy secondary,show
<router>: End of run not found
<router>: End of run not found
!
# cat router.new
!RANCID-CONTENT-TYPE: cisco
!
!
!
!
!
--->8---
is this a dialogue with the device at all
or just some dummyattempt? i'm a bit confused
to why it says cisco - it's configured as
'erx' in the cloginrc.
any input on this greatly appreciated.
thanks and best regards,
sven03
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Mark Loveley
2007-10-02 10:44:08 UTC
Permalink
Post by Sven Juergensen (KielNET)
hi list,
i'm experiencing issues with collecting
data from a juniper erx. the device was
updated from 5.x to 8.x the day before.
---8<---
Trying to get all of the configs.
<router>: missed cmd(s): show configuration,show hardware,dir
<router>: End of run not found
! srp redundancy: mode is high-availability, state active
=====================================
--->8--
Between versions 5 and 8 the output of "show env" changed. Currently
we use version 7 code and my changes are below, your milage may vary
depending on how your ERX is configured (ie dual SRPs/fileSync/HA
etc), we now run a HA setup, pre 7 we used fileSync.

I fixed it for us by editing the "sub ShowEnv" subroutine in the
jerancid script to look like this.
Post by Sven Juergensen (KielNET)
# This routine parses "show environment all"
sub ShowEnv {
print STDERR " In ShowEnv: $_" if ($debug);
my $autoSyncEna = 0; # assume auto-sync is disabled
while (<INPUT>) {
tr/\015//d;
last if (/^$prompt/);
next if (/^(\s*|\s*$cmd\s*)$/);
next if (/^Please wait/i);
return(-1) if (/command authorization failed/i);
# is autoSync enabled?
$autoSyncEna =1 if (/enabled, switch-on-error
enabled/); # pre 7 code
$autoSyncEna =1 if (/auto-sync
enabled/); # post 7 code
# fail if the RP is amid the auto-sync process
return(-1) if (($autoSyncEna == 1) && (/out of sync \(file
system\)/)); # pre 7 code
return(-1) if (($autoSyncEna == 1) && (/sync in
progress/)); # post 7 code
#return(-1) if (/auto-sync enabled/ && !/in sync/);
# skip the temperature goop
if (/processor\s+processor/) {
<INPUT>; <INPUT>; <INPUT>;
next;
}
/^\d+\s+\d+\s+\S+/ && next;
# skip the temperature on a E320
if (/temperature\s+temperature/) {
<INPUT>; <INPUT>;
next;
}
/^\d+\s+\w+-\d+\s+\d+\s+\S+/ && next;
/^\d+\/\d+\s+\w+[-\d+]*\sIOA\s+\d+\s+\S+/ && next;
# strip nvs usage
s/, \d+% \S+\)/\)/;
s/^ //;
ProcessHistory("COMMENTS","keysort","D1","! $_");
}
ProcessHistory("COMMENTS","keysort","D1","!\n");
return(0);
}
Also under DirSlotN I found the need to add a extra regex to avoid
false diffs.
Post by Sven Juergensen (KielNET)
# fail if the RP is amid the auto-sync process
return(-1) if (/active\/standby/i && /not sync/);
return(-1) if (/active\/standby/i && /being sync/);
These changes have avoided 99% of the false diffs for me.

HTH
--
| Mark Loveley Broadband Solutions for
| Network Engineer home and business
| PlusNet PLC @www.plus.net
| Registered Office: Internet House, 2 Tenter Street, Sheffield, S1 4BY
| Registered in England no: 3279013
+ ------------ PlusNet - The smarter way to broadband ----------------+
Loading...