Discussion:
[rancid] hlogin timing out
Jim P
2015-06-11 15:49:47 UTC
Permalink
I have narrowed down my recent issues to that I really believe I'm having
an HP specific issue. Its driving me bonkers and I hope I'm not doing the
same for the mailing list.

trying to run this off of a test HP 2650

When I run this:

./clogin -c "show ver" 10.10.0.99
------------------------------------------------------------------------------
[***@localhost bin]$ ./clogin -c "show ver" 10.10.0.99
10.10.0.99
spawn telnet 10.10.0.99
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
Password:

TEST-SWITCH99#
TEST-SWITCH99# terminal length 0
Invalid input: 0
TEST-SWITCH99#
Error: TIMEOUT reached
---------------------------------------------------------------------------------

it does much better than if I do the following (which just sort of locks up
the screen)

---------------------------------------------------------------------------------
./hlogin -c "show ver" 10.10.0.99

10.10.0.99
spawn hpuifilter -- telnet 10.10.0.99
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 continuePassword:
TEST-SWITCH99# --> (IT HANGS HERE until it eventually times out)
Error: TIMEOUT reached
---------------------------------------------------------------------------------
Michael Newton
2015-06-11 18:26:10 UTC
Permalink
Jim, I don’t have much insight aside from passing the –d flag to hlogin which will give you a lot of debugging.

My reason for replying is just to let you know that we are successfully backing up HP 2600-8, 2626, and 2650 switches, and with much older firmware revisions on some of them (e.g. H.10.31.) We’re running rancid 3.1, and have not seen any issues with timeouts like this.


--

Michael Newton
Director, Product Development
Point of Presence Technologies


From: Rancid-discuss on behalf of Jim P
Date: Thursday, June 11, 2015 at 8:49 AM
To: "rancid-***@shrubbery.net"
Subject: [rancid] hlogin timing out

I have narrowed down my recent issues to that I really believe I'm having an HP specific issue. Its driving me bonkers and I hope I'm not doing the same for the mailing list.

trying to run this off of a test HP 2650

When I run this:

./clogin -c "show ver" 10.10.0.99
------------------------------------------------------------------------------
[***@localhost bin]$ ./clogin -c "show ver" 10.10.0.99
10.10.0.99
spawn telnet 10.10.0.99
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
Password:

TEST-SWITCH99#
TEST-SWITCH99# terminal length 0
Invalid input: 0
TEST-SWITCH99#
Error: TIMEOUT reached
---------------------------------------------------------------------------------

it does much better than if I do the following (which just sort of locks up the screen)

---------------------------------------------------------------------------------
./hlogin -c "show ver" 10.10.0.99

10.10.0.99
spawn hpuifilter -- telnet 10.10.0.99
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 continuePassword:
TEST-SWITCH99# --> (IT HANGS HERE until it eventually times out)
Error: TIMEOUT reached
---------------------------------------------------------------------------------
Jim P
2015-06-11 19:18:48 UTC
Permalink
that is good news and good advice, thank you. Its a pretty hard read but it
pretty much feels like rancid gets lost after it logs in? I upgraded to
Rancid 3.2, but it didn't help :(

[***@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 {6380}

--- SNIP ---

expect: does "Password: " (spawn_id exp4) match regular expression "Enter
passphrase.*: "? Gate "Enter passphrase*: "? gate=no
"([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

------------------------
Post by Michael Newton
Jim, I don’t have much insight aside from passing the –d flag to hlogin
which will give you a lot of debugging.
My reason for replying is just to let you know that we are successfully
backing up HP 2600-8, 2626, and 2650 switches, and with much older firmware
revisions on some of them (e.g. H.10.31.) We’re running rancid 3.1, and
have not seen any issues with timeouts like this.
--
Michael Newton
Director, Product Development
Point of Presence Technologies
From: Rancid-discuss on behalf of Jim P
Date: Thursday, June 11, 2015 at 8:49 AM
Subject: [rancid] hlogin timing out
I have narrowed down my recent issues to that I really believe I'm having
an HP specific issue. Its driving me bonkers and I hope I'm not doing the
same for the mailing list.
trying to run this off of a test HP 2650
./clogin -c "show ver" 10.10.0.99
------------------------------------------------------------------------------
10.10.0.99
spawn telnet 10.10.0.99
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
TEST-SWITCH99#
TEST-SWITCH99# terminal length 0
Invalid input: 0
TEST-SWITCH99#
Error: TIMEOUT reached
---------------------------------------------------------------------------------
it does much better than if I do the following (which just sort of locks up the screen)
---------------------------------------------------------------------------------
./hlogin -c "show ver" 10.10.0.99
10.10.0.99
spawn hpuifilter -- telnet 10.10.0.99
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
TEST-SWITCH99# --> (IT HANGS HERE until it eventually times out)
Error: TIMEOUT reached
---------------------------------------------------------------------------------
Todd Heide
2015-06-11 19:59:49 UTC
Permalink
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.
________________________________
Sent: Thursday, June 11, 2015 2:18 PM
Subject: Re: [rancid] hlogin timing out
that is good news and good advice, thank you. Its a pretty hard read but it pretty much feels like rancid gets lost after it logs in? I upgraded to Rancid 3.2, but it didn't help :(
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 {6380}
--- SNIP ---
expect: does "Password: " (spawn_id exp4) match regular expression "Enter passphrase.*: "? Gate "Enter passphrase*: "? gate=no
"([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
------------------------
Jim, I don’t have much insight aside from passing the –d flag to hlogin which will give you a lot of debugging.
My reason for replying is just to let you know that we are successfully backing up HP 2600-8, 2626, and 2650 switches, and with much older firmware revisions on some of them (e.g. H.10.31.) We’re running rancid 3.1, and have not seen any issues with timeouts like this.
--
Michael Newton
Director, Product Development
Point of Presence Technologies
From: Rancid-discuss on behalf of Jim P
Date: Thursday, June 11, 2015 at 8:49 AM
Subject: [rancid] hlogin timing out
I have narrowed down my recent issues to that I really believe I'm having an HP specific issue. Its driving me bonkers and I hope I'm not doing the same for the mailing list.
trying to run this off of a test HP 2650
./clogin -c "show ver" 10.10.0.99
------------------------------------------------------------------------------
10.10.0.99
spawn telnet 10.10.0.99
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
TEST-SWITCH99#
TEST-SWITCH99# terminal length 0
Invalid input: 0
TEST-SWITCH99#
Error: TIMEOUT reached
---------------------------------------------------------------------------------
it does much better than if I do the following (which just sort of locks up the screen)
---------------------------------------------------------------------------------
./hlogin -c "show ver" 10.10.0.99
10.10.0.99
spawn hpuifilter -- telnet 10.10.0.99
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
TEST-SWITCH99# --> (IT HANGS HERE until it eventually times out)
Error: TIMEOUT reached
---------------------------------------------------------------------------------
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Jim P
2015-06-11 20:08:49 UTC
Permalink
Its hard to decipher, unless if I am looking at the wrong thing?

------------
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
------------
Jim P
2015-06-11 20:51:52 UTC
Permalink
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.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[***@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

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Post by Todd Heide
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.
Michael Newton
2015-06-11 21:09:32 UTC
Permalink
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

***@pofp.com | www.pofp.com


From: Jim P
Date: Thursday, June 11, 2015 at 1:51 PM
To: Todd Heide
Cc: Michael Newton, "rancid-***@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.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[***@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 <***@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.
Jim P
2015-06-12 12:25:31 UTC
Permalink
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

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

[***@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
------------------------------------------------------------------------------------------------------
Post by Michael Newton
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
From: Jim P
Date: Thursday, June 11, 2015 at 1:51 PM
To: Todd Heide
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.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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.
'. 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
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
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Post by Todd Heide
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.
Jim P
2015-06-12 13:29:53 UTC
Permalink
Interesting discovery!
So I found out that this works on on HP's that are stacked (which is kind
of confusing). I only have two stacks and in a list of like 70 HP switches.
Theya re the only two that played nicely with RANCID.
It appears that RANCID is expecting something like this after logging in,
or perhaps a symbol?

-------------------------------
Stack Members

SN MAC Address System Name Device Type Status
-- ------------- ---------------- ---------------------
-------------------------
0 016b8-d12240 SWITCH15 ProCurve 2900-48G Commander Up
1 016b8-d1a2c0 SWITCH13 ProCurve 2900-48G Member Up

Enter switch number to connect to or <CR>:
-------------------------------

so I'm unsure what to do now, other than change the script (somehow). Has
anyone done this?
Alex DEKKER
2015-06-11 20:19:08 UTC
Permalink
On 11/06/15 20:18, Jim P wrote:

...
Post by Jim P
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
Is TEST-SWITCH99 your switch's name? It seems to me that RANCID is
expecting a login prompt but your switch doesn't require logging in. If
you telnet to the switch, do you land straight in the CLI without a
login prompt?

alexd
heasley
2015-06-11 22:42:09 UTC
Permalink
...
Post by Jim P
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
^^^ cloginrc(5): autoenable
Hussein, Sazzad
2015-06-12 06:29:31 UTC
Permalink
*Hi Jim,*
Good day!

Sorry for my *off-topic* post. I had tried a lot & beleive that i need to
expend a little bit more time as well as concentration on it to make
working.

Like i have different sites & there are 2600, 1800, 1900, 5400, 1800 HP
Series with differnt firmware. The thing is that i need to start backing up
the configuration & report it to my manager. If you aren't lucky then it
could take more than 2-3 week to make it running through rancid.

I can suggest you a *interim solution*.
Just copy the running configuration through "scp" command.

*1800/1900/2600/5412 Switches:*
pscp -scp -l username -pw password -2 xxx.xxx.xxx.xxx:cfg/running-config
/path/filename.cfg

*3Com 5900 Series:*
pscp -scp -l username -pw password -2 xxx.xxx.xxx.xxx:startup.cfg
/path/filename.cfg

*xxx- Your switch IP address

At lease you will have all the configuration data & if you want you can do
same for firware & alarm file.

If you want this for *Juniper, Cisco & ZyXEL* please let me know. I have
done this too. It's quite easy & handy. I just put them on crontab & it's
working.
Now i have spare time for thinking about *"rancid"*.

*Happy Backup :)*
Post by Jim P
I have narrowed down my recent issues to that I really believe I'm having
an HP specific issue. Its driving me bonkers and I hope I'm not doing the
same for the mailing list.
trying to run this off of a test HP 2650
./clogin -c "show ver" 10.10.0.99
------------------------------------------------------------------------------
10.10.0.99
spawn telnet 10.10.0.99
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
TEST-SWITCH99#
TEST-SWITCH99# terminal length 0
Invalid input: 0
TEST-SWITCH99#
Error: TIMEOUT reached
---------------------------------------------------------------------------------
it does much better than if I do the following (which just sort of locks
up the screen)
---------------------------------------------------------------------------------
./hlogin -c "show ver" 10.10.0.99
10.10.0.99
spawn hpuifilter -- telnet 10.10.0.99
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
TEST-SWITCH99# --> (IT HANGS HERE until it eventually times out)
Error: TIMEOUT reached
---------------------------------------------------------------------------------
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
--
--*Sazzad Hussein*www.sazzad-hussein.branded.me | ***@gmail.com
Hermann-Ehlers Str. 2, 49082 OsnabrÃŒck, Deutschland
Mobile number: 4915214010461
Jim P
2015-06-12 12:27:56 UTC
Permalink
this is great thank you so much, this will certainly buy me time
Post by Hussein, Sazzad
*Hi Jim,*
Good day!
Sorry for my *off-topic* post. I had tried a lot & beleive that i need to
expend a little bit more time as well as concentration on it to make
working.
Like i have different sites & there are 2600, 1800, 1900, 5400, 1800 HP
Series with differnt firmware. The thing is that i need to start backing up
the configuration & report it to my manager. If you aren't lucky then it
could take more than 2-3 week to make it running through rancid.
I can suggest you a *interim solution*.
Just copy the running configuration through "scp" command.
*1800/1900/2600/5412 Switches:*
pscp -scp -l username -pw password -2 xxx.xxx.xxx.xxx:cfg/running-config
/path/filename.cfg
*3Com 5900 Series:*
pscp -scp -l username -pw password -2 xxx.xxx.xxx.xxx:startup.cfg
/path/filename.cfg
*xxx- Your switch IP address
At lease you will have all the configuration data & if you want you can do
same for firware & alarm file.
If you want this for *Juniper, Cisco & ZyXEL* please let me know. I have
done this too. It's quite easy & handy. I just put them on crontab & it's
working.
Now i have spare time for thinking about *"rancid"*.
*Happy Backup :)*
Jim P
2015-06-12 13:37:13 UTC
Permalink
so knowing that RANCID is expecting a " > " this makes sense, however when
I turn on -noenable it gets even more confusing.

why is it trying to log in as "rancid" all of a sudden? it could get in
before?

------------------------------------
[***@localhost bin]$ ./hlogin -noenable -c "show ver" 10.10.0.99
10.10.0.99
spawn hpuifilter -- telnet 10.10.0.99
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 continueUsername: rancid
Password:
Invalid password
Username: rancid
Password:
Invalid password
Username: rancid
Password:
Invalid password
Session Terminated, unable to login.

Connection closed by foreign host.
spawn hpuifilter -- ssh -c 3des -x -l rancid 10.10.0.99
***@10.10.0.99's password:
Permission denied, please try again.
***@10.10.0.99's password:
Permission denied, please try again.
***@10.10.0.99's password:
Received disconnect from 10.10.0.99: 2: Too many authentication failures
for rancid

Error: Couldn't login
----------------------------------
Jim P
2015-06-12 15:35:47 UTC
Permalink
SOLVED! (sort of). Someone may beat me with a hose for this but this is
what I did (for those curious)

Until I find the proper way to do this, I cheated and changed the hlogin
script a bit. For those curious I changed this part...

this is TOTALLY wrong, but turning -autoenable on or -noenable on simply
was not working

---------------------------------------------
# Figure out prompt.
# Since autoenable is off by default, if we have it defined, it
# was done on the command line. If it is not specifically set on the
# command line, check the password file.
if $avautoenable {
set autoenable 1
set enable 0
set prompt "#"
} else {
set ae [find autoenable $router]
if { "$ae" == "1" } {
set autoenable 1
set enable 0
set prompt "#"
} else {
set autoenable 0
set enable $avenable
set prompt ">" (switched that are
stacked indicate with <CR> at the end which triggers this)
# added this next line as a workaround
set prompt "#" (other switches hit the
SU prompt that has #, which triggers this also now)
}
}
---------------------------------------------
Alan McKinnon
2015-06-13 06:59:21 UTC
Permalink
Here's what I think you are actually dealing with:

rancid (and all it's tools) is heavily Cisco-centric. The tools are
launched in the order they need to be used on Cisco kit, and all the
checks (prompt format, end of output, etc) all assume things are done
the way Cisco does them.

This is not necessarily universally true, and leads to existing scripts
being bent to fit whatever vendor X does. In the case of ProCurves, the
amount of bending becomes excessive and usually only accommodates one
model used one way. There are other problematic vendors as well that pop
up from time to time.

To fix this, I think you need to dump the entire set of h* scripts and
start over. Fortunately, the overall design of rancid is very generic
and lends itself to plugging in your ProCurve-specific scripts which are
unrelated to Cisco ones.

It's not as difficult as it sounds, it's easier than continuing trying
to fit Cisco's square peg into HP's round hole. The first step is to
document the behaviour of ProCurves across the entire range.

I can help with the perl if you need help in that area. I can't help
with specifics of HPs, I've never even seen one in real life.
Post by Jim P
SOLVED! (sort of). Someone may beat me with a hose for this but this is
what I did (for those curious)
Until I find the proper way to do this, I cheated and changed the hlogin
script a bit. For those curious I changed this part...
this is TOTALLY wrong, but turning -autoenable on or -noenable on simply
was not working
---------------------------------------------
# Figure out prompt.
# Since autoenable is off by default, if we have it defined, it
# was done on the command line. If it is not specifically set on the
# command line, check the password file.
if $avautoenable {
set autoenable 1
set enable 0
set prompt "#"
} else {
set ae [find autoenable $router]
if { "$ae" == "1" } {
set autoenable 1
set enable 0
set prompt "#"
} else {
set autoenable 0
set enable $avenable
set prompt ">" (switched that are
stacked indicate with <CR> at the end which triggers this)
# added this next line as a workaround
set prompt "#" (other switches hit
the SU prompt that has #, which triggers this also now)
}
}
---------------------------------------------
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
--
Alan McKinnon
***@gmail.com
Jim P
2015-06-15 15:21:51 UTC
Permalink
FIXED / SOLVED

So I found out what I was doing wrong. I was using autoenable improperly in
the .cloginrc file

I had no idea that you needed to add a "1" or a "0" for it to actually
happen. It makes sense now to test with the clogin / hlogin scripts. Once I
got it working there (which everyone was telling me to do multiple times)
it was easy to take care of. Thanks for all of your help. I hope to pay it
forward soon!

Loading...