I've set up Rancid on my Ubuntu 14.04 system for a couple of devices which all work fine except for all devices of type 'foundry' (Brocade). Every hour a cron job executes rancid-run as the rancid user. I tested both the flogin as the clogin binary login scripts.
flogin
This is what I see in every log:
<switch>: End of run not found 0 || 0
<switch> flogin error: Error: TIMEOUT reached
<switch>: missed cmd(s): show version,show flash,show module,write term,show running-config,show chassis
<switch>: End of run not found
My .clogin file seems to be fine:
rancid@ubuntu14.04:~$ cat /home/rancid/.cloginrc
add autoenable * 1
add method * ssh
add user * rancid
add password * Jg278edd.fisd%1y
SSH'ing to the switches the regular way works fine. But running the flogin script manually gives me this:
rancid@ubuntu14.04:/var/lib/rancid/bin$ ./flogin -c 'show version' <switch>
s0.nikhef.nl
spawn ssh -c 3des -x -l rancid s0.nikhef.nl
rancid@s0.nikhef.nl's password:
SSH@s0.nikhef.nl>
Error: TIMEOUT reached
It takes about 10 seconds to login and after that it seems that it doesn't execute the command I specify after the -c flag. And after another 10-20 seconds it exits after it reached Rancid's TIMEOUT value.
clogin
This script works just fine... (but it doesn't go to exec mode, it ignores autoenable 1)..
rancid@ubuntu14.04:/var/lib/rancid/bin$ ./clogin -c 'show version' <switch>
<switch>
spawn ssh -c 3des -x -l rancid <switch>
rancid@<switch>'s password:
SSH@<switch>>
SSH@<switch>>terminal length 0
Invalid input -> terminal length 0
Type ? for a list
SSH@<switch>>terminal width 132
Invalid input -> terminal width 132
Type ? for a list
SSH@<switch>>show version
SW: Version 04.2.00b Copyright (c) 1996-2010 Brocade Communications Systems,
...
SSH@<switch>>exitConnection to <switch> closed by remote host.
Connection to <switch> closed.
So I figured, why not replace flogin's code with clogin's code and all be fine, right? Manual test confirmed that, but doing a rancid-run did not get the configs, but just shows this in the logs:
<switch>: End of run not found 0 || 0
<switch>: missed cmd(s): show chassis,show running-config,write term,show flash,show version,show module
<switch>: End of run not found
What is left to debug?