From heas at shrubbery.net Mon Nov 3 01:12:53 2003 From: heas at shrubbery.net (john heasley) Date: Sun, 2 Nov 2003 17:12:53 -0800 Subject: how to retrieve IOS image using RANCID? In-Reply-To: <20031029185338.M92101@smiller.org> References: <6.0.0.22.0.20031028164706.03eb06f8@mail.monterey.k12.ca.us> <20031029013456.GK6611@shrubbery.net> <20031029185338.M92101@smiller.org> Message-ID: <20031103011253.GI16805@shrubbery.net> Wed, Oct 29, 2003 at 11:57:57AM -0700, Stephen Miller: > > do you want to add the IOS images to CVS? you should be able to...just not sure > if you want to...the space could be large depending on how many devices and what > the image size is, normally about 8+ megs now. You could just modify a login > script and use the -c option with, "copy flash:image ftp://ftpserver", which > should do it. Then just cron that....but you wouldn't get the change if one > occurred...but you would still have the old and new images. if you happen to do something like this... those are, of course, binary files. to have cvs handle them properly, you have to use the -k option of the add command. ie: cvs add -kb imagefilename > steve > > ---------- Original Message ----------- > From: john heasley > To: Alex Zheng > Cc: rancid-discuss at shrubbery.net > Sent: Tue, 28 Oct 2003 17:34:56 -0800 > Subject: Re: how to retrieve IOS image using RANCID? > > > Tue, Oct 28, 2003 at 04:48:08PM -0800, Alex Zheng: > > > > > > Anyone used Rancid to retrieve IOS images from a router? And how if anyone > > > knows? > > > > > > Thanks. > > > > > > > > > Alex > > > > You;ll have to provide a better description of what you're trying to do. > > > > the two possibility that come to mind of what you might be trying are > > definitely possible. :) > ------- End of Original Message ------- From asp at partan.com Mon Nov 3 15:15:25 2003 From: asp at partan.com (Andrew Partan) Date: Mon, 3 Nov 2003 10:15:25 -0500 Subject: false "changes in XXX routers" reports In-Reply-To: <070F6E0C1E5E684BAA2DC8C854386D4A01CF22@ntx.forest.netvision.net.il> References: <070F6E0C1E5E684BAA2DC8C854386D4A01CF22@ntx.forest.netvision.net.il> Message-ID: <20031103151525.GE22049@partan.com> On Sun, Nov 02, 2003 at 01:51:46PM +0200, Yuval Ben-Ari wrote: > problem returned: This code doing this is in bin/control_rancid. I think the only assumption that the code makes is that the user running rancid has all of the read & write permissions needed for the files & directories the code touches. It would be real useful to get additional eyes looking at this to see what else might fail. --asp From arnold at nipper.de Mon Nov 10 23:11:50 2003 From: arnold at nipper.de (Nipper, Arnold) Date: Tue, 11 Nov 2003 00:11:50 +0100 Subject: Multi-line commands Message-ID: <000d01c3a7e1$7df9a9e0$6790a8c0@nipper.de> I'm using rancid since a couple of months and find it very valuable esp. when retrieving the same information from a lot of routers/switches. There are some commands on the catalyst 6500 which require multiple lines of input (e.g. "clear counters" where you will be prompted for "Do you want to continue (y/n) [n]?"). With IOS and telnetting into a router I've been successful (iirc) when separating the commands by "^M" (i.e. Ctrl-M). But that doesn't work with CatOS and rancid. How do you deal with multi-line comamnds? Regards, Arnold From david_laporte at harvard.edu Mon Nov 10 23:49:53 2003 From: david_laporte at harvard.edu (David LaPorte) Date: Mon, 10 Nov 2003 18:49:53 -0500 (Eastern Standard Time) Subject: Multi-line commands In-Reply-To: <000d01c3a7e1$7df9a9e0$6790a8c0@nipper.de> References: <000d01c3a7e1$7df9a9e0$6790a8c0@nipper.de> Message-ID: try using the "\\n" construct (an escaped newline). For instance: $clogin -f $cloginrc -u '$username' -p '$password' -c \"conf net\\nhost\\n$tftphost\\n$tftpacldir/$acls\" this above is from a perl script - you may only need "\n" if you're running it from the prompt. On Tue, 11 Nov 2003, Nipper, Arnold wrote: > I'm using rancid since a couple of months and find it very valuable esp. > when retrieving the same information from a lot of routers/switches. > > There are some commands on the catalyst 6500 which require multiple lines of > input (e.g. "clear counters" where you will be prompted for "Do you want to > continue (y/n) [n]?"). > > With IOS and telnetting into a router I've been successful (iirc) when > separating the commands by "^M" (i.e. Ctrl-M). But that doesn't work with > CatOS and rancid. > > How do you deal with multi-line comamnds? > > > Regards, Arnold > > From arnold at nipper.de Tue Nov 11 00:08:44 2003 From: arnold at nipper.de (Nipper, Arnold) Date: Tue, 11 Nov 2003 01:08:44 +0100 Subject: Multi-line commands References: <000d01c3a7e1$7df9a9e0$6790a8c0@nipper.de> Message-ID: <004701c3a7e7$fa1ffc30$6790a8c0@nipper.de> Tnx a lot! If you run the command from the shell a simple backslash does. Arnold On Tuesday, November 11, 2003 12:49 AM, David LaPorte wrote: > try using the "\\n" construct (an escaped newline). For instance: > > $clogin -f $cloginrc -u '$username' -p '$password' -c \"conf > net\\nhost\\n$tftphost\\n$tftpacldir/$acls\" > > this above is from a perl script - you may only need "\n" if you're > running it from the prompt. > > On Tue, 11 Nov 2003, Nipper, Arnold wrote: > >> I'm using rancid since a couple of months and find it very valuable esp. >> when retrieving the same information from a lot of routers/switches. >> >> There are some commands on the catalyst 6500 which require multiple lines of >> input (e.g. "clear counters" where you will be prompted for "Do you want to >> continue (y/n) [n]?"). >> >> With IOS and telnetting into a router I've been successful (iirc) when >> separating the commands by "^M" (i.e. Ctrl-M). But that doesn't work with >> CatOS and rancid. >> >> How do you deal with multi-line comamnds? >> >> >> Regards, Arnold From funraps at yahoo.com Tue Nov 11 19:47:45 2003 From: funraps at yahoo.com (funraps too) Date: Tue, 11 Nov 2003 11:47:45 -0800 (PST) Subject: Newbie Problems - - Please see below Message-ID: <20031111194745.4051.qmail@web41104.mail.yahoo.com> Hello, I'm sure this has been answered, but I think I have the problem that is detailed on the main Rancid page... the Expect problem... Here is info from my logs... Trying to get all of the configs. x.x.x.x clogin error: Error: TIMEOUT reached x.x.x.x: missed cmd(s): show env all,show module,show controllers,show diagbus,show diag,dir /all disk1:,show gsr chassis,dir /all bootflash:,write term,dir /all di sk2:,show vtp status,dir /all sup-bootflash:,dir /all slot2:,dir /all slot0:,dir /all sup-microcode:,dir /all disk0:,show install active,show bootvar,show vlan,show c ontrollers cbus,dir /all nvram:,show flash,show version,show variables boot,show c7200,show boot,dir /all slot1: x.x.x.x: End of run not found ! y.y.y.y clogin error: Error: TIMEOUT reached y.y.y.y: missed cmd(s): show env all,show module,show controllers,show diagbus,show diag,dir /all disk1:,show gsr chassis,dir /all bootflash:,write term,dir /all d isk2:,show vtp status,dir /all sup-bootflash:,dir /all slot2:,dir /all slot0:,dir /all sup-microcode:,dir /all disk0:,show install active,show bootvar,show vlan,show controllers cbus,dir /all nvram:,show flash,show version,show variables boot,show c7200,show boot,dir /all slot1: y.y.y.y: End of run not found ! can not find channel named "exp4" while executing "close" ("foreach" body line 110) invoked from within "foreach router [lrange $argv $i end] { set router [string tolower $router] send_user "$router\n" # Figure out prompt. # Since autoena..." (file "/usr/local/rancid/bin/clogin" line 559) x.x.x.x clogin error: Error: TIMEOUT reached x.x.x.x: missed cmd(s): show env all,show module,show controllers,show diagbus,show diag,dir /all disk1:,show gsr chassis,dir /all bootflash:,write term,dir /all dis k2:,show vtp status,dir /all sup-bootflash:,dir /all slot2:,dir /all slot0:,dir /all sup-microcode:,dir /all disk0:,show install active,show bootvar,show vlan,show co ntrollers cbus,dir /all nvram:,show flash,show version,show variables boot,show c7200,show boot,dir /all slot1: x.x.x.x: End of run not found Now, I'm not sure what I need to do in order to fix this, what lines to edit in Expect.. Running Mandrake 9.2 on i586 Your help is appreciated. From asp at partan.com Tue Nov 11 20:09:43 2003 From: asp at partan.com (Andrew Partan) Date: Tue, 11 Nov 2003 15:09:43 -0500 Subject: Newbie Problems - - Please see below In-Reply-To: <20031111194745.4051.qmail@web41104.mail.yahoo.com> References: <20031111194745.4051.qmail@web41104.mail.yahoo.com> Message-ID: <20031111200943.GB99339@partan.com> On Tue, Nov 11, 2003 at 11:47:45AM -0800, funraps too wrote: > I'm sure this has been answered, but I think I have the problem > that is detailed on the main Rancid page... the Expect problem... > x.x.x.x clogin error: Error: TIMEOUT reached > y.y.y.y clogin error: Error: TIMEOUT reached > x.x.x.x clogin error: Error: TIMEOUT reached It might be that you are running into problems actually reaching the router & logging into it. Make sure you can telnet/ssh to the router and that your passwords are right in your .cloginrc. See if you can get clogin working first. --asp From funraps at yahoo.com Tue Nov 11 20:18:28 2003 From: funraps at yahoo.com (funraps too) Date: Tue, 11 Nov 2003 12:18:28 -0800 (PST) Subject: Newbie Problems - - Please see below In-Reply-To: <20031111200943.GB99339@partan.com> Message-ID: <20031111201828.8411.qmail@web41101.mail.yahoo.com> I can get clogin to work just fine both under the new account I've created and my regular accounts., but the do_diff is giving me the error. My tacacs logs indicate that the user has logged in but did not execute any commands.. Andrew Partan wrote: On Tue, Nov 11, 2003 at 11:47:45AM -0800, funraps too wrote: > I'm sure this has been answered, but I think I have the problem > that is detailed on the main Rancid page... the Expect problem... > x.x.x.x clogin error: Error: TIMEOUT reached > y.y.y.y clogin error: Error: TIMEOUT reached > x.x.x.x clogin error: Error: TIMEOUT reached It might be that you are running into problems actually reaching the router & logging into it. Make sure you can telnet/ssh to the router and that your passwords are right in your .cloginrc. See if you can get clogin working first. --asp From asp at partan.com Tue Nov 11 21:56:24 2003 From: asp at partan.com (Andrew Partan) Date: Tue, 11 Nov 2003 16:56:24 -0500 Subject: Newbie Problems - - Please see below In-Reply-To: <20031111201828.8411.qmail@web41101.mail.yahoo.com> References: <20031111200943.GB99339@partan.com> <20031111201828.8411.qmail@web41101.mail.yahoo.com> Message-ID: <20031111215624.GC4619@partan.com> On Tue, Nov 11, 2003 at 12:18:28PM -0800, funraps too wrote: > I can get clogin to work just fine both under the new account > I've created and my regular accounts., but the do_diff is giving > me the error. can you do clogin -c "cmd1;cmd2" router ? if you can't, but clogin works, that may indicate some problem with clogin recognizing the prompt on the router. --asp From funraps at yahoo.com Tue Nov 11 22:21:19 2003 From: funraps at yahoo.com (funraps too) Date: Tue, 11 Nov 2003 14:21:19 -0800 (PST) Subject: Newbie Problems - - Please see below In-Reply-To: <20031111215624.GC4619@partan.com> Message-ID: <20031111222119.57557.qmail@web41106.mail.yahoo.com> Thank you Andrew, The routers are anywhere from 1600, 1700,2100, 7200 etc.... Here is the output of clogin: ./clogin -c "sh ver;sh log" x.x.x.x spawn telnet x.x.x.x Trying x.x.x.x... Connected to x.x.x.x.xxxxxxx.com (x.x.x.x). Escape character is '^]'. User Access Verification Username: Password: # Error: TIMEOUT reached Andrew Partan wrote: On Tue, Nov 11, 2003 at 12:18:28PM -0800, funraps too wrote: > I can get clogin to work just fine both under the new account > I've created and my regular accounts., but the do_diff is giving > me the error. can you do clogin -c "cmd1;cmd2" router ? if you can't, but clogin works, that may indicate some problem with clogin recognizing the prompt on the router. --asp From asp at partan.com Tue Nov 11 22:34:23 2003 From: asp at partan.com (Andrew Partan) Date: Tue, 11 Nov 2003 17:34:23 -0500 Subject: Newbie Problems - - Please see below In-Reply-To: <20031111222119.57557.qmail@web41106.mail.yahoo.com> References: <20031111215624.GC4619@partan.com> <20031111222119.57557.qmail@web41106.mail.yahoo.com> Message-ID: <20031111223423.GB8622@partan.com> On Tue, Nov 11, 2003 at 02:21:19PM -0800, funraps too wrote: > ./clogin -c "sh ver;sh log" x.x.x.x > spawn telnet x.x.x.x > Trying x.x.x.x... > Connected to x.x.x.x.xxxxxxx.com (x.x.x.x). > Escape character is '^]'. > > User Access Verification > Username: > Password: > # > Error: TIMEOUT reached That looks like clogin not recognizing the prompt. Btw, do you have autoenable set in your .cloginrc? --asp From funraps at yahoo.com Tue Nov 11 23:44:52 2003 From: funraps at yahoo.com (funraps too) Date: Tue, 11 Nov 2003 15:44:52 -0800 (PST) Subject: Newbie Problems - - Please see below In-Reply-To: <20031111223423.GB8622@partan.com> Message-ID: <20031111234452.34049.qmail@web41107.mail.yahoo.com> Andrew, I have the following: add user * add password * add autoenable * ===================================== Getting missed routers: round 2. x.x.x.x clogin error: Error: TIMEOUT reached x.x.x.x: missed cmd(s): show env all,show module,show controllers,show diagbus,show diag,dir /all disk1:,show gsr chassis,dir /all bootflash:,write term,dir /all disk2:,show vtp status,dir /all sup-bootflash:,dir /all slot2:,dir /all slot0:,dir /all sup-microcode:,dir /all disk0:,show install active,show bootvar,show vlan,show controllers cbus,dir /all nvram:,show flash,show version,show variables boot,show c7200,show boot,dir /all slot1: x.x.x.x: End of run not found ! x.x.x.x clogin error: Error: TIMEOUT reached x.x.x.x: missed cmd(s): show env all,show module,show controllers,show diagbus,show diag,dir /all disk1:,show gsr chassis,dir /all bootflash:,write term,dir /all disk2:,show vtp status,dir /all sup-bootflash:,dir /all slot2:,dir /all slot0:,dir /all sup-microcode:,dir /all disk0:,show install active,show bootvar,show vlan,show controllers cbus,dir /all nvram:,show flash,show version,show variables boot,show c7200,show boot,dir /all slot1: x.x.x.x: End of run not found ! can not find channel named "exp4" while executing "close" ("foreach" body line 110) invoked from within "foreach router [lrange $argv $i end] { set router [string tolower $router] send_user "$router\n" # Figure out prompt. # Since autoena..." (file "/usr/local/rancid/bin/clogin" line 559) x.x.x.x clogin error: Error: TIMEOUT reached x.x.x.x: missed cmd(s): show env all,show module,show controllers,show diagbus,show diag,dir /all disk1:,show gsr chassis,dir /all bootflash:,write term,dir /all disk2:,show vtp status,dir /all sup-bootflash:,dir /all slot2:,dir /all slot0:,dir /all sup-microcode:,dir /all disk0:,show install active,show bootvar,show vlan,show controllers cbus,dir /all nvram:,show flash,show version,show variables boot,show c7200,show boot,dir /all slot1: x.x.x.x: End of run not found ! ===================================== Andrew Partan wrote: On Tue, Nov 11, 2003 at 02:21:19PM -0800, funraps too wrote: > ./clogin -c "sh ver;sh log" x.x.x.x > spawn telnet x.x.x.x > Trying x.x.x.x... > Connected to x.x.x.x.xxxxxxx.com (x.x.x.x). > Escape character is '^]'. > > User Access Verification > Username: > Password: > # > Error: TIMEOUT reached That looks like clogin not recognizing the prompt. Btw, do you have autoenable set in your .cloginrc? --asp From CShrimpt at INTERGEN.com Wed Nov 12 14:09:17 2003 From: CShrimpt at INTERGEN.com (Shrimpton, Craig) Date: Wed, 12 Nov 2003 09:09:17 -0500 Subject: Problem with RANCID on RH 9.0 Message-ID: <4DA6346BC2C1994C857E9A2A0E09F00D0133CFC7@amerexchp01.intergen.com> Folks, I've set up RANCID on a RH 9.0 machine and everything appears to work with the exception of writing the configs it retrieves. I'm thinking it has something to do with creating the temp files but I'm not sure. I can use clogin to access my router and enter commands. I can also run rancid directly and it will create a ".new" file in the rancid/bin directory. However, running do-diffs produces no output. While do-diffs is running, I can see the logon process at the router, but I don't see any temp files created and my config file in CVS remains at zero bytes. If anyone has some ideas on how to trouble shoot this, I'd appreciate it. I've include to logs below. The first is created from do-diffs and the second from running rancid directly. Note that running rancid directly will create a "burcr05.intergen.com.new" file in the bin directory. Thanks, Craig ----------------------------------------------- Here are the results from "do-diffs." Notice it contains references to missed commands. I can run those commands directly from clogin so I'm not sure about the significance of that error. :::::::::::::: routers.20031111.200642 :::::::::::::: starting: Tue Nov 11 20:06:42 EST 2003 Trying to get all of the configs. Starting rancid-fe \burcr05.intergen.com:cisco: process id=12126 logfile=running.0 0/5: burcr05.intergen.com:cisco: id=12126, log=running.0 All work assigned. Waiting for remaining processes. burcr05.intergen.com: missed cmd(s): show diag,show install active,show controllers cbus 12126 finished (logfile running.0) Complete ===================================== Getting missed routers: round 1. Starting rancid-fe \burcr05.intergen.com:cisco: process id=12136 logfile=running.0 0/5: burcr05.intergen.com:cisco: id=12136, log=running.0 All work assigned. Waiting for remaining processes. burcr05.intergen.com: missed cmd(s): show diag,show install active,show controllers cbus 12136 finished (logfile running.0) Complete ===================================== Getting missed routers: round 2. Starting rancid-fe \burcr05.intergen.com:cisco: process id=12148 logfile=running.0 0/5: burcr05.intergen.com:cisco: id=12148, log=running.0 All work assigned. Waiting for remaining processes. burcr05.intergen.com: missed cmd(s): show diag,show install active,show controllers cbus 12148 finished (logfile running.0) Complete ===================================== Getting missed routers: round 3. Starting rancid-fe \burcr05.intergen.com:cisco: process id=12160 logfile=running.0 0/5: burcr05.intergen.com:cisco: id=12160, log=running.0 All work assigned. Waiting for remaining processes. burcr05.intergen.com: missed cmd(s): show diag,show install active,show controllers cbus 12160 finished (logfile running.0) Complete ===================================== Getting missed routers: round 4. Starting rancid-fe \burcr05.intergen.com:cisco: process id=12172 logfile=running.0 0/5: burcr05.intergen.com:cisco: id=12172, log=running.0 All work assigned. Waiting for remaining processes. burcr05.intergen.com: missed cmd(s): show diag,show install active,show controllers cbus 12172 finished (logfile running.0) Complete /usr/local/rancid/bin/rename: *.new: No such file or directory cvs diff: Diffing . cvs diff: Diffing configs cvs commit: Examining . cvs commit: Examining configs Checking in router.db; /usr/local/rancid/CVS/routers/router.db,v <-- router.db new revision: 1.3; previous revision: 1.2 done /home/rancid/dead.letter... Saved message in /home/rancid/dead.letter ending: Tue Nov 11 20:07:23 EST 2003 ------------------------------------------------------------- Here are the results from "rancid -d -l burcr05.intergen.com" executing clogin -t 90 -c"show version;show install active;show env all;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 sup-bootflash:;dir /all sup-microcode:;show controllers;show controllers cbus;show diagbus;show diag;show module;show c7200;show vtp status;show vlan;write term" burcr05.intergen.com executing clogin -t 90 -c"show version;show install active;show env all;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 sup-bootflash:;dir /all sup-microcode:;show controllers;show controllers cbus;show diagbus;show diag;show module;show c7200;show vtp status;show vlan;write term" burcr05.intergen.com HIT COMMAND:BURCR05#show version In ShowVersion: BURCR05#show version TYPE = 3600 HIT COMMAND:BURCR05#show env all In ShowEnv: BURCR05#show env all HIT COMMAND:BURCR05#show gsr chassis In ShowGSR: BURCR05#show gsr chassis HIT COMMAND:BURCR05#show boot In ShowBoot: BURCR05#show boot HIT COMMAND:BURCR05#show bootvar In ShowBoot: BURCR05#show bootvar HIT COMMAND:BURCR05#show variables boot In ShowBoot: BURCR05#show variables boot HIT COMMAND:BURCR05#show flash In ShowFlash: BURCR05#show flash HIT COMMAND:BURCR05#dir /all nvram: In DirSlotN: BURCR05#dir /all nvram: HIT COMMAND:BURCR05#dir /all bootflash: In DirSlotN: BURCR05#dir /all bootflash: HIT COMMAND:BURCR05#dir /all slot0: In DirSlotN: BURCR05#dir /all slot0: HIT COMMAND:BURCR05#dir /all disk0: In DirSlotN: BURCR05#dir /all disk0: HIT COMMAND:BURCR05#dir /all slot1: In DirSlotN: BURCR05#dir /all slot1: HIT COMMAND:BURCR05#dir /all disk1: In DirSlotN: BURCR05#dir /all disk1: HIT COMMAND:BURCR05#dir /all slot2: In DirSlotN: BURCR05#dir /all slot2: HIT COMMAND:BURCR05#dir /all disk2: In DirSlotN: BURCR05#dir /all disk2: HIT COMMAND:BURCR05#dir /all sup-bootflash: In DirSlotN: BURCR05#dir /all sup-bootflash: HIT COMMAND:BURCR05#dir /all sup-microcode: In DirSlotN: BURCR05#dir /all sup-microcode: HIT COMMAND:BURCR05#show controllers In ShowContAll: BURCR05#show controllers HIT COMMAND:BURCR05#show diagbus In ShowDiagbus: BURCR05#show diagbus HIT COMMAND:BURCR05#show module In ShowModule: BURCR05#show module HIT COMMAND:BURCR05#show c7200 In ShowC7200: BURCR05#show c7200 HIT COMMAND:BURCR05#show vtp status In ShowVTP: BURCR05#show vtp status HIT COMMAND:BURCR05#show vlan In ShowVLAN: BURCR05#show vlan HIT COMMAND:BURCR05#write term In WriteTerm: BURCR05#write term Done : BURCR05#exit burcr05.intergen.com: missed cmd(s): show diag,show install active,show controllers cbus burcr05.intergen.com: missed cmd(s): show diag,show install active,show controllers cbus From heas at shrubbery.net Wed Nov 12 23:03:49 2003 From: heas at shrubbery.net (john heasley) Date: Wed, 12 Nov 2003 23:03:49 +0000 Subject: Problem with RANCID on RH 9.0 In-Reply-To: <4DA6346BC2C1994C857E9A2A0E09F00D0133CFC7@amerexchp01.intergen.com> References: <4DA6346BC2C1994C857E9A2A0E09F00D0133CFC7@amerexchp01.intergen.com> Message-ID: <20031112230349.GJ16134@shrubbery.net> what is the error that this route returns when an unknown command is entered? eg: show install active Wed, Nov 12, 2003 at 09:09:17AM -0500, Shrimpton, Craig: > Folks, > > I've set up RANCID on a RH 9.0 machine and everything appears to work with > the exception of writing the configs it retrieves. I'm thinking it has > something to do with creating the temp files but I'm not sure. I can use > clogin to access my router and enter commands. I can also run rancid > directly and it will create a ".new" file in the rancid/bin directory. > However, running do-diffs produces no output. > > While do-diffs is running, I can see the logon process at the router, but I > don't see any temp files created and my config file in CVS remains at zero > bytes. If anyone has some ideas on how to trouble shoot this, I'd > appreciate it. > > I've include to logs below. The first is created from do-diffs and the > second from running rancid directly. Note that running rancid directly will > create a "burcr05.intergen.com.new" file in the bin directory. > > Thanks, > > Craig > > ----------------------------------------------- > > Here are the results from "do-diffs." Notice it contains references to > missed commands. I can run those commands directly from clogin so I'm not > sure about the significance of that error. > > > :::::::::::::: > routers.20031111.200642 > :::::::::::::: > starting: Tue Nov 11 20:06:42 EST 2003 > > > Trying to get all of the configs. > Starting rancid-fe \burcr05.intergen.com:cisco: process id=12126 > logfile=running.0 > 0/5: burcr05.intergen.com:cisco: id=12126, log=running.0 > All work assigned. Waiting for remaining processes. > burcr05.intergen.com: missed cmd(s): show diag,show install active,show > controllers cbus > 12126 finished (logfile running.0) > Complete > ===================================== > Getting missed routers: round 1. > Starting rancid-fe \burcr05.intergen.com:cisco: process id=12136 > logfile=running.0 > 0/5: burcr05.intergen.com:cisco: id=12136, log=running.0 > All work assigned. Waiting for remaining processes. > burcr05.intergen.com: missed cmd(s): show diag,show install active,show > controllers cbus > 12136 finished (logfile running.0) > Complete > ===================================== > Getting missed routers: round 2. > Starting rancid-fe \burcr05.intergen.com:cisco: process id=12148 > logfile=running.0 > 0/5: burcr05.intergen.com:cisco: id=12148, log=running.0 > All work assigned. Waiting for remaining processes. > burcr05.intergen.com: missed cmd(s): show diag,show install active,show > controllers cbus > 12148 finished (logfile running.0) > Complete > ===================================== > Getting missed routers: round 3. > Starting rancid-fe \burcr05.intergen.com:cisco: process id=12160 > logfile=running.0 > 0/5: burcr05.intergen.com:cisco: id=12160, log=running.0 > All work assigned. Waiting for remaining processes. > burcr05.intergen.com: missed cmd(s): show diag,show install active,show > controllers cbus > 12160 finished (logfile running.0) > Complete > ===================================== > Getting missed routers: round 4. > Starting rancid-fe \burcr05.intergen.com:cisco: process id=12172 > logfile=running.0 > 0/5: burcr05.intergen.com:cisco: id=12172, log=running.0 > All work assigned. Waiting for remaining processes. > burcr05.intergen.com: missed cmd(s): show diag,show install active,show > controllers cbus > 12172 finished (logfile running.0) > Complete > > /usr/local/rancid/bin/rename: *.new: No such file or directory > cvs diff: Diffing . > cvs diff: Diffing configs > cvs commit: Examining . > cvs commit: Examining configs > Checking in router.db; > /usr/local/rancid/CVS/routers/router.db,v <-- router.db > new revision: 1.3; previous revision: 1.2 > done > /home/rancid/dead.letter... Saved message in /home/rancid/dead.letter > > ending: Tue Nov 11 20:07:23 EST 2003 > > ------------------------------------------------------------- > > Here are the results from "rancid -d -l burcr05.intergen.com" > > executing clogin -t 90 -c"show version;show install active;show env all;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 > sup-bootflash:;dir /all sup-microcode:;show controllers;show controllers > cbus;show diagbus;show diag;show module;show c7200;show vtp status;show > vlan;write term" burcr05.intergen.com > executing clogin -t 90 -c"show version;show install active;show env all;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 > sup-bootflash:;dir /all sup-microcode:;show controllers;show controllers > cbus;show diagbus;show diag;show module;show c7200;show vtp status;show > vlan;write term" burcr05.intergen.com > HIT COMMAND:BURCR05#show version > In ShowVersion: BURCR05#show version > TYPE = 3600 > HIT COMMAND:BURCR05#show env all > In ShowEnv: BURCR05#show env all > HIT COMMAND:BURCR05#show gsr chassis > In ShowGSR: BURCR05#show gsr chassis > HIT COMMAND:BURCR05#show boot > In ShowBoot: BURCR05#show boot > HIT COMMAND:BURCR05#show bootvar > In ShowBoot: BURCR05#show bootvar > HIT COMMAND:BURCR05#show variables boot > In ShowBoot: BURCR05#show variables boot > HIT COMMAND:BURCR05#show flash > In ShowFlash: BURCR05#show flash > HIT COMMAND:BURCR05#dir /all nvram: > In DirSlotN: BURCR05#dir /all nvram: > HIT COMMAND:BURCR05#dir /all bootflash: > In DirSlotN: BURCR05#dir /all bootflash: > HIT COMMAND:BURCR05#dir /all slot0: > In DirSlotN: BURCR05#dir /all slot0: > HIT COMMAND:BURCR05#dir /all disk0: > In DirSlotN: BURCR05#dir /all disk0: > HIT COMMAND:BURCR05#dir /all slot1: > In DirSlotN: BURCR05#dir /all slot1: > HIT COMMAND:BURCR05#dir /all disk1: > In DirSlotN: BURCR05#dir /all disk1: > HIT COMMAND:BURCR05#dir /all slot2: > In DirSlotN: BURCR05#dir /all slot2: > HIT COMMAND:BURCR05#dir /all disk2: > In DirSlotN: BURCR05#dir /all disk2: > HIT COMMAND:BURCR05#dir /all sup-bootflash: > In DirSlotN: BURCR05#dir /all sup-bootflash: > HIT COMMAND:BURCR05#dir /all sup-microcode: > In DirSlotN: BURCR05#dir /all sup-microcode: > HIT COMMAND:BURCR05#show controllers > In ShowContAll: BURCR05#show controllers > HIT COMMAND:BURCR05#show diagbus > In ShowDiagbus: BURCR05#show diagbus > HIT COMMAND:BURCR05#show module > In ShowModule: BURCR05#show module > HIT COMMAND:BURCR05#show c7200 > In ShowC7200: BURCR05#show c7200 > HIT COMMAND:BURCR05#show vtp status > In ShowVTP: BURCR05#show vtp status > HIT COMMAND:BURCR05#show vlan > In ShowVLAN: BURCR05#show vlan > HIT COMMAND:BURCR05#write term > In WriteTerm: BURCR05#write term > Done : BURCR05#exit > > burcr05.intergen.com: missed cmd(s): show diag,show install active,show > controllers cbus > burcr05.intergen.com: missed cmd(s): show diag,show install active,show > controllers cbus From CShrimpt at INTERGEN.com Fri Nov 14 14:25:05 2003 From: CShrimpt at INTERGEN.com (Shrimpton, Craig) Date: Fri, 14 Nov 2003 09:25:05 -0500 Subject: Problem with RANCID on RH 9.0 Message-ID: <4DA6346BC2C1994C857E9A2A0E09F00D0133CFD0@amerexchp01.intergen.com> > what is the error that this route returns when an unknown command is > entered? eg: show install active > > Wed, Nov 12, 2003 at 09:09:17AM -0500, Shrimpton, Craig: > > Folks, > > > > I've set up RANCID on a RH 9.0 machine and everything appears to work with > > the exception of writing the configs it retrieves. I'm thinking it has > > something to do with creating the temp files but I'm not sure. I can use > > clogin to access my router and enter commands. I can also run rancid > > directly and it will create a ".new" file in the rancid/bin directory. > > However, running do-diffs produces no output. The problem looks like it's specific to RH 9.0. I removed RH 9.0 and installed SuSE 9.0 and now it works fine with the exact same config. Maybe there is some subtle difference between the two distros with respect to either expect or perl? However, both distros have the same versions of the two mentioned apps. That's o.k. since I like SuSE better anyway, but I wish I could figure out what did it in case it happens after an upgrade. Thanks, -C From heas at shrubbery.net Fri Nov 14 14:46:53 2003 From: heas at shrubbery.net (john heasley) Date: Fri, 14 Nov 2003 14:46:53 +0000 Subject: Problem with RANCID on RH 9.0 In-Reply-To: <4DA6346BC2C1994C857E9A2A0E09F00D0133CFD0@amerexchp01.intergen.com> References: <4DA6346BC2C1994C857E9A2A0E09F00D0133CFD0@amerexchp01.intergen.com> Message-ID: <20031114144653.GU16134@shrubbery.net> In that case, it is most likely some subtle difference in the way expect was compiled or the way ptys are handled. Fri, Nov 14, 2003 at 09:25:05AM -0500, Shrimpton, Craig: > The problem looks like it's specific to RH 9.0. I removed RH 9.0 and > installed SuSE 9.0 and now it works fine with the exact same config. Maybe > there is some subtle difference between the two distros with respect to > either expect or perl? However, both distros have the same versions of the > two mentioned apps. > > That's o.k. since I like SuSE better anyway, but I wish I could figure out > what did it in case it happens after an upgrade. > > Thanks, > > -C From hank at rem.com Mon Nov 17 03:34:09 2003 From: hank at rem.com (Henry Kilmer) Date: Sun, 16 Nov 2003 22:34:09 -0500 Subject: Newbie Problems - - Please see below In-Reply-To: <20031111234452.34049.qmail@web41107.mail.yahoo.com> References: <20031111223423.GB8622@partan.com> <20031111234452.34049.qmail@web41107.mail.yahoo.com> Message-ID: <16312.16817.226753.707937@durmstrang.padfoot.com> Try: add autoenable * 1 funraps too writes: >Andrew, > >I have the following: > >add user * >add password * >add autoenable * > > > >===================================== >Getting missed routers: round 2. >x.x.x.x clogin error: Error: TIMEOUT reached >x.x.x.x: missed cmd(s): show env all,show module,show controllers,show diagbus,show diag,dir /all disk1:,show gsr chassis,dir /all bootflash:,write term,dir /all disk2:,show vtp status,dir /all sup-bootflash:,dir /all slot2:,dir /all slot0:,dir /all sup-microcode:,dir /all disk0:,show install active,show bootvar,show vlan,show controllers cbus,dir /all nvram:,show flash,show version,show variables boot,show c7200,show boot,dir /all slot1: >x.x.x.x: End of run not found >! >x.x.x.x clogin error: Error: TIMEOUT reached >x.x.x.x: missed cmd(s): show env all,show module,show controllers,show diagbus,show diag,dir /all disk1:,show gsr chassis,dir /all bootflash:,write term,dir /all disk2:,show vtp status,dir /all sup-bootflash:,dir /all slot2:,dir /all slot0:,dir /all sup-microcode:,dir /all disk0:,show install active,show bootvar,show vlan,show controllers cbus,dir /all nvram:,show flash,show version,show variables boot,show c7200,show boot,dir /all slot1: >x.x.x.x: End of run not found >! >can not find channel named "exp4" > while executing >"close" > ("foreach" body line 110) > invoked from within >"foreach router [lrange $argv $i end] { > set router [string tolower $router] > send_user "$router\n" > # Figure out prompt. > # Since autoena..." > (file "/usr/local/rancid/bin/clogin" line 559) >x.x.x.x clogin error: Error: TIMEOUT reached >x.x.x.x: missed cmd(s): show env all,show module,show controllers,show diagbus,show diag,dir /all disk1:,show gsr chassis,dir /all bootflash:,write term,dir /all disk2:,show vtp status,dir /all sup-bootflash:,dir /all slot2:,dir /all slot0:,dir /all sup-microcode:,dir /all disk0:,show install active,show bootvar,show vlan,show controllers cbus,dir /all nvram:,show flash,show version,show variables boot,show c7200,show boot,dir /all slot1: >x.x.x.x: End of run not found >! >===================================== > > >Andrew Partan wrote: >On Tue, Nov 11, 2003 at 02:21:19PM -0800, funraps too wrote: >> ./clogin -c "sh ver;sh log" x.x.x.x >> spawn telnet x.x.x.x >> Trying x.x.x.x... >> Connected to x.x.x.x.xxxxxxx.com (x.x.x.x). >> Escape character is '^]'. >> >> User Access Verification >> Username: >> Password: >> # >> Error: TIMEOUT reached > >That looks like clogin not recognizing the prompt. >Btw, do you have autoenable set in your .cloginrc? >--asp