[rancid] ERROR: sh: cisco: command not found

Simone Felici s.felici at mclink.eu
Mon Jan 19 14:37:47 UTC 2015


Hello,

Il 17/01/2015 17:42, heasley ha scritto:
> Sat, Jan 17, 2015 at 10:23:53AM +0100, Simone Felici:
>>
>> Hello to all!
>>
>> I'm having an issue with rancid. sometimes I get this errors in the logs:
>
> what version of rancid on what o/s?
>

rancid 2.3.6 on CentOS 5.8 (server and slaves)


>> sh: cisco: command not found
>> sh: cisco: command not found
>> sh: cisco: command not found
>> sh: cisco: command not found
>> (...)
>>
>> Then the script doesn't process all the list of devices!
>> If I execute manually the last device rancid has processed as well as the device immediate after, I
>> have no errors. The list is long and it uses another server to collect these configurations via ssh
>
> how long?  does it exceed the command-line length allowed by your o/s?
> perhaps a quoting error?

Are they not processed one per time?
the routers.all contains 672 entries, routers.up -> 572.

>
> but, what you describe is not something we support, so you've presumably
> modified something to do this, but not told us what or provided the code.

The installation is old. The only I've edited a while ago was add the "out of band" access via 
"usercmd" "usercmd_chat" options. Is this availabe in the last release?
So I could update.

>
>> (usercmd, usercmd_chat). Could it be a timeout issue on the remote server used to contact the
>> device? Or what is happen? How can I debug?
>>
>> The script ends in the log with:
>>
>> Transmitting file data ..................................
>> Committed revision 21106.
>> + rm -f /tmp/.customer_cpe.run.lock
>>
>> Also seems it ends to process the list, but isn't true, because the list in routers.up is longer.
>
> what makes you think that it has not processed the entire list?
>


Because I've some devices I've edited and the differences are not saved, even if they should be 
processed. They are in the routers.all db. Only if I call the script for a single device it works:

bin/rancid-run -r <device_name> <repo_name>

Then, I've edited temporary rancid-fe to enable dedug:

(...)
} else {
     exec($vendortable{$vendor} . " -d $router");
}
(...)

This logs me all the HIT commands as well the command that is executed to contact the device.
At a certain point I get:

HIT COMMAND:<my_device>#write term
     In WriteTerm: <my_device>#write term
sh: cisco: command not found
sh: cisco: command not found
(...line repeated many times..)
=====================================
Getting missed routers: round 1.
(...)
sh: cisco: command not found
(...)
EOF


Thanks for the help,

Simon





More information about the Rancid-discuss mailing list