Discussion:
[rancid] Rancid-Run works great but cron doesn't.
Wesley Brown
2014-11-17 23:21:37 UTC
Permalink
Oh great rancid discussion list hear my plea,

I have been beating my head against this problem for the last full day. If I go run /usr/local/rancid/bin/rancid-run, everything runs smooth. My rancid logs state all routers reached. However When cron runs it fails to connect to any router. All routers in this Rancid server are Juniper. Here are some of the log entries from a cron run.

Trying to get all of the configs.
Removed Switch Name: missed cmd(s): show chassis hardware detail
Removed Switch Name: missed cmd(s): show chassis feb detail,show chassis firmware,show system boot-messages,show chassis fpc detail,show chassis hardware detail,show chassis routing-engine,show chassis environment,show system core-dumps$
Removed Switch Name: missed cmd(s): show system boot-messages,show chassis hardware detail,show chassis routing-engine
Removed Switch Name: missed cmd(s): show chassis sfm detail,show chassis feb detail,show chassis hardware detail,show system boot-messages,show chassis environment,show chassis fpc detail,show chassis routing-engine
Removed Switch Name: missed cmd(s): show chassis ssb,show chassis sfm detail,show chassis feb,show chassis scb,show system license,show chassis fpc detail,show chassis alarms,show version detail,show chassis firmware,show chassis $
Removed Switch Name: End of run not found
#
Removed Switch Name: missed cmd(s): show chassis environment,show chassis routing-engine,show chassis hardware detail,show chassis fpc detail,show system boot-messages,show chassis feb detail,show chassis sfm detail,show system core-dump$
Removed Switch Name: missed cmd(s): show chassis firmware,show chassis environment,show chassis routing-engine,show chassis fpc detail,show chassis hardware detail,show chassis feb detail,show chassis sfm detail,show system core-dumps,sh$
Removed Switch Name: missed cmd(s): show chassis hardware detail
Removed Switch Name: missed cmd(s): show chassis routing-engine,show chassis hardware detail
Removed Switch Name: missed cmd(s): show chassis routing-engine,show chassis hardware detail,show system boot-messages
Removed Switch Name: missed cmd(s): show chassis routing-engine,show chassis hardware detail,show system boot-messages
Removed Switch Name: missed cmd(s): show chassis hardware detail
Removed Switch Name: missed cmd(s): show chassis clocks,show chassis sfm detail,show system core-dumps,show chassis feb detail,show chassis ssb,show chassis fpc detail,show system license,show chassis routing-engine,show chassis fe$
Removed Switch Name: End of run not found
#


If I run:
./jlogin -t 120 -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” Removed Switch Name

Everything works great.


If I run:
./jrancid -d Removed Switch Name

I get:
executing echo jlogin -t 120 -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" Removed Switch Name
executing echo jlogin -t 120 -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" Removed Switch Name
sh: 1: jlogin: not found
Removed Switch Name: missed cmd(s): show configuration,show chassis firmware,show chassis alarms,show chassis environment,show chassis feb,show chassis fpc detail,show chassis scb,show chassis routing-engine,show chassis sfm detail,show chassis cfeb,show chassis ssb,show version detail,show chassis hardware detail,show system core-dumps,show chassis clocks,show system boot-messages,show chassis feb detail,show system license
Removed Switch Name: missed cmd(s): show configuration,show chassis firmware,show chassis alarms,show chassis environment,show chassis feb,show chassis fpc detail,show chassis scb,show chassis routing-engine,show chassis sfm detail,show chassis cfeb,show chassis ssb,show version detail,show chassis hardware detail,show system core-dumps,show chassis clocks,show system boot-messages,show chassis feb detail,show system license
Removed Switch Name: End of run not found
Removed Switch Name: End of run not found
#


Running: env NOPIPE=YES PATH=${PATH}:/usr/local/rancid/bin/ jrancid -d Removed Switch Name

Gives me:
executing echo jlogin -t 120 -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" Removed Switch Name
executing echo jlogin -t 120 -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" Removed Switch Name
PROMPT MATCH: ***@Removed Switch Name>
HIT COMMAND:***@Removed Switch Name> show chassis clocks
In ShowChassisClocks: ***@Removed Switch Name> show chassis clocks
HIT COMMAND:***@Removed Switch Name> show chassis environment
In ShowChassisEnvironment: ***@Removed Switch Name> show chassis environment
HIT COMMAND:***@Removed Switch Name> show chassis firmware
In ShowChassisFirmware: ***@Removed Switch Name> show chassis firmware
HIT COMMAND:***@Removed Switch Name> show chassis fpc detail
In ShowChassisFpcDetail: ***@Removed Switch Name> show chassis fpc detail
HIT COMMAND:***@Removed Switch Name> show chassis hardware detail
In ShowChassisHardware: ***@Removed Switch Name> show chassis hardware detail
HIT COMMAND:***@Removed Switch Name> show chassis routing-engine
In ShowChassisRoutingEngine: ***@Removed Switch Name> show chassis routing-engine
HIT COMMAND:***@Removed Switch Name> show chassis scb
In ShowChassisSCB: ***@Removed Switch Name> show chassis scb
HIT COMMAND:***@Removed Switch Name> show chassis sfm detail
In ShowChassisSCB: ***@Removed Switch Name> show chassis sfm detail
HIT COMMAND:***@Removed Switch Name> show chassis ssb
In ShowChassisSCB: ***@Removed Switch Name> show chassis ssb
HIT COMMAND:***@Removed Switch Name> show chassis feb detail
In ShowChassisSCB: ***@Removed Switch Name> show chassis feb detail
HIT COMMAND:***@Removed Switch Name> show chassis feb
In ShowChassisSCB: ***@Removed Switch Name> show chassis feb
HIT COMMAND:***@Removed Switch Name> show chassis cfeb
In ShowChassisSCB: ***@Removed Switch Name> show chassis cfeb
HIT COMMAND:***@Removed Switch Name> show chassis alarms
In ShowChassisAlarms: ***@Removed Switch Name> show chassis alarms
HIT COMMAND:***@Removed Switch Name> show system license
In ShowSystemLicense: ***@Removed Switch Name> show system license
HIT COMMAND:***@Removed Switch Name> show system boot-messages
In ShowSystemBootMessages: ***@Removed Switch Name> show system boot-messages
HIT COMMAND:***@Removed Switch Name> show system core-dumps
In ShowSystemCoreDumps: ***@Removed Switch Name> show system core-dumps
HIT COMMAND:***@Removed Switch Name> show version detail
In ShowVersion: ***@Removed Switch Name> show version detail
HIT COMMAND:***@Removed Switch Name> show configuration
In ShowConfiguration: ***@Removed Switch Name> show configuration


Im pretty new at working a rancid server, and have been looking around trying to figure out what is going on and how to fix it. Can you please help?
Lee
2014-11-18 04:49:10 UTC
Permalink
Post by Wesley Brown
When cron runs it fails to connect to any router.
Probably because cron doesn't set up the full environment; I made a
wrapper that I start via cron:
$ cat rancidRun.sh
#!/bin/sh
# call rancid with all my doodads
#
# just in case I run it interactively
# clear all the debug envars
unset DEBUG
unset SHOWWARN
unset NOPIPE

if [ -z "$ALLDEV" ]; then
# my .bashrc hasn't been called yet
source ${HOME}/.bashrc
fi

rancid-run $*

Regards,
Lee
Post by Wesley Brown
Oh great rancid discussion list hear my plea,
I have been beating my head against this problem for the last full day. If I
go run /usr/local/rancid/bin/rancid-run, everything runs smooth. My rancid
logs state all routers reached. However When cron runs it fails to connect
to any router. All routers in this Rancid server are Juniper. Here are some
of the log entries from a cron run.
Trying to get all of the configs.
Removed Switch Name: missed cmd(s): show chassis hardware detail
Removed Switch Name: missed cmd(s): show chassis feb detail,show chassis
firmware,show system boot-messages,show chassis fpc detail,show chassis
hardware detail,show chassis routing-engine,show chassis environment,show
system core-dumps$
Removed Switch Name: missed cmd(s): show system boot-messages,show chassis
hardware detail,show chassis routing-engine
Removed Switch Name: missed cmd(s): show chassis sfm detail,show chassis feb
detail,show chassis hardware detail,show system boot-messages,show chassis
environment,show chassis fpc detail,show chassis routing-engine
Removed Switch Name: missed cmd(s): show chassis ssb,show chassis sfm
detail,show chassis feb,show chassis scb,show system license,show chassis
fpc detail,show chassis alarms,show version detail,show chassis
firmware,show chassis $
Removed Switch Name: End of run not found
#
Removed Switch Name: missed cmd(s): show chassis environment,show chassis
routing-engine,show chassis hardware detail,show chassis fpc detail,show
system boot-messages,show chassis feb detail,show chassis sfm detail,show
system core-dump$
Removed Switch Name: missed cmd(s): show chassis firmware,show chassis
environment,show chassis routing-engine,show chassis fpc detail,show chassis
hardware detail,show chassis feb detail,show chassis sfm detail,show system
core-dumps,sh$
Removed Switch Name: missed cmd(s): show chassis hardware detail
Removed Switch Name: missed cmd(s): show chassis routing-engine,show chassis
hardware detail
Removed Switch Name: missed cmd(s): show chassis routing-engine,show chassis
hardware detail,show system boot-messages
Removed Switch Name: missed cmd(s): show chassis routing-engine,show chassis
hardware detail,show system boot-messages
Removed Switch Name: missed cmd(s): show chassis hardware detail
Removed Switch Name: missed cmd(s): show chassis clocks,show chassis sfm
detail,show system core-dumps,show chassis feb detail,show chassis ssb,show
chassis fpc detail,show system license,show chassis routing-engine,show
chassis fe$
Removed Switch Name: End of run not found
#
./jlogin -t 120 -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" Removed Switch Name
Everything works great.
./jrancid -d Removed Switch Name
executing echo jlogin -t 120 -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"
Removed Switch Name
executing echo jlogin -t 120 -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"
Removed Switch Name
sh: 1: jlogin: not found
Removed Switch Name: missed cmd(s): show configuration,show chassis
firmware,show chassis alarms,show chassis environment,show chassis feb,show
chassis fpc detail,show chassis scb,show chassis routing-engine,show chassis
sfm detail,show chassis cfeb,show chassis ssb,show version detail,show
chassis hardware detail,show system core-dumps,show chassis clocks,show
system boot-messages,show chassis feb detail,show system license
Removed Switch Name: missed cmd(s): show configuration,show chassis
firmware,show chassis alarms,show chassis environment,show chassis feb,show
chassis fpc detail,show chassis scb,show chassis routing-engine,show chassis
sfm detail,show chassis cfeb,show chassis ssb,show version detail,show
chassis hardware detail,show system core-dumps,show chassis clocks,show
system boot-messages,show chassis feb detail,show system license
Removed Switch Name: End of run not found
Removed Switch Name: End of run not found
#
Running: env NOPIPE=YES PATH=${PATH}:/usr/local/rancid/bin/ jrancid -d Removed Switch Name
executing echo jlogin -t 120 -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"
Removed Switch Name
executing echo jlogin -t 120 -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"
Removed Switch Name
Im pretty new at working a rancid server, and have been looking around
trying to figure out what is going on and how to fix it. Can you please
help?
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Loading...