Discussion:
[rancid] Rancid Ignores autoenable for host name but not IP address
Shane Kavanagh
2009-12-04 11:39:07 UTC
Permalink
All
(are there parameters on the hostname)

I have a problem with Rancid, its ignoring autoenable (and method) for new
hostnames..

Here is running clogin manually for the IP first which works and then
Hostname which does not, also see snip from my .cloginrc

****@gbedub-rancid01:~$ clogin 10.132.50.103*
10.132.50.103
spawn telnet 10.132.50.103
Trying 10.132.50.103...
Connected to 10.132.50.103.
Escape character is '^]'.


User Access Verification

Username: shanek
Password:
GBEHP-SWH-Prd-WAD101#
GBEHP-SWH-Prd-WAD101#exit
Connection closed by foreign host.


****@gbedub-rancid01:~$ clogin GBEHP-SWH-Prd-WAD101*
gbehp-swh-prd-wad101
spawn telnet gbehp-swh-prd-wad101
Trying 10.132.50.103...
Connected to gbehp-swh-prd-wad101.GBE.local.
Escape character is '^]'.


User Access Verification

Username: shanek
Password:
GBEHP-SWH-Prd-WAD101#*
Error: TIMEOUT reached*
***@gbedub-rancid01:~$


Snip from

***@gbedub-rancid01:~$ ls -l .cloginrc
-rw-r----- 1 rancid rancid 6333 2009-12-04 11:25 .cloginrc

add method GBEHP-SWH-Prd-WAD101 telnet
# add method GBEHP-SWH-Prd-WAD101 ssh
add autoenable GBEHP-SWH-Prd-WAD101 1
add autoenable 10.132.50.103 1
add method * telnet
Sutherland, James
2009-12-04 16:35:04 UTC
Permalink
Suddenly rancid cannot talk to one of my routers. Router is a 7206,
just like many others. clogin against this router works fine. A packet
trace shows that all the data gets sent to rancid, even on write term
the routers sends it whole config and rancid sends "exit" after that.



Here is what the logs show. Anyone have any ideas?



The router that doesn't work is called "van-priv1" look for that string
in the logs below.



--log output-

starting: Fri Dec 4 08:17:39 PST 2009







Trying to get all of the configs.

write(spawn_id=4): invalid argument

while executing

"send -h "exit\r""

invoked from within

"expect -nobrace -re {^[^

^M *]*van-priv1([^#>\r\n]+)?[#>](\([^)\r\n]+\))?} {

# the Cisco CE and Jnx
ERX

# return to
non-enabled mode

..."

invoked from within

"expect {

-re "^\[^\n\r *]*$reprompt" {

# the Cisco CE and Jnx
ERX

# return to
non-enabled mode

# on exit in enabled
mode.

..."

(procedure "run_commands" line 110)

invoked from within

"run_commands $prompt $command"

("foreach" body line 152)

invoked from within

"foreach router [lrange $argv $i end] {

set router [string tolower $router]

# attempt at platform switching.

set platform ""

send_user ..."

(file "/opt/rancid/bin/clogin" line 734)

van-priv1.net.newedgenetworks.com: missed cmd(s): write term

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

Getting missed routers: round 1.

write(spawn_id=4): invalid argument

while executing

"send -h "exit\r""

invoked from within

"expect -nobrace -re {^[^

^M *]*van-priv1([^#>\r\n]+)?[#>](\([^)\r\n]+\))?} {

# the Cisco CE and Jnx
ERX

# return to
non-enabled mode

..."

invoked from within

"expect {

-re "^\[^\n\r *]*$reprompt" {

# the Cisco CE and Jnx
ERX

# return to
non-enabled mode

# on exit in enabled
mode.

..."

(procedure "run_commands" line 110)

invoked from within

"run_commands $prompt $command"

("foreach" body line 152)

invoked from within

"foreach router [lrange $argv $i end] {

set router [string tolower $router]

# attempt at platform switching.

set platform ""

send_user ..."

(file "/opt/rancid/bin/clogin" line 734)

van-priv1.net.newedgenetworks.com: missed cmd(s): write term



cvs diff: Diffing .

cvs diff: Diffing configs

cvs commit: Examining .

cvs commit: Examining configs



ending: Fri Dec 4 08:18:15 PST 2009
john heasley
2009-12-04 20:14:30 UTC
Permalink
Post by Sutherland, James
Suddenly rancid cannot talk to one of my routers. Router is a 7206,
just like many others. clogin against this router works fine. A packet
trace shows that all the data gets sent to rancid, even on write term
the routers sends it whole config and rancid sends "exit" after that.
Here is what the logs show. Anyone have any ideas?
it seems the device disconnected prematurely, before the exit command
was sent. you should be able to see that in your packet trace. you
can also use clogin -d -c 'list_the_rancid_commands' to help trace it.
also look on the device for errors, such as memory exhaustion or AAA
authorization failures.

Sutherland, James
2009-12-04 16:47:13 UTC
Permalink
Suddenly rancid cannot talk to one of my routers. Router is a 7206,
just like many others. clogin against this router works fine. A packet
trace shows that all the data gets sent to rancid, even on write term
the routers sends it whole config and rancid sends "exit" after that.



Here is what the logs show. Anyone have any ideas?



The router that doesn't work is called "van-priv1" look for that string
in the logs below.



--log output-

starting: Fri Dec 4 08:17:39 PST 2009







Trying to get all of the configs.

write(spawn_id=4): invalid argument

while executing

"send -h "exit\r""

invoked from within

"expect -nobrace -re {^[^

^M *]*van-priv1([^#>\r\n]+)?[#>](\([^)\r\n]+\))?} {

# the Cisco CE and Jnx
ERX

# return to
non-enabled mode

..."

invoked from within

"expect {

-re "^\[^\n\r *]*$reprompt" {

# the Cisco CE and Jnx
ERX

# return to
non-enabled mode

# on exit in enabled
mode.

..."

(procedure "run_commands" line 110)

invoked from within

"run_commands $prompt $command"

("foreach" body line 152)

invoked from within

"foreach router [lrange $argv $i end] {

set router [string tolower $router]

# attempt at platform switching.

set platform ""

send_user ..."

(file "/opt/rancid/bin/clogin" line 734)

van-priv1.net.newedgenetworks.com: missed cmd(s): write term

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

Getting missed routers: round 1.

write(spawn_id=4): invalid argument

while executing

"send -h "exit\r""

invoked from within

"expect -nobrace -re {^[^

^M *]*van-priv1([^#>\r\n]+)?[#>](\([^)\r\n]+\))?} {

# the Cisco CE and Jnx
ERX

# return to
non-enabled mode

..."

invoked from within

"expect {

-re "^\[^\n\r *]*$reprompt" {

# the Cisco CE and Jnx
ERX

# return to
non-enabled mode

# on exit in enabled
mode.

..."

(procedure "run_commands" line 110)

invoked from within

"run_commands $prompt $command"

("foreach" body line 152)

invoked from within

"foreach router [lrange $argv $i end] {

set router [string tolower $router]

# attempt at platform switching.

set platform ""

send_user ..."

(file "/opt/rancid/bin/clogin" line 734)

van-priv1.net.newedgenetworks.com: missed cmd(s): write term



cvs diff: Diffing .

cvs diff: Diffing configs

cvs commit: Examining .

cvs commit: Examining configs



ending: Fri Dec 4 08:18:15 PST 2009
Loading...