[rancid] "End of run not found" when running with a DLink switch
heasley
heas at shrubbery.net
Thu Apr 30 18:20:59 UTC 2015
Thu, Apr 30, 2015 at 02:54:25PM -0300, Roberto Greiner:
> Hi,
>
> I'm trying to set rancid to read the configuration for a D-Link DGS-3420
> switch, but I'm hitting on an error where rancid fails to get the switch
> configurations with an "End of run not found" message.
>
> I'm running rancid 3.2 in a Debian 7 box, with cvsweb for reading the
> cvs. Rancid is working properly, as I'm getting the all the configs for
> some 3Com switches (3Com 4500 and 3Com 4800).
>
> I added the following line do router.db:
> dlink-poe-datacenter1.<my-domain>;dell;up
>
> Running "rancid -t dell -C dlink-poe-datacenter1.<mydomain>" I get the
> following output:
> dllogin -t 300 -c 'show switch;show config current_config'
> dlink-poe-datacenter1.<mydomain>
>
> Running "time dllogin -t 300 -c 'show switch;show config current_config'
> dlink-poe-datacenter1.<mydomain>" (notice 'time' at the beginning), I
> get all the configs for the switch, and a running time of ~19 seconds.
> So, the switch is answering and sending all the config quickly,
> indicating also that there is no timeout problem.
>
> Running "rancid -t dell -d dlink-poe-datacenter1.<mydomain>", returns
> the following output (also after ~19 seconds):
> HIT COMMAND:DGS-3420-28PC:admin#show switch
> In GetSystem: DGS-3420-28PC:admin#show switch
> HIT COMMAND:DGS-3420-28PC:admin#show config current_config
> In GetConf: DGS-3420-28PC:admin#show config current_config
> dlink-poe-datacenter1.<mydomain>: End of run not found
> dlink-poe-datacenter1.<mydomain>: End of run not found
> #-------------------------------------------------------------------
>
> I've used 'NOPIPE=yes;export NOPIPE' to generate the output from the
> switch, and rancid does indeed read everything from the dlink switch.
> The .raw file ends with the following:
> DGS-3420-28PC:admin#logoutConnection to dlink-poe-datacenter1.<mydomain>
> closed by remote host.
> Connection to dlink-poe-datacenter1.<mydomain> closed.
>
> My .cloginrc has the following entries:
> add cyphertype *
> {aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,aes192-cbc,aes256-cbc}
> add method * ssh
> add user dlink* admin
> add password dlink* <somepassword>
> add autoenable dlink* 1
>
> Could somebody help me out? I don't know what else I should do. I think
> it' probably some simple setting, but I don't know what else is missing.
>
> Thank you,
>
> Roberto Greiner
Try this patch and let us know if it fixes the issue:
Index: dllogin.in
===================================================================
--- dllogin.in (revision 3088)
+++ dllogin.in (working copy)
@@ -506,6 +506,14 @@
source_password_file $password_file
set in_proc 0
set exitval 0
+# if we have dont have a tty, we need some additional terminal settings
+if [catch {open /dev/tty w} ttyid] {
+ # no tty, ie: cron
+ set spawnopts "-nottycopy"
+ set stty_init "cols 132"
+} else {
+ catch {close ttyid} reason
+}
foreach router [lrange $argv $i end] {
set router [string tolower $router]
send_user "$router\n"
More information about the Rancid-discuss
mailing list