rancid hangs due to expect, ssh, or cisco?

Zhang, Anchi AZhang at reliant.com
Mon Dec 23 20:58:26 UTC 2002


SunOS netadmin 5.8 Generic_108528-07 sun4u sparc SUNW,UltraSPARC-IIi-cEngine
rancid-2.2.2, expect-5.38, tcl-8.4.1, tk-8.4.1
openssh-3.4p1

Rancid over telnet runs well.

Rancid over ssh hangs, clogin -c "show run" <hostname> hangs, clogin <hostname>
and then "show run" at the enable prompt also hangs.  Below is the tail portion
of clogin -c "show run" ecdc2ibgp with expect -d.  Pointers will be appreciated.

expect: does "ntp server 158.81.250.130\r\nend\r\n\r\necdc2ibgp#Received disconnect from 158.81.248.251: Time-out activated\r\n" (spawn_id exp4) match regular expression "\u0008+"? no
"^[^\n\r *]*ecdc2ibgp(\([^\r\n]+\))?#"? no
"^[^\n\r]*ecdc2ibgp(\([^\r\n]+\))?#."? no
"[\n\r]+"? yes
expect: set expect_out(0,string) "\r\n"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) "ntp server 158.81.250.130\r\n"
ntp server 158.81.250.130
expect: continuing expect

expect: does "end\r\n\r\necdc2ibgp#Received disconnect from 158.81.248.251: Time-out activated\r\n" (spawn_id exp4) match regular expression "\u0008+"? no
"^[^\n\r *]*ecdc2ibgp(\([^\r\n]+\))?#"? no
"^[^\n\r]*ecdc2ibgp(\([^\r\n]+\))?#."? no
"[\n\r]+"? yes
expect: set expect_out(0,string) "\r\n\r\n"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) "end\r\n\r\n"
end

expect: continuing expect

expect: does "ecdc2ibgp#Received disconnect from 158.81.248.251: Time-out activated\r\n" (spawn_id exp4) match regular expression "\u0008+"? no
"^[^\n\r *]*ecdc2ibgp(\([^\r\n]+\))?#"? yes
expect: set expect_out(0,string) "ecdc2ibgp#"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) "ecdc2ibgp#"
ecdc2ibgp#send: sending "exit\r" to { exp4 }

expect: does "Received disconnect from 158.81.248.251: Time-out activated\r\n" (spawn_id exp4) match glob pattern "Do you wish to save your configuration changes"? no
"\n"? yes
expect: set expect_out(0,string) "\n"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) "Received disconnect from 158.81.248.251: Time-out activated\r\n"
expect: continuing expect

expect: does "" (spawn_id exp4) match glob pattern "Do you wish to save your configuration changes"? no
"\n"? no
expect: read eof
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) ""




More information about the Rancid-discuss mailing list