[rancid] FXOS debugging
Ryan West
rwest at zyedge.com
Tue Nov 27 15:55:46 UTC 2018
Hello,
I've attempted to login via fxrancid, but I'm not entirely sure where it's failing. Here is the debug when trying to run one command with fxrancid -d <device_name>
> spawn id exp0 sent <show model\r>
spawn id exp5 sent <show>
showspawn id exp5 sent < model>
modelspawn id exp5 sent <\r\n>
spawn id exp5 sent <Cisco Firepower 2130 Threat Defense\r\n>
Cisco Firepower 2130 Threat Defense
spawn id exp5 sent <\r\n>
spawn id exp5 sent <> >
>
And here it fails when trying to run the same command but with a command fxlogin -d -c 'show model' <device_name>
expect: does "> " (spawn_id exp5) match glob pattern "Login failed"? no
"% (Bad passwords|Authentication failed)"? (No Gate, RE only) gate=yes re=no
"Press any key to continue"? no
"Enter Selection: "? Gate "Enter Selection: "? gate=no
"Press the <tab> key [^\r\n]+[\r\n]+"? Gate "Press the <tab> key *"? gate=no
"@[^\r\n]+ ([Pp]assword|passwd|Enter password for [^ :]+):"? (No Gate, RE only) gate=yes re=no
"Enter passphrase.*: "? Gate "Enter passphrase*: "? gate=no
"([Uu]sername|Login|login|user name|User):"? (No Gate, RE only) gate=yes re=no
"([Pp]assword|passwd|Enter password for [^ :]+):"? (No Gate, RE only) gate=yes re=no
"^([^ >]*)(>|#)"? (No Gate, RE only) gate=yes re=yes
expect: set expect_out(0,string) ">"
expect: set expect_out(1,string) ""
expect: set expect_out(2,string) ">"
expect: set expect_out(spawn_id) "exp5"
expect: set expect_out(buffer) ">"
send: sending "show model\r" to { exp5 }
invalid command name "^-"
while executing
"^-"
invoked from within
"expect {
-re "\b+" { exp_continue }
-re "^\[^\n\r *]*$reprompt" { send_user -- "$expect_out(buffer)"
}
-re "^\[^\n\r]*$reprom..."
(procedure "run_commands" line 36)
invoked from within
"run_commands $prompt $command"
("foreach" body line 206)
invoked from within
"foreach router [lrange $argv $i end] {
set router [string tolower $router]
# attempt at platform switching.
set platform ""
send_user ..."
(file "/usr/local/rancid/bin/fxlogin" line 870)
Thanks,
-ryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20181127/5ea8f87b/attachment.html>
More information about the Rancid-discuss
mailing list