Discussion:
[rancid] Working with an HP Procurve 2900-48G and 2910al-48G
Jeff B
2010-09-08 13:05:04 UTC
Permalink
Hello I'm new to rancid and I'm trying to set up these two HP Procurve Switches:

ProCurve J9050A Switch 2900-48G, revision T.13.71, ROM K.12.12
(/sw/code/build/mbm(t3a))
ProCurve J9147A 2910al-48G Switch, revision W.14.50, ROM W.14.04

I'm having several different problems which I'll describe, at first I
was unsure if I should be using hlogin or flogin but now I'm pretty
sure that I need to be using hlogin because the foundry command to
turn off paging is not understood. Ironically I get farther with
flogin than I'm able to with hlogin.

When I use hlogin I get to 2 different points depending on if I'm
using telnet or ssh to connect to it. When using telnet I get the
following error

Command:
hlogin -c "show version" hpswitch-telnet.example.com

Result:
After it sends the 'no page' command it errors on this:

===
couldn't compile regular expression pattern: parentheses () not balanced
while executing
"expect {
-re $reprompt {}
-re "\[\n\r]+" { exp_continue }
}"
(procedure "run_commands" line 9)
invoked from within
"run_commands $prompt $command"
("foreach" body line 161)
invoked from within
"foreach router [lrange $argv $i end] {
set router [string tolower $router]
send_user "$router\n"

# device timeout
set timeout [find t..."
(file "/usr/local/rancid/bin/hlogin" line 607)
===

I've tried 'fixing' the regex but I don't know enough expect to get
it. Here are the two lines of regex that populate $reprompt:

regsub -all {[)(]} $prompt {\\&} reprompt
regsub -all {^(.{1,11}).*([#>])$} $reprompt
{\1([^#>\r\n]+)?[#>](\\([^)\\r\\n]+\\))?} reprompt
expect {
-re $reprompt {}
-re "\[\n\r]+" { exp_continue }
}


When I use SSH to connect to the switch I have a problem with the
hpuifilter not working right and dropping characters so expect never
finds what it's looking for.

Command:
hlogin -c "show version" hpswitch-ssh.example.com

Result:
<ssh and banner output>
***@hpswitch-ssh.example.com's passwor :

And since it's missing the d on password expect never matches and it times out.

I've tried tinkering with the regex above and looked at hpuifilter.c
but my novice understanding of expect and the behavior of hpuifilter
wasn't able to resolve these problems. any help would be appreciated.
Thank You.

-JeffB
john heasley
2010-09-08 23:09:34 UTC
Permalink
Post by Jeff B
ProCurve J9050A Switch 2900-48G, revision T.13.71, ROM K.12.12
(/sw/code/build/mbm(t3a))
ProCurve J9147A 2910al-48G Switch, revision W.14.50, ROM W.14.04
I'm having several different problems which I'll describe, at first I
was unsure if I should be using hlogin or flogin but now I'm pretty
sure that I need to be using hlogin because the foundry command to
turn off paging is not understood. Ironically I get farther with
flogin than I'm able to with hlogin.
When I use hlogin I get to 2 different points depending on if I'm
using telnet or ssh to connect to it. When using telnet I get the
following error
hlogin -c "show version" hpswitch-telnet.example.com
...
i think that you just have an older rancid. try 2.3.5, tomorrow.
Post by Jeff B
When I use SSH to connect to the switch I have a problem with the
hpuifilter not working right and dropping characters so expect never
finds what it's looking for.
...

i think that you're using linux. i went through this with another user
a few weeks ago. there is a new and exciting libc that seems to have a
bug w/ recognizing wide characters and the jibberish coming from the hp
seems to trigger it. anyway, i think 2.3.5 will fix this for you.
Jeff B
2010-09-09 17:08:59 UTC
Permalink
2.3.5 works like a dream. I guess I just found rancid 1 week too
early. Thanks.
Post by Jeff B
ProCurve J9050A Switch 2900-48G, revision T.13.71, ROM K.12.12
(/sw/code/build/mbm(t3a))
ProCurve J9147A 2910al-48G Switch, revision W.14.50, ROM W.14.04
I'm having several different problems which I'll describe,  at first I
was unsure if I should be using hlogin or flogin but now I'm pretty
sure that I need to be using hlogin because the foundry command to
turn off paging is not understood.  Ironically I get farther with
flogin than I'm able to with hlogin.
When I use hlogin I get to 2 different points depending on if I'm
using telnet or ssh to connect to it.  When using telnet I get the
following error
 hlogin -c "show version" hpswitch-telnet.example.com
       ...
i think that you just have an older rancid.  try 2.3.5, tomorrow.
Post by Jeff B
When I use SSH to connect to the switch I have a problem with the
hpuifilter not working right and dropping characters so expect never
finds what it's looking for.
       ...
i think that you're using linux.  i went through this with another user
a few weeks ago.  there is a new and exciting libc that seems to have a
bug w/ recognizing wide characters and the jibberish coming from the hp
seems to trigger it.  anyway, i think 2.3.5 will fix this for you.
Ian Stong
2010-09-30 16:31:55 UTC
Permalink
Hi,

I am trying to get rancid v2.3.1 on freebsd to work with my HP procurve
switches using SSH. When I use clogin it logs in but hangs at the Press
any key to continue prompt. And hlogin returns an error of:

hpuifilter: execlp() failed: No such file or directory
Error: Couldn't login

Is it possible to get this working under v2.3.1 of rancid? I'm nervous
about upgrading to 2.3.5 and breaking something. Anyone have it working
with v2.3.1?

If upgrading is the only option, what is the recommended path to be able
to rollback if the upgrade doesn't go well? Is it as simple as backing
up the /home/rancid directories or are there libraries and binaries
strewn throughout the system?


Thanks in advance

Ian
john heasley
2010-09-30 18:10:07 UTC
Permalink
Post by Ian Stong
Hi,
I am trying to get rancid v2.3.1 on freebsd to work with my HP procurve
switches using SSH. When I use clogin it logs in but hangs at the Press
hpuifilter: execlp() failed: No such file or directory
Error: Couldn't login
make sure that the PATH of the shell running hlogin include the location
of hpuifilter. if its via rancid-run, make sure its in the PATH within
rancid.conf
Post by Ian Stong
Is it possible to get this working under v2.3.1 of rancid? I'm nervous
about upgrading to 2.3.5 and breaking something. Anyone have it working
with v2.3.1?
If upgrading is the only option, what is the recommended path to be able
to rollback if the upgrade doesn't go well? Is it as simple as backing
up the /home/rancid directories or are there libraries and binaries
strewn throughout the system?
i think fbsd puts rancid stuff in /usr/local/bin and /usr/local/libexec/rancid
Ian Stong
2010-10-01 17:19:30 UTC
Permalink
Hi,

Hpuifilter is in the rancid/bin directory - which is in the path of both
my shell and in the rancid.conf file. I still get the following error:

hpuifilter: execlp() failed: No such file or directory
Error: Couldn't login


Other ideas?

Ian

-----Original Message-----
From: john heasley [mailto:***@shrubbery.net]
Sent: Thursday, September 30, 2010 2:10 PM
To: Ian Stong
Cc: rancid-***@shrubbery.net
Subject: Re: [rancid] HP Procurve 2810 with rancid v2.3.1
Post by Ian Stong
Hi,
I am trying to get rancid v2.3.1 on freebsd to work with my HP
procurve
Post by Ian Stong
switches using SSH. When I use clogin it logs in but hangs at the Press
hpuifilter: execlp() failed: No such file or directory
Error: Couldn't login
make sure that the PATH of the shell running hlogin include the location
of hpuifilter. if its via rancid-run, make sure its in the PATH within
rancid.conf
Post by Ian Stong
Is it possible to get this working under v2.3.1 of rancid? I'm nervous
about upgrading to 2.3.5 and breaking something. Anyone have it working
with v2.3.1?
If upgrading is the only option, what is the recommended path to be able
to rollback if the upgrade doesn't go well? Is it as simple as backing
up the /home/rancid directories or are there libraries and binaries
strewn throughout the system?
i think fbsd puts rancid stuff in /usr/local/bin and
/usr/local/libexec/rancid

Loading...