[rancid] new rancid install not working

Alan McKinnon alan.mckinnon at gmail.com
Fri Apr 17 23:36:04 UTC 2015


On 18/04/2015 01:11, Jeffrey d'Ambly wrote:
> Ok so I got that sorted out
> qa-scl009-005:/var/log/rancid# whoami
> rancid
> qa-scl009-005:/var/log/rancid# which clogin
> /usr/libexec/rancid/clogin
> qa-scl009-005:/var/log/rancid#
> 
> /usr/bin/rancid -d -t cisco sjc-vpe1
> Gives me what I think should happen at least. It creates a file
> sjc-vpe1.new in the local dir I¹m in.


Examine that file closely, there is something about the results of
clogin in there that the rancid script cannot deal with.

Unfortunately there is no single cause for this, the error messages you
have posted really just say "something went wrong". This isn't rancid's
fault really, it's a consequence of trying to infer structured data from
unstructured output from the router.

Look first for the important stuff. Does the script announce that it
found the prompt? Does it find an initial list of commands output
correctly, then get confused and claim it cannot find any commands
thereafter?

Sometimes you have to look closely. A common problem is "#" and ">"
characters in the router's shell prompt, (and once I had a Nexus that
didn't end a "show admin something" with a proper EOL character. Took
hours to find that :-) )




> 
> 
> But when I run /usr/bin/rancid-run I just get what looks like an empty file
> 
> qa-scl009-005:/var/rancid/routers/configs# cat sjc-core01.new
> !RANCID-CONTENT-TYPE: cisco
> !
> !
> !
> !
> !
> 
> 
> 
> 
> ‹jeff
> 
> 
> 
> On 4/17/15, 3:43 PM, "heasley" <heas at shrubbery.net> wrote:
> 
>> Fri, Apr 17, 2015 at 10:41:54PM +0000, Jeffrey d'Ambly:
>>> I cannot for the life of me figure out what I¹m doing wrong here.
>>>
>>> When I run /usr/bin/rancid-run it seems like nothing happens. When I
>>> run rancid manually I get the following
>>>
>>>
>>> qa-scl009-005:/var/rancid# /usr/bin/rancid -d -t cisco sjc-vpe1
>>>
>>> loadtype: device type cisco
>>>
>>> loadtype: found device type cisco in /etc/rancid/rancid.types.base
>>>
>>> executing clogin -t 90 -c"show version;show redundancy;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 switch detail;show sdm prefer;show system mtu;show
>>> debug;show shun;more system:running-config;show running-config view
>>> full;show running-config;write term" sjc-vpe1
>>>
>>> sh: clogin: command not found
>>
>> set your PATH correctly
>>
>>> sjc-vpe1: missed cmd(s): all commands
>>>
>>> sjc-vpe1: End of run not found
>>>
>>> sjc-vpe1: End of run not found
>>>
>>> But if I can clogin manually it works
>>>
>>>
>>> qa-scl009-005:/var/log/rancid# /usr/libexec/rancid/clogin -t 90 -c"show
>>> version" sjc-vpe1
>>>
>>> sjc-vpe1
>>>
>>> spawn ssh -c 3des -x -l confbackup sjc-vpe1
>>>
>>> Password:
>>>
>>> sjc-vpe1#
>>>
>>> sjc-vpe1#terminal length 0
>>>
>>> sjc-vpe1#terminal width 132
>>>
>>> sjc-vpe1#show version
>>>
>>> Cisco IOS Software, C3900e Software (C3900e-UNIVERSALK9-M), Version
>>> 15.2(4)M7, RELEASE SOFTWARE (fc2)
>>>
>>> Technical Support: http://www.cisco.com/techsupport
>>>
>>> Copyright (c) 1986-2014 by Cisco Systems, Inc.
>>>
>>> Compiled Thu 25-Sep-14 10:09 by prod_rel_team
>>>
>>>
>>> ROM: System Bootstrap, Version 15.1(1r)T5, RELEASE SOFTWARE (fc1)
>>>
>>> I have no idea what the hell I am doing wrong here, if someone could
>>> point me in the right direction here that would be awesome.
>>>
>>> ‹Jeff
>>
>>> _______________________________________________
>>> Rancid-discuss mailing list
>>> Rancid-discuss at shrubbery.net
>>> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>>
> 
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
> 


-- 
Alan McKinnon
alan.mckinnon at gmail.com



More information about the Rancid-discuss mailing list