[rancid] hlogin timing out

Jim P jabbyjim at gmail.com
Fri Jun 12 12:25:31 UTC 2015


It didn't seem to help, but I see what you are saying. Here is where I
ended up. I'm going to mess with the switch settings and see if that helps
some

------------------------------------------------------------------------------------------------------

[rancid at localhost bin]$ ./hlogin -d -noenable -c "show run" 10.10.0.99
10.10.0.99
spawn hpuifilter -- telnet 10.10.0.99
parent: waiting for sync byte
parent: telling child to go ahead
parent: now unsynchronized from child
spawn: returns {8433}
Gate keeper glob pattern for '(Connection refused|Secure connection [^
]+ refused|Connection closed by)' is ''. Not usable, disabling the
performance booster.
Gate keeper glob pattern for '(Host key not found |The authenticity of host
.* be established).* \(yes/no\)\?.
Gate keeper glob pattern for 'HOST IDENTIFICATION HAS CHANGED.*
\(yes/no\)\?' is 'HOST IDENTIFICATION HAS CHA.
Gate keeper glob pattern for 'HOST IDENTIFICATION HAS CHANGED[^
]+' is 'HOST IDENTIFICATION HAS CHANGED*'. Activating booster.
Gate keeper glob pattern for 'Offending key for .* \(yes/no\)\?' is
'Offending key for * (yes/no)\?'. Activat.
Gate keeper glob pattern for 'Enter passphrase.*: ' is 'Enter passphrase*:
'. Activating booster.
Gate keeper glob pattern for '([Uu]sername|[Ll]ogin|user name|Login Name):'
is ''. Not usable, disabling the .
Gate keeper glob pattern for '([Pp]assword|passwd):' is ''. Not usable,
disabling the performance booster.

expect: does "" (spawn_id exp4) match glob pattern "Press any key to
continue"? no
"Enter switch number to connect to or <CR>:"? no
"(Connection refused|Secure connection [^\n\r]+ refused|Connection closed
by)"? (No Gate, RE only) gate=yes ro
"Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established).*
\(yes/no\)\?"? (No Gate, RE only) gate=yeo
"HOST IDENTIFICATION HAS CHANGED.* \(yes/no\)\?"? Gate "HOST IDENTIFICATION
HAS CHANGED* (yes/no)\?"? gate=no
"HOST IDENTIFICATION HAS CHANGED[^\n\r]+"? Gate "HOST IDENTIFICATION HAS
CHANGED*"? gate=no
"Offending key for .* \(yes/no\)\?"? Gate "Offending key for * (yes/no)\?"?
gate=no

expect: does "" (spawn_id exp4) match glob pattern "unknown host\r"? no

expect: does "" (spawn_id exp4) match regular expression "Enter
passphrase.*: "? Gate "Enter passphrase*: "? o
"([Uu]sername|[Ll]ogin|user name|Login Name):"? (No Gate, RE only) gate=yes
re=no
"([Pp]assword|passwd):"? (No Gate, RE only) gate=yes re=no
">"? no
"denied"? no
"% Bad passwords"? no
Trying 10.10.0.99...
Connected to 10.10.0.99.
Escape character is '^]'.
ProCurve J4899B Switch 2650
Software revision H.10.115

Copyright (C) 1991-2014 Hewlett-Packard Co.  All Rights Reserved.

                           RESTRICTED RIGHTS LEGEND

 Use, duplication, or disclosure by the Government is subject to
restrictions
 as set forth in subdivision (b) (3) (ii) of the Rights in Technical Data
and
 Computer Software clause at 52.227-7013.

         HEWLETT-PACKARD COMPANY, 3000 Hanover St., Palo Alto, CA 94303

Press any key to continue
expect: does "Trying 10.10.0.99...\r\r\r\nConnected to
10.10.0.99.\r\r\r\nEscape character is '^]'.\r\r\r\nPrs
expect: set expect_out(0,string) "Press any key to continue"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) "Trying 10.10.0.99...\r\r\r\nConnected to
10.10.0.99.\r\r\r\nEscape character "
send: sending " " to { exp4 }
expect: continuing expect

expect: does "" (spawn_id exp4) match glob pattern "Press any key to
continue"? no
"Enter switch number to connect to or <CR>:"? no
"(Connection refused|Secure connection [^\n\r]+ refused|Connection closed
by)"? (No Gate, RE only) gate=yes ro
"Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established).*
\(yes/no\)\?"? (No Gate, RE only) gate=yeo
"HOST IDENTIFICATION HAS CHANGED.* \(yes/no\)\?"? Gate "HOST IDENTIFICATION
HAS CHANGED* (yes/no)\?"? gate=no
"HOST IDENTIFICATION HAS CHANGED[^\n\r]+"? Gate "HOST IDENTIFICATION HAS
CHANGED*"? gate=no
"Offending key for .* \(yes/no\)\?"? Gate "Offending key for * (yes/no)\?"?
gate=no

expect: does "" (spawn_id exp4) match glob pattern "unknown host\r"? no

expect: does "" (spawn_id exp4) match regular expression "Enter
passphrase.*: "? Gate "Enter passphrase*: "? o
"([Uu]sername|[Ll]ogin|user name|Login Name):"? (No Gate, RE only) gate=yes
re=no
"([Pp]assword|passwd):"? (No Gate, RE only) gate=yes re=no
">"? no
"denied"? no
"% Bad passwords"? no
Password:
expect: does "Password: " (spawn_id exp4) match glob pattern "Press any key
to continue"? no
"Enter switch number to connect to or <CR>:"? no
"(Connection refused|Secure connection [^\n\r]+ refused|Connection closed
by)"? (No Gate, RE only) gate=yes ro
"Host is unreachable"? no
"No address associated with name"? no
"(Host key not found |The authenticity of host .* be established).*
\(yes/no\)\?"? (No Gate, RE only) gate=yeo
"HOST IDENTIFICATION HAS CHANGED.* \(yes/no\)\?"? Gate "HOST IDENTIFICATION
HAS CHANGED* (yes/no)\?"? gate=no
"HOST IDENTIFICATION HAS CHANGED[^\n\r]+"? Gate "HOST IDENTIFICATION HAS
CHANGED*"? gate=no
"Offending key for .* \(yes/no\)\?"? Gate "Offending key for * (yes/no)\?"?
gate=no

expect: does "Password: " (spawn_id exp4) match glob pattern "unknown
host\r"? no

expect: does "Password: " (spawn_id exp4) match regular expression "Enter
passphrase.*: "? Gate "Enter passpho
"([Uu]sername|[Ll]ogin|user name|Login Name):"? (No Gate, RE only) gate=yes
re=no
"([Pp]assword|passwd):"? (No Gate, RE only) gate=yes re=yes
expect: set expect_out(0,string) "Password:"
expect: set expect_out(1,string) "Password"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) "Password:"
send: sending "TESTPASS\r" to { exp4 }
Gate keeper glob pattern for '[Pp]assword:' is '?assword:'. Activating
booster.

expect: does " " (spawn_id exp4) match glob pattern "Press any key to
continue"? no
"[Pp]assword:"? Gate "?assword:"? gate=no
">"? no

TEST-SWITCH99#
expect: does " \r\r\n\rTEST-SWITCH99# " (spawn_id exp4) match glob pattern
"Press any key to continue"? no
"[Pp]assword:"? Gate "?assword:"? gate=no
">"? no
expect: timed out

Error: TIMEOUT reached
------------------------------------------------------------------------------------------------------


On Thu, Jun 11, 2015 at 5:09 PM, Michael Newton <mnewton at pofp.com> wrote:

> Here’s what my debug output looks like, where you get the hang. You’re
> correct, you are logged in, the different order for telnet vs ssh doesn’t
> cause any problems. For some reason your system is checking for > instead
> of #. Do you have noenable active on this device? For testing, you can try
> adding -noenable to the hlogin command.
>
> expect: does "" (spawn_id exp4) match glob pattern "Press any key to
> continue"? no
>
> "[Pp]assword:"? Gate "?assword:"? gate=no
>
> "#"? no
>
> Switch75-SW1D.FL15.RM1#
>
> expect: does "Switch75-SW1D.FL15.RM1# " (spawn_id exp4) match glob pattern
> "Press any key to continue"? no
>
> "[Pp]assword:"? Gate "?assword:"? gate=no
>
> "#"? yes
>
> expect: set expect_out(0,string) "#"
>
> expect: set expect_out(spawn_id) "exp4"
>
> expect: set expect_out(buffer) "Switch75-SW1D.FL15.RM1#"
>
> send: sending "\r" to { exp4 }
>
> Gate keeper glob pattern for '[
>
> ]+' is ''. Not usable, disabling the performance booster.
>
> Gate keeper glob pattern for '^.+#' is '*#'. Activating booster.
>
>
> --
>
> Michael Newton
> Director, Product Development
> Point of Presence Technologies
> *You manage your business. We’ll manage your network.*
> 206-1110 Government Street, Victoria BC  V8W 1Y2
> T: 250-412-6688 x 7040 | F: 484-731-9837
>
> mnewton at pofp.com | www.pofp.com
>
> From: Jim P
> Date: Thursday, June 11, 2015 at 1:51 PM
> To: Todd Heide
> Cc: Michael Newton, "rancid-discuss at shrubbery.net"
> Subject: Re: [rancid] hlogin timing out
>
> thanks for the help... I feel like I'm being a nuisance now! I'm getting
> used to this mailing list in how it works, so excuse the duplicates.
>
> here's the full debug below. TEST-SWITCH99 is the name of my switch.. but
> I am accessing it via IP
>
> here is the interesting part with my HP's. Logging in via telnet asks for
> you to "push any key" then it asks for a password.
> logging on as SSH asks you for name then password, then asks you to "push
> any key"
>
> It "seems" that the script logs in .. because it is actually giving me the
> switch TEST-SWITCH99 name which wouldn't show until after I log in but I'm
> guessing that's a problem.
>
> Is there a way to force hlogin to do ssh instead of telnet? maybe that
> would work? It definitely feels confused.
>
>
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> [rancid at localhost bin]$ ./hlogin -d -c "show ver" 10.10.0.99
> 10.10.0.99
> spawn hpuifilter -- telnet 10.10.0.99
> parent: waiting for sync byte
> parent: telling child to go ahead
> parent: now unsynchronized from child
> spawn: returns {6671}
> Gate keeper glob pattern for '(Connection refused|Secure connection [^
> ]+ refused|Connection closed by)' is ''. Not usable, disabling the
> performance booster.
> Gate keeper glob pattern for '(Host key not found |The authenticity of
> host .* be established).* \(yes/no\)\?.
> Gate keeper glob pattern for 'HOST IDENTIFICATION HAS CHANGED.*
> \(yes/no\)\?' is 'HOST IDENTIFICATION HAS CHA.
> Gate keeper glob pattern for 'HOST IDENTIFICATION HAS CHANGED[^
> ]+' is 'HOST IDENTIFICATION HAS CHANGED*'. Activating booster.
> Gate keeper glob pattern for 'Offending key for .* \(yes/no\)\?' is
> 'Offending key for * (yes/no)\?'. Activat.
> Gate keeper glob pattern for 'Enter passphrase.*: ' is 'Enter passphrase*:
> '. Activating booster.
> Gate keeper glob pattern for '([Uu]sername|[Ll]ogin|user name|Login
> Name):' is ''. Not usable, disabling the .
> Gate keeper glob pattern for '([Pp]assword|passwd):' is ''. Not usable,
> disabling the performance booster.
>
> expect: does "" (spawn_id exp4) match glob pattern "Press any key to
> continue"? no
> "Enter switch number to connect to or <CR>:"? no
> "(Connection refused|Secure connection [^\n\r]+ refused|Connection closed
> by)"? (No Gate, RE only) gate=yes ro
> "Host is unreachable"? no
> "No address associated with name"? no
> "(Host key not found |The authenticity of host .* be established).*
> \(yes/no\)\?"? (No Gate, RE only) gate=yeo
> "HOST IDENTIFICATION HAS CHANGED.* \(yes/no\)\?"? Gate "HOST
> IDENTIFICATION HAS CHANGED* (yes/no)\?"? gate=no
> "HOST IDENTIFICATION HAS CHANGED[^\n\r]+"? Gate "HOST IDENTIFICATION HAS
> CHANGED*"? gate=no
> "Offending key for .* \(yes/no\)\?"? Gate "Offending key for *
> (yes/no)\?"? gate=no
>
> expect: does "" (spawn_id exp4) match glob pattern "unknown host\r"? no
>
> expect: does "" (spawn_id exp4) match regular expression "Enter
> passphrase.*: "? Gate "Enter passphrase*: "? o
> "([Uu]sername|[Ll]ogin|user name|Login Name):"? (No Gate, RE only)
> gate=yes re=no
> "([Pp]assword|passwd):"? (No Gate, RE only) gate=yes re=no
> ">"? no
> "denied"? no
> "% Bad passwords"? no
> Trying 10.10.0.99...
> Connected to 10.10.0.99.
> Escape character is '^]'.
> ProCurve J4899B Switch 2650
> Software revision H.10.115
>
> Copyright (C) 1991-2014 Hewlett-Packard Co.  All Rights Reserved.
>
>                            RESTRICTED RIGHTS LEGEND
>
>  Use, duplication, or disclosure by the Government is subject to
> restrictions
>  as set forth in subdivision (b) (3) (ii) of the Rights in Technical Data
> and
>  Computer Software clause at 52.227-7013.
>
>          HEWLETT-PACKARD COMPANY, 3000 Hanover St., Palo Alto, CA 94303
>
> Press any key to continue
> expect: does "Trying 10.10.0.99...\r\r\r\nConnected to
> 10.10.0.99.\r\r\r\nEscape character is '^]'.\r\r\r\nPrs
> expect: set expect_out(0,string) "Press any key to continue"
> expect: set expect_out(spawn_id) "exp4"
> expect: set expect_out(buffer) "Trying 10.10.0.99...\r\r\r\nConnected to
> 10.10.0.99.\r\r\r\nEscape character "
> send: sending " " to { exp4 }
> expect: continuing expect
>
> expect: does "" (spawn_id exp4) match glob pattern "Press any key to
> continue"? no
> "Enter switch number to connect to or <CR>:"? no
> "(Connection refused|Secure connection [^\n\r]+ refused|Connection closed
> by)"? (No Gate, RE only) gate=yes ro
> "Host is unreachable"? no
> "No address associated with name"? no
> "(Host key not found |The authenticity of host .* be established).*
> \(yes/no\)\?"? (No Gate, RE only) gate=yeo
> "HOST IDENTIFICATION HAS CHANGED.* \(yes/no\)\?"? Gate "HOST
> IDENTIFICATION HAS CHANGED* (yes/no)\?"? gate=no
> "HOST IDENTIFICATION HAS CHANGED[^\n\r]+"? Gate "HOST IDENTIFICATION HAS
> CHANGED*"? gate=no
> "Offending key for .* \(yes/no\)\?"? Gate "Offending key for *
> (yes/no)\?"? gate=no
>
> expect: does "" (spawn_id exp4) match glob pattern "unknown host\r"? no
>
> expect: does "" (spawn_id exp4) match regular expression "Enter
> passphrase.*: "? Gate "Enter passphrase*: "? o
> "([Uu]sername|[Ll]ogin|user name|Login Name):"? (No Gate, RE only)
> gate=yes re=no
> "([Pp]assword|passwd):"? (No Gate, RE only) gate=yes re=no
> ">"? no
> "denied"? no
> "% Bad passwords"? no
> Password:
> expect: does "Password: " (spawn_id exp4) match glob pattern "Press any
> key to continue"? no
> "Enter switch number to connect to or <CR>:"? no
> "(Connection refused|Secure connection [^\n\r]+ refused|Connection closed
> by)"? (No Gate, RE only) gate=yes ro
> "Host is unreachable"? no
> "No address associated with name"? no
> "(Host key not found |The authenticity of host .* be established).*
> \(yes/no\)\?"? (No Gate, RE only) gate=yeo
> "HOST IDENTIFICATION HAS CHANGED.* \(yes/no\)\?"? Gate "HOST
> IDENTIFICATION HAS CHANGED* (yes/no)\?"? gate=no
> "HOST IDENTIFICATION HAS CHANGED[^\n\r]+"? Gate "HOST IDENTIFICATION HAS
> CHANGED*"? gate=no
> "Offending key for .* \(yes/no\)\?"? Gate "Offending key for *
> (yes/no)\?"? gate=no
>
> expect: does "Password: " (spawn_id exp4) match glob pattern "unknown
> host\r"? no
>
> expect: does "Password: " (spawn_id exp4) match regular expression "Enter
> passphrase.*: "? Gate "Enter passpho
> "([Uu]sername|[Ll]ogin|user name|Login Name):"? (No Gate, RE only)
> gate=yes re=no
> "([Pp]assword|passwd):"? (No Gate, RE only) gate=yes re=yes
> expect: set expect_out(0,string) "Password:"
> expect: set expect_out(1,string) "Password"
> expect: set expect_out(spawn_id) "exp4"
> expect: set expect_out(buffer) "Password:"
> send: sending "3nd3rw1gg1n\r" to { exp4 }
> Gate keeper glob pattern for '[Pp]assword:' is '?assword:'. Activating
> booster.
>
> expect: does " " (spawn_id exp4) match glob pattern "Press any key to
> continue"? no
> "[Pp]assword:"? Gate "?assword:"? gate=no
> ">"? no
>
> TEST-SWITCH99#
> expect: does " \r\r\n\rTEST-SWITCH99# " (spawn_id exp4) match glob pattern
> "Press any key to continue"? no
> "[Pp]assword:"? Gate "?assword:"? gate=no
> ">"? no
> expect: timed out
>
> Error: TIMEOUT reached
>
>
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> On Thu, Jun 11, 2015 at 3:59 PM, Todd Heide <workwithcisco at yahoo.com>
> wrote:
>
>> What is debug telling you?  When you run debug it will output what Rancid
>> is doing when it logs in, maybe you can see the errors the HP is putting
>> out.
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20150612/944a91bd/attachment.html>


More information about the Rancid-discuss mailing list