Jaynee Shah | 6 Jun 00:46 2015
Picon

[rancid] Rancid backup problem for Arista 7500

Hi,

We recently started deploying Arista 7504 switches, with dual supervisor modules. Rancid backup won't work for the switches. 

Here is the error message:

=====================================
Getting missed routers: round 3.
couldn't compile regular expression pattern: parentheses () not balanced
    while executing
"expect {
            -re "\b+"                           { exp_continue }
            -re "^\[^\n\r *]*$reprompt"         { send_user -- "$expect_out(buffer)"
                                                }
            -re "^\[^\n\r]*$reprom..."
    (procedure "run_commands" line 27)
    invoked from within
"run_commands $prompt $command"
    ("foreach" body line 186)
    invoked from within
"foreach router [lrange $argv $i end] {
    set router [string tolower $router]
    # attempt at platform switching.
    set platform ""
    send_user ..."
    (file "/usr/local/rancid/bin/clogin" line 740)
switch1: missed cmd(s): dir flash:,show env all,show inventory,show extensions,show boot-config,show version,show boot-extensions,show running-config
switch1: End of run not found
!

clogin to the switch works fine though.

rancid <at> net-server:~$ bin/clogin switch1
switch1
spawn ssh -c 3des -x -l rancid switch1
Password: 
switch1(s1)>enable
Password: 
switch1(s1)#
switch1(s1)#exit
Connection to switch1 closed.


Does this look like a problem with the hostname itself? The switch has switch1(s1) or switch1(s2) prompt, depending on which supervisor is the active one. Here is a similar previous thread I found:

Let me know if anyone has experienced the similar issue. If so, what needs to be done to resolve this? 

Thanks.
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Hussein, Md Sazzad | 4 Jun 14:37 2015
Picon

[rancid] Config generatinf failed_Help required

Guys,

I am facing problem with switch config backup.

​When i just run the following command:
sudo su -c /usr/lib/rancid/bin/rancid-run -s /bin/bash -l rancid​

​I used to get the "attached" log:::::​

​My config:::​

​rancid <at> RR-DE-NMS-1:~/network$ more router.db
172.19.254.46:hp:up
172.19.254.53:hp:up
172.19.1.254:netscreen:up

Please note that there is no "enable" passowrd is assigned. I just put the admin passowrd directly.

Anyone is there to support me!


--
-- Sazzad Hussein www.sazzad-hussein.branded.me | ete.sabuj <at> gmail.com Hermann-Ehlers Str. 2, 49082 Osnabrück, Deutschland Mobile number: 4915214010461
Attachment (rancid log): application/octet-stream, 5268 bytes
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Hussein, Md Sazzad | 4 Jun 12:02 2015
Picon

[rancid] Email delivery failing

Dear Support,

Please have a look over following mail.log & aliases information. It seems that rancid is deliveryng data to wrong recepient!

1. mail.log
Jun  4 09:57:39 RR-DE-NMS-1 postfix/qmgr[9395]: 79093D20A3C: from=<rancid <at> de.rr-icecream.eu>, size=569, nrcpt=1 (queue active)
Jun  4 09:57:39 RR-DE-NMS-1 postfix/smtp[6699]: 79093D20A3C: to=<rancid-network <at> de.rr-icecream.eu>, orig_to=<rancid-network>, relay=172.19.1.31[172.19.1.31]:25, delay=0.19, delays=0.01/0/0/0.17, dsn=2.6.0, status=sent (250 2.6.0 <20150604075739.79093D20A3C <at> RR-DE-NMS-1.de.rr-icecream.internal> Queued mail for delivery)

2. vi /etc/aliases
rancid-network:               sazzad.hussein <at> de.rr-icecream.eu
rancid-admin-network:         sazzad.hussein <at> de.rr-icecream.eu

​I am following ellow guide to install rancid:​
https://www.edge-cloud.net/2013/05/rancidtrac-on-ubuntu-12-04-lts/

Also please let me know, in which directory i can get all the data?

​Any idea how to fix it?​

--
-- Sazzad Hussein www.sazzad-hussein.branded.me | ete.sabuj <at> gmail.com Hermann-Ehlers Str. 2, 49082 Osnabrück, Deutschland Mobile number: 4915214010461
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Alfredo Jo | 3 Jun 22:28 2015

[rancid] rancid and Cisco WLC

I am trying to backup 2 Cisco WLC with rancid 3.2. I can see the file under /usr/local/rancid/var/networking/configs but when but nothing shows when I open it. Logs don't show anything, I also tried ciscowlc4 and 5. 

my router db. 

10.0.0.4;ciscowlc;up

172.16.1.4;ciscowlc;up


clogin info:


#WLC SF

add methos 10.0.0.4        ssh 

add noenable 10.0.0.4       {01}

add user 10.0.0.4         adminusername 

add password 10.0.0.4     {password}    {password}


Thank you for all the help 


_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Alfredo Jo | 3 Jun 22:21 2015

[rancid] No such file or directory at /usr...

Hello, 

I have a Dell switch N3048 which used to back up but for some reason it has stopped and the logs now show the following:

Trying to get all of the configs.

Could not open /usr/local/rancid/etc/rancid.types.conf: No such file or directory at /usr/local/rancid/bin/rancid-fe line 61.

10.0.0.251: missed cmd(s): all commands

10.0.0.251: End of run not found

!

Could not open /usr/local/rancid/etc/rancid.types.conf: No such file or directory at /usr/local/rancid/bin/rancid-fe line 61.

=====================================

Getting missed routers: round 1.

Could not open /usr/local/rancid/etc/rancid.types.conf: No such file or directory at /usr/local/rancid/bin/rancid-fe line 61.

Could not open /usr/local/rancid/etc/rancid.types.conf: No such file or directory at /usr/local/rancid/bin/rancid-fe line 61.

10.0.0.251: missed cmd(s): all commands

10.0.0.251: End of run not found


my router.db show:

10.0.0.251;force10;up

I am using force10 because its the only dell one in the list of devices 

my .clogin info is:

#Dell N3048  Stack

add method 10.0.0.251         ssh

add user 10.0.0.251           adminusername

add password 10.0.0.251      {userPassword} {enablepassword}


As always very grateful for all the help. 



_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
heasley | 3 Jun 17:08 2015
Picon

Re: [rancid] .cloginrc add method hostname {ssh:-port} for mtlogin/mtrancid?

Wed, Jun 03, 2015 at 03:07:39PM +0100, Lukasz Sokol:
> rancid <at> george:~$ bin/mtlogin hostname
> hostname
> 
> Error: unknown connection method: ssh:65122
> 
> will get there, eventually :)

grumble.  it needs to match the port below; i think this change is the
missing bit.  sorry

Index: bin/mtlogin.in
===================================================================
--- bin/mtlogin.in	(revision 3124)
+++ bin/mtlogin.in	(working copy)
 <at>  <at>  -277,7 +277,7  <at>  <at> 
 		send_user "\nError: telnet failed: $reason\n"
 		return 1
 	    }
-	} elseif ![string compare $prog "ssh"] {
+	} elseif [string match "ssh*" $prog] {
 	    # ssh to the router & try to login with or without an identfile.
 	    regexp {ssh(:([^[:space:]]+))*} $prog methcmd suffix port
 	    set cmd $sshcmd

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss

Tetsuo Handa | 3 Jun 15:16 2015
Picon

[rancid] Several suggestions about rancid-3.2.p7

Hello.

I've just installed rancid-3.2p7 on CentOS 6.6.

(1) I noticed that while the configure script checks for Socket.pm >= 2.006 ,
    it works for me with below patch. If below patch is correct (I'm not perl
    user), we don't need to force users to upgrade package to a version which
    is not included in RHEL 6 / CentOS 6 distribution.

----------------------------------------
patch -p0 << "EOF"
--- configure
+++ configure
 <at>  <at>  -5316,15 +5316,6  <at>  <at> 
 PERLV=`basename $PERLV_PATH`

 
-# check Socket.pm version
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Socket.pm version" >&5
-$as_echo_n "checking Socket.pm version... " >&6; }
-$PERLV_PATH -e 'use 2.006 Socket qw(inet_pton);' 2>&1 >/dev/null
-if test $? -ne 0 ; then
-   as_fn_error $? "Socket.pm is older than 2.006; upgrade from http://metacpan.org/pod/Socket"
"$LINENO" 5
-   exit 1
-fi
-
 # Extract the first word of "expect", so it can be a program name with args.
 set dummy expect; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
--- lib/rancid.pm.in
+++ lib/rancid.pm.in
 <at>  <at>  -48,7 +48,7  <at>  <at> 
 use 5.010;
 use strict 'vars';
 use warnings;
-use 2.006 Socket qw(AF_INET AF_INET6 inet_pton);
+use Socket qw(AF_INET AF_INET6);
 require(Exporter);
 our  <at> ISA = qw(Exporter);

 <at>  <at>  -351,6 +351,11  <at>  <at> 
      <at> sorted_lines;
 }

+sub inet_pton {
+    my($family, $addr) =  <at> _;
+    return inet_pton($family, $addr);
+}
+
 # ipaddrval(IPaddr) converts and IPv4/v6 address to a string for comparison.
 # Some may ask why not use Net::IP; performance.  We tried and it was horribly
 # slow.
EOF
----------------------------------------

(2) I noticed that the shell variable SENDMAIL is defined in
    bin/control_rancid.in like below

      # SENDMAIL location
      SENDMAIL=${SENDMAIL:=sendmail};

    but this variable is never used because /usr/sbin/sendmail is
    hard-coded like below

      /usr/sbin/sendmail -t $MAILOPTS

    I think you need to either remove this variable definition or
    replace like below with variable definition updated.

      -| /usr/sbin/sendmail -t $MAILOPTS
      +| $SENDMAIL -t $MAILOPTS

(3) I noticed that bin/control_rancid.in forgot to exclude .cvsignore
    file in the

      # delete configs from RCS for routers not listed in routers.up.

    block. As a result, "svn commit" fails and "Deleted .cvsignore" line
    is printed (very confusing!) when I executed bin/rancid-run , possibly
    the same problem reported at
    http://www.shrubbery.net/pipermail/rancid-discuss/2015-May/008414.html .

    I think you need to replace like below.

      -for router in `find . \( -name \*.new -prune -o -name CVS -prune -o -name .svn -prune -o -name .gitignore
-prune \) -o -type f -print | sed -e 's/^.\///'`
      +for router in `find . \( -name \*.new -prune -o -name CVS -prune -o -name .svn -prune -o -name .gitignore
-prune -o -name .cvsignore -prune \) -o -type f -print | sed -e 's/^.\///'`

(4) Usually, PATH environment variable should not contain "."
    (current directory).

Regards.
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss

Ren, James | 1 Jun 16:37 2015
Picon

[rancid] RANCID squash the case

Dear RANCID users,

 

I’m currently upgrading our RANCID system from 2.3.6 to 3.1.  With regards to your reply on http://www.shrubbery.net/pipermail/rancid-discuss/2014-November/007913.html, Heasley and Hank mentioned “the login scripts squash the case of their command-line host/device argument(s)”.

 

Would you please let me know where I can remove this function? I tried to search for the whole directory but was unable to locate the proper place to change it.

 

 

Many thanks in advance,

 

James Ren

Network Engineer

 

4 Victoria Square  |   St Albans    |  Hertfordshire  |  AL1 3TF

 

T: +44 (0)1727 421038

M:+44 (0)752 3262559

W: www.sky.com

 

 

 

 

Information in this email including any attachments may be privileged, confidential and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you have received it in error, please notify the sender by return e-mail and delete it from your system. You should not reproduce, distribute, store, retransmit, use or disclose its contents to anyone. Please note we reserve the right to monitor all e-mail communication through our internal and external networks. SKY and the SKY marks are trademarks of Sky plc and Sky International AG and are used under licence. Sky UK Limited (Registration No. 2906991), Sky-In-Home Service Limited (Registration No. 2067075) and Sky Subscribers Services Limited (Registration No. 2340150) are direct or indirect subsidiaries of Sky plc (Registration No. 2247735). All of the companies mentioned in this paragraph are incorporated in England and Wales and share the same registered office at Grant Way, Isleworth, Middlesex TW7 5QD.
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Lukasz Sokol | 2 Jun 13:21 2015
Picon

[rancid] .cloginrc add method hostname {ssh:-port} for mtlogin/mtrancid?

Hi,
I dug : http://www.shrubbery.net/pipermail/rancid-discuss/2009-January/003604.html

and tried adding that to my rancid (2.3.8 from Debian packages) .cloginrc,

but my mtlogin still tries connecting to port 22 :

rancid <at> george:~$ bin/mtlogin hostname
hostname
spawn ssh -i /var/lib/rancid/.ssh/id_ssa_for_mt_backup -c 3des -x -l user+ct hostname
ssh: connect to host hostname port 22: Connection refused
can not find channel named "exp6"
    while executing
"expect eof"
    invoked from within
"expect {
	"Connection refused" {
	    catch {close}; catch {wait};
	    sleep 0.3
		expect eof
		send_user "\nError: Connection Refused\n"; wait; retu..."
    (procedure "login" line 71)
    invoked from within
"login $router $ruser $userpswd $passwd $prompt $cmethod $cyphertype $identfile"
    ("foreach" body line 87)
    invoked from within
"foreach router [lrange $argv $i end] {
    set router [string tolower $router]
    send_user "$router\n"

    # Figure out prompt.
    set prompt "] >..."
    (file "bin/mtlogin" line 479)

and so same does rancid-run...

Can I try to teach mtrancid/mtlogin to spec a non-standard port?

Lukasz

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss

Brown, David M JR | 1 Jun 22:50 2015

[rancid] Rancid 3.2 RHEL6 compatibilities with Socket module.

We’ve had several requests to get the updated version of rancid on RHEL 6. However, there seems to be some issues getting that to work with the older version of the Socket module.


The patch ftp://ftp.shrubbery.net/pub/rancid/rancid-3.2.p3.gz seems to be the supported resolution though it does prevent rancid 3.2 from running on RHEL 6, out of the box.

The patch in the bug suggests using the Socket6 module and pulling the relevant names which seems to have a working version. Would it be possible to use Socket6 instead of Socket for inet_pton()?

Thanks,
- David Brown
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Alfredo Jo | 1 Jun 19:46 2015

[rancid] End of run not found

Hello, 

I am running rancid 3.2. backing up various switches. I have a Dell switch N3048 which used to back up but for some reason it has stopped and the logs now show the following:

Trying to get all of the configs.

10.0.0.251: End of run not found

=====================================

Getting missed routers: round 1.

10.0.0.251: End of run not found

=====================================

Getting missed routers: round 2.

10.0.0.251: End of run not found

=====================================

Getting missed routers: round 3.

10.0.0.251: End of run not found

=====================================

Getting missed routers: round 4.

10.0.0.251: End of run not found



my router.db show:

10.0.0.251;force10;up

I am using force10 because its the only dell one in the list of devices 

my .clogin info is:

#Dell N3048  Stack

add method 10.0.0.251         ssh

add user 10.0.0.251           adminusername

add password 10.0.0.251      {userPassword} {enablepassword}


As always very grateful for all the help. 


_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss

Gmane