Discussion:
[rancid] Issues getting Rancid to Back up the Juniper MX960.
Rowe, William
2009-06-01 14:36:30 UTC
Permalink
Has anyone else encountered issues backing up the Juniper MX960 with
Rancid.

Any insight is appreciated.


Bill
Elliott, Andrew
2009-06-01 16:39:16 UTC
Permalink
I think we were able to find the problem.



The routers have very large configurations and when I ran jlogin
manually, I saw that it was timing out about 90% of the way through the
configuration output. The point at which it timed out varied slightly
every time I ran it.



To correct the issue, I added compression to ssh to get the data-rate to
slow down a bit:



stlrvrpol0> grep "\-C" jlogin

-C* {

if [ catch {spawn $sshcmd -C -c $cyphertype -x -l $user
-i $identfile $router} reason ] {

if [ catch {spawn $sshcmd -C -c $cyphertype -x -l $user
$router} reason ] {

stlrvrpol0>



-andrew



From: rancid-discuss-***@shrubbery.net
[mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Rowe, William
Sent: Monday, June 01, 2009 10:37 AM
To: rancid-***@shrubbery.net
Subject: [rancid] Issues getting Rancid to Back up the Juniper MX960.



Has anyone else encountered issues backing up the Juniper MX960 with
Rancid.

Any insight is appreciated.



Bill
john heasley
2009-06-01 17:05:48 UTC
Permalink
Post by Elliott, Andrew
I think we were able to find the problem.
The routers have very large configurations and when I ran jlogin
manually, I saw that it was timing out about 90% of the way through the
configuration output. The point at which it timed out varied slightly
every time I ran it.
I think you have some other problem and this fix is going to fail in the
future/randomly.

What do you mean by 'timed out'? did it hang? did jlogin/expect exit with a
timeout error? if you run the command manually,
NOPIPE=YES; export NOPIPE
jlogin -c 'show version;...' host
what is at the end of the host.raw file?
Post by Elliott, Andrew
To correct the issue, I added compression to ssh to get the data-rate to
stlrvrpol0> grep "\-C" jlogin
-C* {
if [ catch {spawn $sshcmd -C -c $cyphertype -x -l $user
-i $identfile $router} reason ] {
if [ catch {spawn $sshcmd -C -c $cyphertype -x -l $user
$router} reason ] {
stlrvrpol0>
-andrew
Sent: Monday, June 01, 2009 10:37 AM
Subject: [rancid] Issues getting Rancid to Back up the Juniper MX960.
Has anyone else encountered issues backing up the Juniper MX960 with
Rancid.
Any insight is appreciated.
Bill
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Elliott, Andrew
2009-06-01 17:16:55 UTC
Permalink
---
Andrew Elliott
XO Communications
desk: 989.758.6987
cell: 989.213.5794
-----Original Message-----
Sent: Monday, June 01, 2009 1:06 PM
To: Elliott, Andrew
Subject: Re: [rancid] Re: Issues getting Rancid to Back up the
JuniperMX960.
Post by Elliott, Andrew
I think we were able to find the problem.
The routers have very large configurations and when I ran jlogin
manually, I saw that it was timing out about 90% of the way through
the
Post by Elliott, Andrew
configuration output. The point at which it timed out varied
slightly
Post by Elliott, Andrew
every time I ran it.
I think you have some other problem and this fix is going to fail in the
future/randomly.
What do you mean by 'timed out'? did it hang? did jlogin/expect exit with a
timeout error? if you run the command manually,
NOPIPE=YES; export NOPIPE
jlogin -c 'show version;...' host
what is at the end of the host.raw file?
Jlogin just hangs until it times out.

The log shows the following for each of the routers that are failing(I
changed the router name):

cp: cannot access rtr1.city-st.raw
rtr1.city-st jlogin error: Error: TIMEOUT reached
rtr1.city-st: End of run not found
Post by Elliott, Andrew
To correct the issue, I added compression to ssh to get the
data-rate
to
Post by Elliott, Andrew
stlrvrpol0> grep "\-C" jlogin
-C* {
if [ catch {spawn $sshcmd -C -c $cyphertype -x -l
$user
Post by Elliott, Andrew
-i $identfile $router} reason ] {
if [ catch {spawn $sshcmd -C -c $cyphertype -x -l
$user
Post by Elliott, Andrew
$router} reason ] {
stlrvrpol0>
-andrew
William
Post by Elliott, Andrew
Sent: Monday, June 01, 2009 10:37 AM
Subject: [rancid] Issues getting Rancid to Back up the Juniper MX960.
Has anyone else encountered issues backing up the Juniper MX960 with
Rancid.
Any insight is appreciated.
Bill
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
john heasley
2009-06-01 17:43:55 UTC
Permalink
Post by Elliott, Andrew
---
Andrew Elliott
XO Communications
desk: 989.758.6987
cell: 989.213.5794
-----Original Message-----
Sent: Monday, June 01, 2009 1:06 PM
To: Elliott, Andrew
Subject: Re: [rancid] Re: Issues getting Rancid to Back up the
JuniperMX960.
Post by Elliott, Andrew
I think we were able to find the problem.
The routers have very large configurations and when I ran jlogin
manually, I saw that it was timing out about 90% of the way through
the
Post by Elliott, Andrew
configuration output. The point at which it timed out varied
slightly
Post by Elliott, Andrew
every time I ran it.
I think you have some other problem and this fix is going to fail in the
future/randomly.
What do you mean by 'timed out'? did it hang? did jlogin/expect exit with a
timeout error? if you run the command manually,
NOPIPE=YES; export NOPIPE
jlogin -c 'show version;...' host
what is at the end of the host.raw file?
Jlogin just hangs until it times out.
The log shows the following for each of the routers that are failing(I
Are you using Linux or Solaris and haven't applied the expect patch
available on the rancid website?

Have you tried the cmdline?
NOPIPE=YES; export NOPIPE
jlogin -c 'show chassis clocks;show chassis environment;show chassis firmware;show chassis fpc detail;show chassis hardware detail;show chassis routing-engine;show chassis scb;show chassis sfm detail;show chassis ssb;show chassis feb detail;show chassis feb;show chassis cfeb;show chassis alarms;show system license;show system boot-messages;show system core-dumps;show version detail;show configuration' host

and if that fails jlogin -d -c ....
Post by Elliott, Andrew
cp: cannot access rtr1.city-st.raw
rtr1.city-st jlogin error: Error: TIMEOUT reached
rtr1.city-st: End of run not found
Post by Elliott, Andrew
To correct the issue, I added compression to ssh to get the
data-rate
to
Post by Elliott, Andrew
stlrvrpol0> grep "\-C" jlogin
-C* {
if [ catch {spawn $sshcmd -C -c $cyphertype -x -l
$user
Post by Elliott, Andrew
-i $identfile $router} reason ] {
if [ catch {spawn $sshcmd -C -c $cyphertype -x -l
$user
Post by Elliott, Andrew
$router} reason ] {
stlrvrpol0>
-andrew
William
Post by Elliott, Andrew
Sent: Monday, June 01, 2009 10:37 AM
Subject: [rancid] Issues getting Rancid to Back up the Juniper
MX960.
Post by Elliott, Andrew
Has anyone else encountered issues backing up the Juniper MX960 with
Rancid.
Any insight is appreciated.
Bill
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Elliott, Andrew
2009-06-01 18:39:24 UTC
Permalink
Post by Elliott, Andrew
Post by Elliott, Andrew
-----Original Message-----
Sent: Monday, June 01, 2009 1:06 PM
To: Elliott, Andrew
Subject: Re: [rancid] Re: Issues getting Rancid to Back up the
JuniperMX960.
Post by Elliott, Andrew
I think we were able to find the problem.
The routers have very large configurations and when I ran jlogin
manually, I saw that it was timing out about 90% of the way
through
Post by Elliott, Andrew
the
Post by Elliott, Andrew
configuration output. The point at which it timed out varied
slightly
Post by Elliott, Andrew
every time I ran it.
I think you have some other problem and this fix is going to fail
in
Post by Elliott, Andrew
the
future/randomly.
What do you mean by 'timed out'? did it hang? did jlogin/expect
exit
Post by Elliott, Andrew
with a
timeout error? if you run the command manually,
NOPIPE=YES; export NOPIPE
jlogin -c 'show version;...' host
what is at the end of the host.raw file?
Jlogin just hangs until it times out.
The log shows the following for each of the routers that are
failing(I
Are you using Linux or Solaris and haven't applied the expect patch
available on the rancid website?
Have you tried the cmdline?
NOPIPE=YES; export NOPIPE
jlogin -c 'show chassis clocks;show chassis environment;show chassis
firmware;show chassis fpc detail;show chassis hardware detail;show
chassis routing-engine;show chassis scb;show chassis sfm detail;show
chassis ssb;show chassis feb detail;show chassis feb;show chassis
cfeb;show chassis alarms;show system license;show system boot-
messages;show system core-dumps;show version detail;show
configuration'
Post by Elliott, Andrew
host
and if that fails jlogin -d -c ....
Yes, I have been running it from the command line.

The -d switch is failing for me:

stlrvrpol0> ./jlogin -d -c 'show chassis clocks;show chassis
environment;show chassis firmware;show chassis fpc detail;show chassis
hardware detail;show chassis routing-engine;show chassis scb;show
chassis sfm detail;show chassis ssb;show chassis feb;show chassis
cfeb;show chassis alarms;show system boot-messages;show version
detail;show configuration' rtr1.city-st


Error: Unknown argument! -d
Usage: ./jlogin [-c command] [-Evar=x] [-f cloginrc-file] [-p
user-password] [-r passphrase] [-s script-file] [-u username] [-t
timeout] [-x command-file] [-y ssh_cypher_type] router [router...]
stlrvrpol0>


stlrvrpol0> uname -a
SunOS stlrvrpol0 5.8 Generic_117350-43 sun4u sparc SUNW,Ultra-Enterprise
stlrvrpol0> expect -v
expect version 5.31.5
stlrvrpol0> ssh -V
OpenSSH_4.7p1, OpenSSL 0.9.8e 23 Feb 2007
stlrvrpol0>

Due to specific restrictions within the organization, I will have an
extremely difficult time getting approval for the patched version of
expect to be compiled. Is the issue still present in 5.43? I would
have a much easier time getting the expect upgraded to the latest
official version than getting a patched one installed.
Post by Elliott, Andrew
Post by Elliott, Andrew
cp: cannot access rtr1.city-st.raw
rtr1.city-st jlogin error: Error: TIMEOUT reached
rtr1.city-st: End of run not found
Post by Elliott, Andrew
To correct the issue, I added compression to ssh to get the
data-rate
to
Post by Elliott, Andrew
stlrvrpol0> grep "\-C" jlogin
-C* {
if [ catch {spawn $sshcmd -C -c $cyphertype -x -l
$user
Post by Elliott, Andrew
-i $identfile $router} reason ] {
if [ catch {spawn $sshcmd -C -c $cyphertype -x -l
$user
Post by Elliott, Andrew
$router} reason ] {
stlrvrpol0>
-andrew
William
Post by Elliott, Andrew
Sent: Monday, June 01, 2009 10:37 AM
Subject: [rancid] Issues getting Rancid to Back up the Juniper
MX960.
Post by Elliott, Andrew
Has anyone else encountered issues backing up the Juniper MX960
with
Post by Elliott, Andrew
Post by Elliott, Andrew
Rancid.
Any insight is appreciated.
Bill
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
john heasley
2009-06-01 20:16:59 UTC
Permalink
Post by Elliott, Andrew
Yes, I have been running it from the command line.
What is the ending contents of the host.raw file?
Post by Elliott, Andrew
stlrvrpol0> ./jlogin -d -c 'show chassis clocks;show chassis
environment;show chassis firmware;show chassis fpc detail;show chassis
hardware detail;show chassis routing-engine;show chassis scb;show
chassis sfm detail;show chassis ssb;show chassis feb;show chassis
cfeb;show chassis alarms;show system boot-messages;show version
detail;show configuration' rtr1.city-st
Error: Unknown argument! -d
This option was added around rancid 2.3.2a7; you should upgrade to
2.3.2. in the meantime, expect -d jlogin ... will do the same thing.
the output around the hang/timeout has to be examined.
Post by Elliott, Andrew
Usage: ./jlogin [-c command] [-Evar=x] [-f cloginrc-file] [-p
user-password] [-r passphrase] [-s script-file] [-u username] [-t
timeout] [-x command-file] [-y ssh_cypher_type] router [router...]
stlrvrpol0>
stlrvrpol0> uname -a
SunOS stlrvrpol0 5.8 Generic_117350-43 sun4u sparc SUNW,Ultra-Enterprise
stlrvrpol0> expect -v
expect version 5.31.5
stlrvrpol0> ssh -V
OpenSSH_4.7p1, OpenSSL 0.9.8e 23 Feb 2007
stlrvrpol0>
Due to specific restrictions within the organization, I will have an
extremely difficult time getting approval for the patched version of
expect to be compiled. Is the issue still present in 5.43? I would
have a much easier time getting the expect upgraded to the latest
official version than getting a patched one installed.
afaik, the problem has never been fixed in expect (really tcl). you
could install it in/under ~ranciduser's homedir and adjust PATH in
rancid.conf to avoid dealing with your IT dept.
Post by Elliott, Andrew
Post by Elliott, Andrew
cp: cannot access rtr1.city-st.raw
rtr1.city-st jlogin error: Error: TIMEOUT reached
rtr1.city-st: End of run not found
Post by Elliott, Andrew
Post by Elliott, Andrew
To correct the issue, I added compression to ssh to get the
data-rate
Post by Elliott, Andrew
to
Post by Elliott, Andrew
stlrvrpol0> grep "\-C" jlogin
-C* {
if [ catch {spawn $sshcmd -C -c $cyphertype -x
-l
Post by Elliott, Andrew
Post by Elliott, Andrew
$user
Post by Elliott, Andrew
-i $identfile $router} reason ] {
if [ catch {spawn $sshcmd -C -c $cyphertype -x
-l
Post by Elliott, Andrew
Post by Elliott, Andrew
$user
Post by Elliott, Andrew
$router} reason ] {
stlrvrpol0>
-andrew
William
Post by Elliott, Andrew
Sent: Monday, June 01, 2009 10:37 AM
Subject: [rancid] Issues getting Rancid to Back up the Juniper
MX960.
Post by Elliott, Andrew
Post by Elliott, Andrew
Has anyone else encountered issues backing up the Juniper MX960
with
Post by Elliott, Andrew
Post by Elliott, Andrew
Post by Elliott, Andrew
Rancid.
Any insight is appreciated.
Bill
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
john heasley
2009-06-01 17:01:43 UTC
Permalink
Post by Rowe, William
Has anyone else encountered issues backing up the Juniper MX960 with
Rancid.
I haven't seen any complaints. i don't have an mx, but its junos so should
it should just work.

Please folks; when you solicit help with a problem, include information
about the problem, not just "it doesn't work." You should indicate your
host O/S and rancid revision and a description of the problem at a minimum.
You should also have looked at the log file for the group that is failing
and include any error messages.
Loading...