cisco hostname too long
Sotiris Tsimbonis
stsimb at irc.gr
Wed Jan 4 12:47:34 UTC 2006
Hi everyone,
Recently I faced a problem where rancid could not fetch the config of a
new router in my network. The logfile reported the following:
------------------------------------------------------------------------
couldn't compile regular expression pattern: parentheses () not balanced
while executing
"expect -nobrace -re {pcsrouter\(02\([^#>\r\n]+)?[#>](\([^)\r\n]+\))?}
{} -re {[
^M]+} { exp_continue }"
invoked from within
"expect {
-re $reprompt {}
-re "\[\n\r]+" { exp_continue }
}"
(procedure "run_commands" line 23)
invoked from within
"run_commands $prompt $command"
("foreach" body line 144)
invoked from within
"foreach router [lrange $argv $i end] {
set router [string tolower $router]
send_user "$router\n"
# Figure out prompt.
# Since autoena..."
(file "/opt/rancid/bin/clogin" line 617)^M
!
------------------------------------------------------------------------
The problem was the hostname length, which was more than 14 characters
long..
My solution was to change line 511 of clogin, and put a bigger number
instead of 14 (say, 24) ...and the problem was solved :-)
HTH,
Sotiris.
More information about the Rancid-discuss
mailing list