Discussion:
[rancid] hp procurve problem - hlogin works - rancid-run fails
Klavs Klavsen
2013-06-04 14:57:33 UTC
Permalink
I am trying to backup a hp procurve 2520.

using rancid 2.3.6 (I tried updating hlogin to v2.3.8).

When running:
/usr/libexec/rancid/hlogin -c "show version;show flash;show
system-information;show system information;show module;show stack;write
term" 10.10.15.96

it seems to work fine. It logs in, runs the commands, and after a few
seconds (and a lot of output :) - it writes exit etc. and gets out just
fine.

When I then run rancid-run - I see it has spawned that exact command,
but there it appearently fails - because the log says:
Trying to get all of the configs.
10.10.15.96: End of run not found
;
=====================================
Getting missed routers: round 1.
10.10.15.96: End of run not found
;
=====================================
Getting missed routers: round 2.
10.10.15.96: End of run not found
;
=====================================
Getting missed routers: round 3.
10.10.15.96: End of run not found
;
=====================================
Getting missed routers: round 4.
10.10.15.96: End of run not found

Any ideas as to what I could do, to try to debug it?
--
Regards,
Klavs Klavsen, GSEC - ***@vsen.dk - http://www.vsen.dk - Tlf. 61281200

"Those who do not understand Unix are condemned to reinvent it, poorly."
--Henry Spencer
Klavs Klavsen
2013-06-04 17:21:55 UTC
Permalink
Post by Klavs Klavsen
I am trying to backup a hp procurve 2520.
using rancid 2.3.6 (I tried updating hlogin to v2.3.8).
are you using linux? if so, would you try the hpuifilter from 3.0a2?
Yes - I'll gladly test that.
Post by Klavs Klavsen
/usr/libexec/rancid/hlogin -c "show version;show flash;show
system-information;show system information;show module;show stack;write
term" 10.10.15.96
it seems to work fine. It logs in, runs the commands, and after a few
seconds (and a lot of output :) - it writes exit etc. and gets out just
fine.
When I then run rancid-run - I see it has spawned that exact command,
Trying to get all of the configs.
10.10.15.96: End of run not found
;
=====================================
Getting missed routers: round 1.
10.10.15.96: End of run not found
;
=====================================
Getting missed routers: round 2.
10.10.15.96: End of run not found
;
=====================================
Getting missed routers: round 3.
10.10.15.96: End of run not found
;
=====================================
Getting missed routers: round 4.
10.10.15.96: End of run not found
Any ideas as to what I could do, to try to debug it?
This is rare, a failure w/o some indication of why, but is difficult to
debug. start by trying the debugging with the PATH from rancid.conf.
Typical - rare failures.. gr8 :)

What do you mean? I don't believe there's any PATH set in rancid.conf.

I am home from work now - and it's national holiday tomorrow - but
thursday, I'll try hpuifilter 3.0.2a and I figured I'd try to insert
some debugging output in rancid-run - around where it calls hlogin (or
is it rancid-control that calls hlogin.. I don't remember right now..)

p.s. router db contains: 10.10.15.96:hp:up
--
Regards,
Klavs Klavsen, GSEC - ***@vsen.dk - http://www.vsen.dk - Tlf. 61281200

"Those who do not understand Unix are condemned to reinvent it, poorly."
--Henry Spencer
Klavs Klavsen
2013-06-04 17:23:00 UTC
Permalink
Alan McKinnon said the following on 06/04/2013 05:22 PM:
[CUT]
What do you have in router.db for that device?
10.10.15.96:hp:up

I have a cisco device as well - and that works just fine.
--
Regards,
Klavs Klavsen, GSEC - ***@vsen.dk - http://www.vsen.dk - Tlf. 61281200

"Those who do not understand Unix are condemned to reinvent it, poorly."
--Henry Spencer
Alan McKinnon
2013-06-04 19:49:32 UTC
Permalink
Post by Klavs Klavsen
[CUT]
What do you have in router.db for that device?
10.10.15.96:hp:up
I have a cisco device as well - and that works just fine.
I don't have any procurves myself and so have no experience with that code.

The method I use in such cases is to first look carefully at the logs
for clues, then run "hrancid -d <device_name>" and inspect the .new file
it produces.

Per-Olof's reply looks liek the one with the real solution in it though
--
Alan McKinnon
***@gmail.com
heasley
2013-06-04 23:30:59 UTC
Permalink
Post by Alan McKinnon
Post by Klavs Klavsen
[CUT]
What do you have in router.db for that device?
10.10.15.96:hp:up
I have a cisco device as well - and that works just fine.
I don't have any procurves myself and so have no experience with that code.
The method I use in such cases is to first look carefully at the logs
for clues, then run "hrancid -d <device_name>" and inspect the .new file
it produces.
problem is that he had the problem only with rancid_run, while hrancid
worked, which is odd and more difficult to debug.
Post by Alan McKinnon
Per-Olof's reply looks liek the one with the real solution in it though
Per-olof does make a good point.
Per-Olof Olsson
2013-06-04 19:18:30 UTC
Permalink
Post by Klavs Klavsen
I am trying to backup a hp procurve 2520.
using rancid 2.3.6 (I tried updating hlogin to v2.3.8).
Don't just update hlogin! Try to use hrancid and hlogin form about the same version.

I think there is an update in 2.3.7 to make "save config on exit" to work. It changing "exit" to "logout".
If hrancid 2.3.6 match for "exit" at end, and get "logout" from hlogin 2.3.8
it will not find "End of run"

Test "hrancid -d 10.10.15.96" and see if it gives any info.
Post by Klavs Klavsen
/usr/libexec/rancid/hlogin -c "show version;show flash;show system-information;show system information;show module;show
stack;write term" 10.10.15.96
it seems to work fine. It logs in, runs the commands, and after a few seconds (and a lot of output :) - it writes exit etc. and
gets out just fine.
Trying to get all of the configs.
10.10.15.96: End of run not found
;
=====================================
Getting missed routers: round 1.
10.10.15.96: End of run not found
;
=====================================
Getting missed routers: round 2.
10.10.15.96: End of run not found
;
=====================================
Getting missed routers: round 3.
10.10.15.96: End of run not found
;
=====================================
Getting missed routers: round 4.
10.10.15.96: End of run not found
Any ideas as to what I could do, to try to debug it?
/Peo
----------------------------------------------------------
Per-Olof Olsson Email: ***@chalmers.se
Chalmers tekniska högskola IT-service
Hörsalsvägen 5 412 96 Göteborg
Tel: 031/772 6738 Fax: 031/772 8680
----------------------------------------------------------
Klavs Klavsen
2013-06-06 07:25:56 UTC
Permalink
I fetched the .src.rpm for 2.3.6 for CentOS, realized the Makefile patch
(disabling -g00 CFLAGS) was unnecessary, and created an updated patch
for config - to get rancid home to /var/rancid and logs in
/var/log/rancid - and installed a complete 2.3.8.

It now works like a charm.

Thank you for all your tips
Post by Per-Olof Olsson
Post by Klavs Klavsen
I am trying to backup a hp procurve 2520.
using rancid 2.3.6 (I tried updating hlogin to v2.3.8).
Don't just update hlogin! Try to use hrancid and hlogin form about the same version.
I think there is an update in 2.3.7 to make "save config on exit" to
work. It changing "exit" to "logout".
If hrancid 2.3.6 match for "exit" at end, and get "logout" from hlogin 2.3.8
it will not find "End of run"
Test "hrancid -d 10.10.15.96" and see if it gives any info.
Post by Klavs Klavsen
/usr/libexec/rancid/hlogin -c "show version;show flash;show
system-information;show system information;show module;show
stack;write term" 10.10.15.96
it seems to work fine. It logs in, runs the commands, and after a few
seconds (and a lot of output :) - it writes exit etc. and
gets out just fine.
When I then run rancid-run - I see it has spawned that exact command,
Trying to get all of the configs.
10.10.15.96: End of run not found
;
=====================================
Getting missed routers: round 1.
10.10.15.96: End of run not found
;
=====================================
Getting missed routers: round 2.
10.10.15.96: End of run not found
;
=====================================
Getting missed routers: round 3.
10.10.15.96: End of run not found
;
=====================================
Getting missed routers: round 4.
10.10.15.96: End of run not found
Any ideas as to what I could do, to try to debug it?
/Peo
----------------------------------------------------------
Chalmers tekniska högskola IT-service
Hörsalsvägen 5 412 96 Göteborg
Tel: 031/772 6738 Fax: 031/772 8680
----------------------------------------------------------
--
Regards,
Klavs Klavsen, GSEC - ***@vsen.dk - http://www.vsen.dk - Tlf. 61281200

"Those who do not understand Unix are condemned to reinvent it, poorly."
--Henry Spencer
Loading...