Mailing List Archive

Error when trying to back up a JunOS device, SRX100
Hello all,


I am setting up a test enviroment on Ubuntu 16.04 before Rancid will go to a production enviroment.

Everytime I run Rancid I get the following error:

"Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/rancid/junos.pm line 135

Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/rancid/junos.pm line 140

00003-test-fw01: missed cmd(s): show configuration, show version invoke-on other-routing-engine, show system core-dumps, show version detail

00003-test-fw01: End of run not foud

# Error: TIMEOUT reached"



When I go the the part that the log (/usr/share/perl5/rancid/junos.pm) tells me, the part is following:



"$rval = {$commands{$cmd}}{$INPUT, $OUTPUT, $cmd};

delete($commands{$cmd});

if {$rval == -1} { // this is the line 135

$clean_run = 0;

last TOP;

}

if (/>\s*quit/){ // this is line 140

$clean_run=1;

last;

}"

The command I am using to run Rancid is:
"sudo su -c /var/lib/rancid/bin/rancid-run -s /bin/bash -l rancid"

Could you please help me?

Kind regards,
Lauri
Re: Error when trying to back up a JunOS device, SRX100 [ In reply to ]
> Am 21.03.2018 um 20:43 schrieb Lauri Haveri <lauri.haveri@alsocloudsolutions.fi>:
>
> Hello all,
>
> I am setting up a test enviroment on Ubuntu 16.04 before Rancid will go to a production enviroment.
>
> Everytime I run Rancid I get the following error:
>
> “Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/rancid/junos.pm line 135
> Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/rancid/junos.pm line 140
> 00003-test-fw01: missed cmd(s): show configuration, show version invoke-on other-routing-engine, show system core-dumps, show version detail
> 00003-test-fw01: End of run not foud
> # Error: TIMEOUT reached”
>
> When I go the the part that the log (/usr/share/perl5/rancid/junos.pm) tells me, the part is following:
>
> “$rval = {$commands{$cmd}}{$INPUT, $OUTPUT, $cmd};
> delete($commands{$cmd});
> if {$rval == -1} { // this is the line 135
> $clean_run = 0;
> last TOP;
> }
> if (/>\s*quit/){ // this is line 140
> $clean_run=1;
> last;
> }”
>
> The command I am using to run Rancid is:
> “sudo su -c /var/lib/rancid/bin/rancid-run -s /bin/bash -l rancid”
>
> Could you please help me?

You havent told us what version of rancid nor from where you retrieved it. If its not 3.7, please start there. If it already is, but it is a ubuntu package, please try an install from source.

>
> Kind regards,
> Lauri
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss@shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: Error when trying to back up a JunOS device, SRX100 [ In reply to ]
I've had no problems with our lonely SRX100b, in any versions of RANCID 3.x, up to and including 3.7.
The SRX is running 12.1X46-D55.3

From: Rancid-discuss [mailto:rancid-discuss-bounces@shrubbery.net] On Behalf Of Heasley
Sent: March-21-18 2:15 PM
To: Lauri Haveri
Cc: Rancid-discuss@shrubbery.net
Subject: Re: [rancid] Error when trying to back up a JunOS device, SRX100



Am 21.03.2018 um 20:43 schrieb Lauri Haveri <lauri.haveri@alsocloudsolutions.fi<mailto:lauri.haveri@alsocloudsolutions.fi>>:
Hello all,


I am setting up a test enviroment on Ubuntu 16.04 before Rancid will go to a production enviroment.

Everytime I run Rancid I get the following error:

“Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/rancid/junos.pm line 135

Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/rancid/junos.pm line 140

00003-test-fw01: missed cmd(s): show configuration, show version invoke-on other-routing-engine, show system core-dumps, show version detail

00003-test-fw01: End of run not foud

# Error: TIMEOUT reached”



When I go the the part that the log (/usr/share/perl5/rancid/junos.pm) tells me, the part is following:



“$rval = {$commands{$cmd}}{$INPUT, $OUTPUT, $cmd};

delete($commands{$cmd});

if {$rval == -1} { // this is the line 135

$clean_run = 0;

last TOP;

}

if (/>\s*quit/){ // this is line 140

$clean_run=1;

last;

}”

The command I am using to run Rancid is:
“sudo su -c /var/lib/rancid/bin/rancid-run -s /bin/bash -l rancid”

Could you please help me?

You havent told us what version of rancid nor from where you retrieved it. If its not 3.7, please start there. If it already is, but it is a ubuntu package, please try an install from source.



Kind regards,
Lauri
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net<mailto:Rancid-discuss@shrubbery.net>
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: Error when trying to back up a JunOS device, SRX100 [ In reply to ]
Hello again and thanks for the answers!

My device happens to be SRX100b and version of the Rancid is 3.3.

I got from “apt-get install rancid cvs”

Kind regards,
Lauri


From: Emille Blanc <emille@abccommunications.com>
Sent: torstai 22. maaliskuuta 2018 2.13
To: Heasley <heas@shrubbery.net>; Lauri Haveri <lauri.haveri@alsocloudsolutions.fi>
Cc: Rancid-discuss@shrubbery.net
Subject: RE: [rancid] Error when trying to back up a JunOS device, SRX100

I've had no problems with our lonely SRX100b, in any versions of RANCID 3.x, up to and including 3.7.
The SRX is running 12.1X46-D55.3

From: Rancid-discuss [mailto:rancid-discuss-bounces@shrubbery.net] On Behalf Of Heasley
Sent: March-21-18 2:15 PM
To: Lauri Haveri
Cc: Rancid-discuss@shrubbery.net
Subject: Re: [rancid] Error when trying to back up a JunOS device, SRX100



Am 21.03.2018 um 20:43 schrieb Lauri Haveri <lauri.haveri@alsocloudsolutions.fi<mailto:lauri.haveri@alsocloudsolutions.fi>>:
Hello all,


I am setting up a test enviroment on Ubuntu 16.04 before Rancid will go to a production enviroment.

Everytime I run Rancid I get the following error:

“Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/rancid/junos.pm line 135

Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/rancid/junos.pm line 140

00003-test-fw01: missed cmd(s): show configuration, show version invoke-on other-routing-engine, show system core-dumps, show version detail

00003-test-fw01: End of run not foud

# Error: TIMEOUT reached”



When I go the the part that the log (/usr/share/perl5/rancid/junos.pm) tells me, the part is following:



“$rval = {$commands{$cmd}}{$INPUT, $OUTPUT, $cmd};

delete($commands{$cmd});

if {$rval == -1} { // this is the line 135

$clean_run = 0;

last TOP;

}

if (/>\s*quit/){ // this is line 140

$clean_run=1;

last;

}”

The command I am using to run Rancid is:
“sudo su -c /var/lib/rancid/bin/rancid-run -s /bin/bash -l rancid”

Could you please help me?

You havent told us what version of rancid nor from where you retrieved it. If its not 3.7, please start there. If it already is, but it is a ubuntu package, please try an install from source.


Kind regards,
Lauri
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net<mailto:Rancid-discuss@shrubbery.net>
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: Error when trying to back up a JunOS device, SRX100 [ In reply to ]
Thu, Mar 22, 2018 at 04:02:43PM +0000, Lauri Haveri:
> Hello again and thanks for the answers!
>
> My device happens to be SRX100b and version of the Rancid is 3.3.
>
> I got from “apt-get install rancid cvs”

Please install rancid 3/7. It is available here:
ftp://ftp.shrubbery.net/pub/ranciD

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: Error when trying to back up a JunOS device, SRX100 [ In reply to ]
It's highly unlikely that this is your problem, but this command has a
whole lot of extra shell startup redundancy in it:

“sudo su -c /var/lib/rancid/bin/rancid-run -s /bin/bash -l rancid”

You can skip using sudo to call su, sudo can do that, and you don't need
to call bash again either.

This should do it for you:

sudo -u rancid -Hl /var/lib/rancid/bin/rancid-run



On 3/22/2018 12:02 PM, Lauri Haveri wrote:
>
> Hello again and thanks for the answers!
>
>  
>
> My device happens to be SRX100b and version of the Rancid is 3.3.
>
> I got from “apt-get install rancid cvs”
>
>  
>
> Kind regards,
> Lauri
>
>  
>
>  
>
> *From:*Emille Blanc <emille@abccommunications.com>
> *Sent:* torstai 22. maaliskuuta 2018 2.13
> *To:* Heasley <heas@shrubbery.net>; Lauri Haveri
> <lauri.haveri@alsocloudsolutions.fi>
> *Cc:* Rancid-discuss@shrubbery.net
> *Subject:* RE: [rancid] Error when trying to back up a JunOS device,
> SRX100
>
>  
>
> I've had no problems with our lonely SRX100b, in any versions of
> RANCID 3.x, up to and including 3.7.
>
> The SRX is running 12.1X46-D55.3
>
>  
>
> *From:*Rancid-discuss [mailto:rancid-discuss-bounces@shrubbery.net]
> *On Behalf Of *Heasley
> *Sent:* March-21-18 2:15 PM
> *To:* Lauri Haveri
> *Cc:* Rancid-discuss@shrubbery.net
> *Subject:* Re: [rancid] Error when trying to back up a JunOS device,
> SRX100
>
>  
>
>  
>
>
> Am 21.03.2018 um 20:43 schrieb Lauri Haveri
> <lauri.haveri@alsocloudsolutions.fi
> <mailto:lauri.haveri@alsocloudsolutions.fi>>:
>
> Hello all,
>
>  
>
> I am setting up a test enviroment on Ubuntu 16.04 before Rancid
> will go to a production enviroment.
>
> Everytime I run Rancid I get the following error:
>
> “Use of uninitialized value $_ in pattern match (m//) at
> /usr/share/perl5/rancid/junos.pm line 135
>
> Use of uninitialized value $_ in pattern match (m//) at
> /usr/share/perl5/rancid/junos.pm line 140
>
> 00003-test-fw01: missed cmd(s): show configuration, show version
> invoke-on other-routing-engine, show system core-dumps, show
> version detail
>
> 00003-test-fw01: End of run not foud
>
> # Error: TIMEOUT reached”
>
>  
>
> When I go the the part that the log
> (/usr/share/perl5/rancid/junos.pm) tells me, the part is following:
>
>  
>
> “$rval = {$commands{$cmd}}{$INPUT, $OUTPUT, $cmd};
>
> delete($commands{$cmd});
>
> if {$rval == -1} {                                // this is the
> line 135
>
>                $clean_run = 0;
>
>                last TOP;
>
> }
>
> if (/>\s*quit/){                                  // this is line 140
>
> $clean_run=1;
>
> last;
>
> }”
>
>
> The command I am using to run Rancid is:
> “sudo su -c /var/lib/rancid/bin/rancid-run -s /bin/bash -l rancid”
>
> Could you please help me?
>
>  
>
> You havent told us what version of rancid nor from where you retrieved
> it. If its not 3.7, please start there. If it already is, but it is a
> ubuntu package, please try an install from source. 
>
>  
>
>  
>
> Kind regards,
> Lauri
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss@shrubbery.net <mailto:Rancid-discuss@shrubbery.net>
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>
>
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss@shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss

--
Doug Hughes
Keystone NAP
Fairless Hills, PA
1.844.KEYBLOCK (539.2562)
Re: Error when trying to back up a JunOS device, SRX100 [ In reply to ]
It's highly unlikely that this is your problem, but this command has a
whole lot of extra shell startup redundancy in it:

“sudo su -c /var/lib/rancid/bin/rancid-run -s /bin/bash -l rancid”

You can skip using sudo to call su, sudo can do that, and you don't need
to call bash again either.

This should do it for you:

sudo -u rancid -Hl /var/lib/rancid/bin/rancid-run



On 3/22/2018 12:02 PM, Lauri Haveri wrote:
>
> Hello again and thanks for the answers!
>
>  
>
> My device happens to be SRX100b and version of the Rancid is 3.3.
>
> I got from “apt-get install rancid cvs”
>
>  
>
> Kind regards,
> Lauri
>
>  
>
>  
>
> *From:*Emille Blanc <emille@abccommunications.com>
> *Sent:* torstai 22. maaliskuuta 2018 2.13
> *To:* Heasley <heas@shrubbery.net>; Lauri Haveri
> <lauri.haveri@alsocloudsolutions.fi>
> *Cc:* Rancid-discuss@shrubbery.net
> *Subject:* RE: [rancid] Error when trying to back up a JunOS device,
> SRX100
>
>  
>
> I've had no problems with our lonely SRX100b, in any versions of
> RANCID 3.x, up to and including 3.7.
>
> The SRX is running 12.1X46-D55.3
>
>  
>
> *From:*Rancid-discuss [mailto:rancid-discuss-bounces@shrubbery.net]
> *On Behalf Of *Heasley
> *Sent:* March-21-18 2:15 PM
> *To:* Lauri Haveri
> *Cc:* Rancid-discuss@shrubbery.net
> *Subject:* Re: [rancid] Error when trying to back up a JunOS device,
> SRX100
>
>  
>
>  
>
>
> Am 21.03.2018 um 20:43 schrieb Lauri Haveri
> <lauri.haveri@alsocloudsolutions.fi
> <mailto:lauri.haveri@alsocloudsolutions.fi>>:
>
> Hello all,
>
>  
>
> I am setting up a test enviroment on Ubuntu 16.04 before Rancid
> will go to a production enviroment.
>
> Everytime I run Rancid I get the following error:
>
> “Use of uninitialized value $_ in pattern match (m//) at
> /usr/share/perl5/rancid/junos.pm line 135
>
> Use of uninitialized value $_ in pattern match (m//) at
> /usr/share/perl5/rancid/junos.pm line 140
>
> 00003-test-fw01: missed cmd(s): show configuration, show version
> invoke-on other-routing-engine, show system core-dumps, show
> version detail
>
> 00003-test-fw01: End of run not foud
>
> # Error: TIMEOUT reached”
>
>  
>
> When I go the the part that the log
> (/usr/share/perl5/rancid/junos.pm) tells me, the part is following:
>
>  
>
> “$rval = {$commands{$cmd}}{$INPUT, $OUTPUT, $cmd};
>
> delete($commands{$cmd});
>
> if {$rval == -1} {                                // this is the
> line 135
>
>                $clean_run = 0;
>
>                last TOP;
>
> }
>
> if (/>\s*quit/){                                  // this is line 140
>
> $clean_run=1;
>
> last;
>
> }”
>
>
> The command I am using to run Rancid is:
> “sudo su -c /var/lib/rancid/bin/rancid-run -s /bin/bash -l rancid”
>
> Could you please help me?
>
>  
>
> You havent told us what version of rancid nor from where you retrieved
> it. If its not 3.7, please start there. If it already is, but it is a
> ubuntu package, please try an install from source. 
>
>  
>
>  
>
> Kind regards,
> Lauri
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss@shrubbery.net <mailto:Rancid-discuss@shrubbery.net>
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>
>
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss@shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss

--
Doug Hughes
Keystone NAP
Fairless Hills, PA
1.844.KEYBLOCK (539.2562)
Re: Error when trying to back up a JunOS device, SRX100 [ In reply to ]
Hello,

I just wanted to tell that little over one week ago I was able to fix this error by using an account that had admin-rights. The ones I used previously were root-account and read-only account.

Now the same problem is facing me with a “HP procurve 2510”. I have assigned an account with manager-rights and configured it to .cloginrc file. I am able to login to the HP Switch by using command “/var/lib/rancid/bin/clogin DEVICENAME”

Do you have any idea if there are any special things to be considered in HP Switches?

Best regards,
Lauri
From: Emille Blanc <emille@abccommunications.com>
Sent: torstai 22. maaliskuuta 2018 2.13
To: Heasley <heas@shrubbery.net>; Lauri Haveri <lauri.haveri@alsocloudsolutions.fi>
Cc: Rancid-discuss@shrubbery.net
Subject: RE: [rancid] Error when trying to back up a JunOS device, SRX100

I've had no problems with our lonely SRX100b, in any versions of RANCID 3.x, up to and including 3.7.
The SRX is running 12.1X46-D55.3

From: Rancid-discuss [mailto:rancid-discuss-bounces@shrubbery.net] On Behalf Of Heasley
Sent: March-21-18 2:15 PM
To: Lauri Haveri
Cc: Rancid-discuss@shrubbery.net
Subject: Re: [rancid] Error when trying to back up a JunOS device, SRX100



Am 21.03.2018 um 20:43 schrieb Lauri Haveri <lauri.haveri@alsocloudsolutions.fi<mailto:lauri.haveri@alsocloudsolutions.fi>>:
Hello all,


I am setting up a test enviroment on Ubuntu 16.04 before Rancid will go to a production enviroment.

Everytime I run Rancid I get the following error:

“Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/rancid/junos.pm line 135

Use of uninitialized value $_ in pattern match (m//) at /usr/share/perl5/rancid/junos.pm line 140

00003-test-fw01: missed cmd(s): show configuration, show version invoke-on other-routing-engine, show system core-dumps, show version detail

00003-test-fw01: End of run not foud

# Error: TIMEOUT reached”



When I go the the part that the log (/usr/share/perl5/rancid/junos.pm) tells me, the part is following:



“$rval = {$commands{$cmd}}{$INPUT, $OUTPUT, $cmd};

delete($commands{$cmd});

if {$rval == -1} { // this is the line 135

$clean_run = 0;

last TOP;

}

if (/>\s*quit/){ // this is line 140

$clean_run=1;

last;

}”

The command I am using to run Rancid is:
“sudo su -c /var/lib/rancid/bin/rancid-run -s /bin/bash -l rancid”

Could you please help me?

You havent told us what version of rancid nor from where you retrieved it. If its not 3.7, please start there. If it already is, but it is a ubuntu package, please try an install from source.


Kind regards,
Lauri
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net<mailto:Rancid-discuss@shrubbery.net>
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: Error when trying to back up a JunOS device, SRX100 [ In reply to ]
Sat, Apr 21, 2018 at 10:48:42AM +0000, Lauri Haveri:
> Hello,
>
> I just wanted to tell that little over one week ago I was able to fix this error by using an account that had admin-rights. The ones I used previously were root-account and read-only account.

the root account typically receives a unix prompt, which the scripts do not
expect.

> Now the same problem is facing me with a “HP procurve 2510”. I have assigned an account with manager-rights and configured it to .cloginrc file. I am able to login to the HP Switch by using command “/var/lib/rancid/bin/clogin DEVICENAME”
>
> Do you have any idea if there are any special things to be considered in HP Switches?

rancid -t hp -C hostname

will give you the complete command that rancid will run; use that for testing.
Also, see the FAQ section 3 qestion 2.

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: Error when trying to back up a JunOS device, SRX100 [ In reply to ]
Thank you for the fast reply.

Where should the command "rancid" be executed?

I have logged in as the users "rancid" and "root" have ran the command "rancid -t hp -C DEVICENAME" in the folder ("/var/lib/rancid/bin/") that has the executable file "rancid", but it just produces "rancid: command not found".

I also typed the whole path to command "/var/lib/rancid/bin/rancid -t hp -C hostname" I just get the following output: "hlogin -t 90 -c '' DEVICENAME.

Am I doing it wrong?

BR,
Lauri

-----Original Message-----
From: Heasley <heas@shrubbery.net>
Sent: lauantai 21. huhtikuuta 2018 18.44
To: Lauri Haveri <lauri.haveri@alsocloudsolutions.fi>
Cc: Emille Blanc <emille@abccommunications.com>; Rancid-discuss@shrubbery.net
Subject: Re: [rancid] Error when trying to back up a JunOS device, SRX100

Sat, Apr 21, 2018 at 10:48:42AM +0000, Lauri Haveri:
> Hello,
>
> I just wanted to tell that little over one week ago I was able to fix this error by using an account that had admin-rights. The ones I used previously were root-account and read-only account.

the root account typically receives a unix prompt, which the scripts do not expect.

> Now the same problem is facing me with a “HP procurve 2510”. I have assigned an account with manager-rights and configured it to .cloginrc file. I am able to login to the HP Switch by using command “/var/lib/rancid/bin/clogin DEVICENAME”
>
> Do you have any idea if there are any special things to be considered in HP Switches?

rancid -t hp -C hostname

will give you the complete command that rancid will run; use that for testing.
Also, see the FAQ section 3 qestion 2.
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: Error when trying to back up a JunOS device, SRX100 [ In reply to ]
Wed, Apr 25, 2018 at 03:28:03PM +0000, Lauri Haveri:
> Thank you for the fast reply.
>
> Where should the command "rancid" be executed?
>
> I have logged in as the users "rancid" and "root" have ran the command "rancid -t hp -C DEVICENAME" in the folder ("/var/lib/rancid/bin/") that has the executable file "rancid", but it just produces "rancid: command not found".
>
> I also typed the whole path to command "/var/lib/rancid/bin/rancid -t hp -C hostname" I just get the following output: "hlogin -t 90 -c '' DEVICENAME.
>
> Am I doing it wrong?

Sorry; thats my fault; hp still uses the rancid 2.x method; so,
hrancid -C hostname.

> BR,
> Lauri
>
> -----Original Message-----
> From: Heasley <heas@shrubbery.net>
> Sent: lauantai 21. huhtikuuta 2018 18.44
> To: Lauri Haveri <lauri.haveri@alsocloudsolutions.fi>
> Cc: Emille Blanc <emille@abccommunications.com>; Rancid-discuss@shrubbery.net
> Subject: Re: [rancid] Error when trying to back up a JunOS device, SRX100
>
> Sat, Apr 21, 2018 at 10:48:42AM +0000, Lauri Haveri:
> > Hello,
> >
> > I just wanted to tell that little over one week ago I was able to fix this error by using an account that had admin-rights. The ones I used previously were root-account and read-only account.
>
> the root account typically receives a unix prompt, which the scripts do not expect.
>
> > Now the same problem is facing me with a “HP procurve 2510”. I have assigned an account with manager-rights and configured it to .cloginrc file. I am able to login to the HP Switch by using command “/var/lib/rancid/bin/clogin DEVICENAME”
> >
> > Do you have any idea if there are any special things to be considered in HP Switches?
>
> rancid -t hp -C hostname
>
> will give you the complete command that rancid will run; use that for testing.
> Also, see the FAQ section 3 qestion 2.

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