Andrei Sabau | 17 Apr 13:47 2014

[rancid] Login to Juniper J-series work, commands do not.

I have an issue where jlogin works when connecting to a juniper device, but if i run rancid-run or jrancid -c 'command' it gets stuck after the prompt.

The last lines are :

expect: does "rancid <at> BGP-CORE-0> " (spawn_id exp4) match regular expression "(\r\n|\n)"? (No Gate, RE only) gate=yes re=no
"^[^ ]+>"? Gate "*>"? gate=yes re=yes
expect: set expect_out(0,string) "rancid <at> BGP-CORE-0>"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) "rancid <at> BGP-CORE-0>"
Gate keeper glob pattern for 'rancid <at> BGP-CORE-0[#>]' is 'rancid <at> BGP-CORE-0?'. Activating booster.

expect: does " " (spawn_id exp4) match regular expression "rancid <at> BGP-CORE-0[#>]"? Gate "rancid <at> BGP-CORE-0?"? gate=no
expect: timed out

Error: TIMEOUT reached

I set the timeout to 20 seconds so it'll die. The command was 'show version'. But if i run jlogin without command i can do anything on the device.

Any ideas?

Rancid-discuss mailing list
Rancid-discuss <at>
Tore Anderson | 16 Apr 10:52 2014

[rancid] '>' in default prompt causes problems for zrancid

After an upgrade from RANCID 2.3.2, zrancid is creating bogus diffs.
They always involve the character «e» appearing/disappearing at the
beginning of lines, like so:

-log file /var/log/quagga/zebra.log
+elog file /var/log/quagga/zebra.log

Or at the end of lines, like so:

- ipv6 nd suppress-ra
+ ipv6 nd suppress-rae

I've traced this to a change in the default prompt in that
happened in RANCID 2.3.6. Fast forwarding to RANCID 3.0, the relevant
code is as follows (lines 766-770 of

    # Default prompt.
    set prompt [join [find prompt $router] ""]
    if { [llength $prompt] == 0 } {
	set prompt "(>|#| \\(enable\\))"

In RANCID 2.3.5 and earlier, $prompt was set to "(#| \\(enable\\))" by
default, and that worked perfectly for me.

I haven't yet been able to fully understand why the ">" match is causing
problems, but I did notice that it causes $prompt_match to always be set
to ">" at lines 576-579 of

        -re "$prompt"           {
                                  set prompt_match $expect_out(0,string);

However, the routers in question don't use ">" in their prompt (they use
"#"), so I don't think this can be right.

Attempting to escape the ">" (using "\>" or "\\>") makes no difference.
Removing it or replacing it with any other character (including "<")
does help, though, and in this case $prompt_match gets set to "#" as
expected, and the spurious «e» characters stop appearing.

The platform is Ubuntu 12.04.4 with expect 5.45.


Rancid-discuss mailing list
Rancid-discuss <at>

Howard Jones | 15 Apr 20:38 2014

[rancid] Mutating prompts

My previously working multi-context ASA/FWSM script appears to have been 
more by luck than judgement, and fails if the hostname has a '-' in it, 
I guess because there is somewhere it is being interpreted as a regexp 

I've just been taking a look at it again, and making a fwsmlogin from 
clogin, which understands that the prompt changes when there's a 
'changeto' command to move between firewall contexts. Am I right in 
thinking I need to redo this stuff in BOTH '*login' and '*rancid' in two 
different languages?


Rancid-discuss mailing list
Rancid-discuss <at>

Vyankat Gaddamwar | 15 Apr 11:50 2014

[rancid] Rancid 3.0 config problem



I installed rancid 3.0 and configured properly as per documentation but when I run bin/rancid-run no output and logs are empty.

Any good way to troubleshoot this?




Rancid-discuss mailing list
Rancid-discuss <at>
Charles Gagnon | 11 Apr 22:01 2014

[rancid] So close yet....

So I just tried deploying rancid on a RHEL 6.2 box. I have:

rancid 3.0
perl v5.10.1
expect version

It seems close to working but whenever I run 'rancid-run', routers end-up in the routers.down file. I am testing right now with a single entry in my router.db.

I tested w/ clogin myrouter (which works)
I can also do rancid -t cisco myroute (and it also saves a file)

If I run "rancid myrouter" it failed with:
$ rancid myrouter
loadtype(): device_type is empty
Couldn't load device type spec for 

But this may be normal. 

rancid-run returns no errors. Returns in a few seconds with no output. What is the best way to troubleshoot this?

I check my .db file and it is NOT DOS format. How can I tell if I have a problem with my file.

Any good way to troubleshoot this?

Charles Gagnon
charlesg at
Rancid-discuss mailing list
Rancid-discuss <at>
Fabio Santos | 10 Apr 17:12 2014

[rancid] Erro with Rancid on solaris 10.

Hi all,

I'm trying to compile rancid 3.0 on solaris 10, the ./configure command works fine. but when i try make i received the erro above,

Making all in bin
gmake[1]: Entering directory `/tmp/rancid-3.0/bin'
gcc -DHAVE_CONFIG_H -I. -I../include     -g -O0 -MT hpuifilter.o -MD -MP -MF .deps/hpuifilter.Tpo -c -o hpuifilter.o hpuifilter.c
mv -f .deps/hpuifilter.Tpo .deps/hpuifilter.Po
gcc  -g -O0   -o hpuifilter hpuifilter.o
gcc -DHAVE_CONFIG_H -I. -I../include     -g -O0 -MT par.o -MD -MP -MF .deps/par.Tpo -c -o par.o par.c
mv -f .deps/par.Tpo .deps/par.Po
gcc  -g -O0   -o par par.o
Undefined                       first referenced
 symbol                             in file
asprintf                            par.o
ld: fatal: Symbol referencing errors. No output written to par
gmake[1]: *** [par] Error 1
gmake[1]: Leaving directory `/tmp/rancid-3.0/bin'
make: *** [all-recursive] Error 1

Someone know how can i fix this problem?

Rancid-discuss mailing list
Rancid-discuss <at>
Andrei Sabau | 7 Apr 18:09 2014

[rancid] rancid -t cisco host works but rancid host does not.

Hello. I've recently installed Rancid on a Centos 6. I have worked with it before a bit but never encountered this issue.

I have hosts assigned in the hosts file. I have the host added in <group>/router.db
The clogin command works. The clogin -c command works.

The log from run-rancid shows almost empty. I tried running the comands separately but 'rancid host' gives me a:

loadtype(): device_type is empty
Couldn't load device type spec for

but 'rancid -t cisco host' works. I'm thinking this has to do with rancid and the group's router.db.

my group is in rancid.conf (LIST_OF_GROUPS="networking") but is the networking/router.db even read?

Any ideas are helpful, thanks.
Rancid-discuss mailing list
Rancid-discuss <at>

[rancid] fortigate paging suppression

Hi All,


I have some new fortigates that I need to backup with RANCID. They are running config-version FW60C-5.00. When I back them up the paging lines show up in the config on the same line as some part of the config eg. “--More--                          next”. I have tried patching the original fnlogin with the following.


-                  -gl "--More--"                                                { send " "

+                 -gl "--More--\[^\n\r]*"                             { send " "


-                  -re "\[\n\r]+"                                 { exp_continue }


+                 -re "\[^\r\n]*\[\n\r]+"             { send_user -- "$expect_out(buffer)"

+                                                                                               exp_continue }

+                                                                                             }


I still get the pages in the config. I tried a newer version of fnlogin from but have the same result. I am currently running RANCID 2.3.6-1.el5 and will not be upgrading to a newer version for at least another month or two. Is there a way to make this work with my current fnlogin and RANCID version?




Rancid-discuss mailing list
Rancid-discuss <at>
heasley | 2 Apr 00:26 2014

Re: [rancid] Cisco Banner Issue

Mon, Mar 31, 2014 at 09:34:33PM +0100, Alex DEKKER:
> On 31/03/14 04:57, heasley wrote:
> > develop a process to wait to see if
> > anything follows the # or >, which has its own set of pitfalls.
> I [sitting in my armchair, not being the developer] think this idea has 
> some mileage. Would it be unreasonable to wait n seconds after a # to 
> determine that it's a prompt? Obviously if you do this then you'd have 
> to add a knob to tweak for those who are taking backups over satellite 
> links &c.
> Perhaps you could be a bit cleverer - if a router is delivering 20 
> lines/sec of output, then you'll know within 0.5sec if it's finished, 
> although some seem to always be slow when delivering certain sections of 
> config. Pitfalls indeed!

Something like this could [mostly] work.

---	(revision 2802)
+++	(working copy)
 <at>  <at>  -575,7 +575,21  <at>  <at> 
 	-re "$prompt"		{
 				  set prompt_match $expect_out(0,string);
-				  break;
+				  expect {
+					" "	{ exp_continue }
+					-re ".+" {
+						  unset prompt_match;
+						  break
+						}
+					timeout	{ set to 1;
+						  break
+						}
+				  }
+				  if {$to == 1} {
+					unset to;
+					break
+				  }
+				  exp_continue;
 	"Login invalid"		{
 				  send_user "\nError: Invalid login: $router\n";

but without constraining the timeout somehow, thats much to slow for my
patience.  it also doesnt deal with eof.

how to arrive at a reliable timeout is a another question.  what is too long
or short?  can the previous input rate simply be measured?  is the link
congested or is there routing instability producing massively variable
throughput?  maybe some would argue that last bit can be ignored; i think
that makes it unreliable and more difficult to support.

i am far more inclined to say dont do it (or have banners at all); the price
of admission.  or, if you must have #s in your banner, do not use autoenable,
so its looking for >s - which is also a poor solution, as it would be better
for clogin not to care about autoenable, so it would be looking for [>#] by

i am however open to adding a cloginrc variable to constrain the prompt
match; eg: "^[ \n\r]+[#>]".  thereby, you could have whatever you wanted
in your banner as long as the first character of the line is a space - for

and open to other suggestions or proving me wrong :)
Rancid-discuss mailing list
Rancid-discuss <at>

Shane Ronan | 1 Apr 22:46 2014

[rancid] No "Show VLAN" on Cisco 3750

It collects and records this data for all other Cisco equipment types.

Help is appreciated.

Shane Ronan, Vice President – Technology Architect 

State Street Global Exchange | 600 College Road East | Princeton, NJ 08540

P  (212) 259-3023    |  M (347) 413-4503

sronan <at>
Rancid-discuss mailing list
Rancid-discuss <at>
Hans Mueller | 31 Mar 15:51 2014

[rancid] Alcatel-Lucent Support 7330 ISAM FTTN (ANSI)

I'm looking for a working rancid login script for Alcatel-Lucent Support 7330 ISAM FTTN (ANSI). I'm managing about 30 of these boxes and i would be happy if rancid would work. I'm able to provide a test-login to a labor system.

Best regards
Rancid-discuss mailing list
Rancid-discuss <at>