Mailing List Archive

rancid 3.7 and HP 1910-8G - can't get rancid to work with that router
Hello,

I'm new to rancid and don't know, how to solve my problem. Maybe someone can help me.

I did setup rancid 3.7. Everything works quite well so far except for some routers.

We've got a HP 1910-8G and I can't find a way to get rancid to work probably with that router type.

If router type is set to 'hp', rancid-run won't end his run and runs forever without any configs get backed up.

I've found some scripts ('h3clogin'; 'h3crancid') on another server in our network. rancid-run ends correctly with this script but throws some errors:
defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
(Maybe you should just omit the defined()?)
defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
(Maybe you should just omit the defined()?)
defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
(Maybe you should just omit the defined()?)
defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
(Maybe you should just omit the defined()?)
defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
(Maybe you should just omit the defined()?)
lnb-o2a: End of run not found
% Unrecognized command found at '^' position.
defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
(Maybe you should just omit the defined()?)
lnb-o2b: End of run not found
% Unrecognized command found at '^' position.
lnb-o3a: End of run not found
% Unrecognized command found at '^' position.
lnb-o1a: End of run not found
% Unrecognized command found at '^' position.
lnb-o1b: End of run not found
% Unrecognized command found at '^' position.
lnb-o3b: End of run not found
% Unrecognized command found at '^' position.

Now I don't know what to do. Any suggestions?

Thanks.

Best regards,

Thomas
________________________________


Klinikum Nürnberg, Sitz: Nürnberg, Amtsgericht Nürnberg -Registergericht- HRA 14190, Vorstand: Prof. Dr. Achim Jockwig (Vorsitzender), Dr. Andreas Becke, Univ.-Prof. Dr. Dr. Gu?nter Niklewski, Peter Schuh
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: rancid 3.7 and HP 1910-8G - can't get rancid to work with that router [ In reply to ]
I cannot tell if this switch line is Procurve or Comware. H3C is for the comware editions/versions. What does a show version or display version show at the command line?

Here is a good debugging guide.

https://www.barryodonovan.com/2011/02/05/useful-rancid-debugging-tips-2

Particularly

setenv NOPIPE YES
rancid -d <devicename> which will show you the commands its running and the output.

This email, including any attached files, may contain confidential and privileged information. If you received this communication in error, please contact the sender by reply e-mail and delete all copies of this message.
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: rancid 3.7 and HP 1910-8G - can't get rancid to work with that router [ In reply to ]
Mon, Dec 11, 2017 at 02:51:27PM +0000, Eichhorn, Thomas:
> Hello,
>
> I'm new to rancid and don't know, how to solve my problem. Maybe someone can help me.
>
> I did setup rancid 3.7. Everything works quite well so far except for some routers.
>
> We've got a HP 1910-8G and I can't find a way to get rancid to work probably with that router type.
>
> If router type is set to 'hp', rancid-run won't end his run and runs forever without any configs get backed up.

HP OEMs a lot of their network hardware; so while badged hp, its not one
to rancid due to the o/s. look at rancid.types.base; there are a number
of comments there about HP devices and the rancid types that are known to
work with them.

> I've found some scripts ('h3clogin'; 'h3crancid') on another server in our network. rancid-run ends correctly with this script but throws some errors:
> defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
> (Maybe you should just omit the defined()?)
> defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
> (Maybe you should just omit the defined()?)
> defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
> (Maybe you should just omit the defined()?)
> defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
> (Maybe you should just omit the defined()?)
> defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
> (Maybe you should just omit the defined()?)
> lnb-o2a: End of run not found
> % Unrecognized command found at '^' position.
> defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
> (Maybe you should just omit the defined()?)
> lnb-o2b: End of run not found
> % Unrecognized command found at '^' position.
> lnb-o3a: End of run not found
> % Unrecognized command found at '^' position.
> lnb-o1a: End of run not found
> % Unrecognized command found at '^' position.
> lnb-o1b: End of run not found
> % Unrecognized command found at '^' position.
> lnb-o3b: End of run not found
> % Unrecognized command found at '^' position.
>
> Now I don't know what to do. Any suggestions?

h3crancid is a 3rdparty module. Those errors imply to me that some command
required by that module are not implemented by the device.

the errors before that appear to be programming errors, likely grammar
that was permissible in a previous version of perl.

Gr??e

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: rancid 3.7 and HP 1910-8G - can't get rancid to work with that router [ In reply to ]
On Mon, 11 Dec 2017, heasley wrote:

> HP OEMs a lot of their network hardware; so while badged hp, its not one
> to rancid due to the o/s. look at rancid.types.base; there are a number
> of comments there about HP devices and the rancid types that are known to
> work with them.

1910 is a Comware 5 model.

> h3crancid is a 3rdparty module. Those errors imply to me that some
> command required by that module are not implemented by the device.

(I wrote it)

Output for unrecognised commands should be skipped properly (some commands
work on some models or comware versions and not on others, but this should
all be handled properly).

> the errors before that appear to be programming errors, likely grammar
> that was permissible in a previous version of perl.

That seems likely, but I don't keep up much with perl to know. But I
don't see where this error might be coming from.

defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
(Maybe you should just omit the defined()?)

I've attached another h3crancid which is one I use locally. I can't be
sure it doesn't have some local hacks but be interesting to see if it
makes this error go away.

Beyond that, follow David's advice by running it with some debugging, I
would do something like:

env NOPIPE=YES PATH=${PATH}:/usr/local/libexec/rancid rancid -d devicename

adjusting the path to rancid accordingly. That will give you the .new and
.raw files in the current directory which might be enlightening.

Jethro.

. . . . . . . . . . . . . . . . . . . . . . . . .
Jethro R Binks, Network Manager,
Information Services Directorate, University Of Strathclyde, Glasgow, UK

The University of Strathclyde is a charitable body, registered in
Scotland, number SC015263.
Re: rancid 3.7 and HP 1910-8G - can't get rancid to work with that router [ In reply to ]
Not quite sure what's wrong with my configuration / scripts / login:

My rancid.types.conf contains
> #h3c products
> h3c;script;h3crancid
> h3c;login;h3clogin

But I'm not sure if I'm even using the right login script because I get some errors using this script. I've tried to login with 'h3clogin DEVICE' and got following errors:
> <DEVICE>undo terminal monitor
> ^
> % Unrecognized command found at '^' position.
> <DEVICE>screen-length disable
> ^
> % Unrecognized command found at '^' position.


With 'clogin DEVICE' there are no error messages.

Debugging with
> env NOPIPE=YES PATH=${PATH}:/usr/local/rancid/bin rancid -t h3c -d DEVICE
raises the same errors.


I could not test the newer version of 'h3crancid' (which Jethro provided me) because I get an error
> exec(h3crancid) failed router manufacturer h3c: No such file or directory
File access rights are the same as the original 'h3crancid' file.

Any advice?

Best regards,
Thomas
________________________________


Klinikum Nürnberg, Sitz: Nürnberg, Amtsgericht Nürnberg -Registergericht- HRA 14190, Vorstand: Prof. Dr. Achim Jockwig (Vorsitzender), Dr. Andreas Becke, Univ.-Prof. Dr. Dr. Gu?nter Niklewski, Peter Schuh
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss