Discussion:
[rancid] Explain email error
Ryan Milton
2013-09-28 22:30:22 UTC
Permalink
I have had quite a time getting my HP Procurve switches to work with rancid. Long story short, this test works:


/usr/lib/rancid/bin/hlogin -f /var/lib/rancid/.cloginrc <device>

I get into the devices from the cli.

When I just let rancid contact the devices on its own, then I get this email, which makes me think there is a permissions error (?):

The following routers have not been successfully contacted for
more than 24 hours.
-rw-r----- 1 rancid rancid 0 Sep 27 10:09 94.229.14.250

On the other hand, when I look in my logs, the message is simply that rancid couldn't login.

(?!?!) clogin error: Error: Couldn't login
<device>: missed cmd(s): show stack,show module,show flash,show version,show system-information,write term,show system information

This is the eternal issue! Everytime I think I've got it: boom! Failure

Ryan
Alan McKinnon
2013-09-28 22:57:53 UTC
Permalink
On 29/09/2013 00:30, Ryan Milton wrote:
> I have had quite a time getting my HP Procurve switches to work with
> rancid. Long story short, this test works:
>
> /usr/lib/rancid/bin/hlogin -f /var/lib/rancid/.cloginrc <device>
>
>
> I get into the devices from the cli.
>
> When I just let rancid contact the devices on its own, then I get this
> email, which makes me think there is a permissions error (?):
>
> The following routers have not been successfully contacted for
> more than 24 hours.
> -rw-r----- 1 rancid rancid 0 Sep 27 10:09 94.229.14.250
>
> On the other hand, when I look in my logs, the message is simply that
> rancid couldn't login.
>
> (?!?!) clogin error: Error: Couldn't login
> <device>: missed cmd(s): show stack,show module,show flash,show
> version,show system-information,write term,show system information
>
> This is the eternal issue! Everytime I think I've got it: boom! Failure

You are running hlogin. rancid-run is launching clogin.

That is incorrect and is a data error. Please provide the exact line in
router.db for that device (make sure you check all your groups, you may
have it defined in two places); your complete rancid.conf; and whether
/var/lib/rancid/ truly is rancid's home directory per /etc/passwd



--
Alan McKinnon
***@gmail.com
Ryan Milton
2013-09-29 00:05:19 UTC
Permalink
Thanks,

>
Hughes, Doug
2013-09-29 00:11:55 UTC
Permalink
Path looks good. So, if you become the rancid user (su to root, then su - rancid), you should be able to run panrancid or hprancid or crancid or whatever from any directory, anywhere.


-----Original Message-----
From: rancid-discuss-***@shrubbery.net [mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Ryan Milton
Sent: Saturday, September 28, 2013 8:05 PM
To: Alan McKinnon; rancid-***@shrubbery.net
Subject: Re: [rancid] Explain email error

Thanks,

>
Alan McKinnon
2013-09-29 00:33:55 UTC
Permalink
On 29/09/2013 02:11, Hughes, Doug wrote:
> Path looks good. So, if you become the rancid user (su to root, then su - rancid), you should be able to run panrancid or hprancid or crancid or whatever from any directory, anywhere.


No, he will still need to set PATH in rancid's shell.

rancid.conf is only sourced by rancid-run so settings there do not apply
to the shell. Other postings by Ryan indicate that this is in fact what
he's running into.




>
>
> -----Original Message-----
> From: rancid-discuss-***@shrubbery.net [mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Ryan Milton
> Sent: Saturday, September 28, 2013 8:05 PM
> To: Alan McKinnon; rancid-***@shrubbery.net
> Subject: Re: [rancid] Explain email error
>
> Thanks,
>
>
Hughes, Doug
2013-09-29 01:29:52 UTC
Permalink
Right you are! I didn't look closely enough. Ryan, that PATH line need to go into a file ~rancid/.bash_profile


Ryan, you can do this:

echo "PATH=/usr/lib/rancid/bin:$PATH" >> ~rancid/.bash_profile

(but I do recommend a good introductory Unix or Linux book like those by Mark Sobell, O'Reilly, or other.)


-----Original Message-----
From: Alan McKinnon [mailto:***@gmail.com]
Sent: Saturday, September 28, 2013 8:34 PM
To: Hughes, Doug; Ryan Milton; rancid-***@shrubbery.net
Subject: Re: [rancid] Explain email error

On 29/09/2013 02:11, Hughes, Doug wrote:
> Path looks good. So, if you become the rancid user (su to root, then su - rancid), you should be able to run panrancid or hprancid or crancid or whatever from any directory, anywhere.


No, he will still need to set PATH in rancid's shell.

rancid.conf is only sourced by rancid-run so settings there do not apply
to the shell. Other postings by Ryan indicate that this is in fact what
he's running into.




>
>
> -----Original Message-----
> From: rancid-discuss-***@shrubbery.net [mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Ryan Milton
> Sent: Saturday, September 28, 2013 8:05 PM
> To: Alan McKinnon; rancid-***@shrubbery.net
> Subject: Re: [rancid] Explain email error
>
> Thanks,
>
>
Ryan Milton
2013-09-29 02:27:16 UTC
Permalink
I will be answering a couple of things here:

I don't have a .bash_profile only a .profile which I changed:

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"


To

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH=/usr/lib/rancid/bin:$PATH


Which doesn't seem to change what happens.

To Alan, the name is fake, because all our equipment has public IP
addresses! In fact
I named everything: IPADDRESS:hp:up or some variation, but all are IP
Addresses, no names.

Alan,
Locate .cloginrc yields:

/home/rancid/.cloginrc
/home/ryan/.cloginrc
/var/lib/rancid/.cloginrc


But they can't seem to be removed (?) They show up in the search, but when
I try to remove: "No such file".

Rancid-fe, I only added the paloalto line:

***@ObserviumNYC:/usr/lib/rancid/bin# sudo vi rancid-fe

'hp' => 'hrancid',
'juniper' => 'jrancid',
'mrtd' => 'mrancid',
'mrv' => 'mrvrancid',
'netopia' => 'trancid',
'netscaler' => 'nsrancid',
'netscreen' => 'nrancid',
'procket' => 'prancid',
'paloalto' => 'panrancid',
'redback' => 'rrancid',
'riverstone' => 'rivrancid',
'smc' => 'srancid',
'tnt' => 'tntrancid',
'zebra' => 'zrancid'
);

I followed the install instructions from:

https://help.ubuntu.com/community/RANCID#Introduction

http://www.binaryroyale.com/index.php/category/umbungo/


OK ALAN! I'M IN. With all the headache that this has caused, I'm not going
to stop now. I have been interested in a clean install, but I wouldn't
know where to begin.

Easiest thing is to use the rancid user, ***@nc1d pass. @94.229.11.72

I can do it now---but it is late, or at a scheduled time.

Ryan

I appreciate sticking with me on this, I WILL read those books!


On 9/28/13 9:29 PM, "Hughes, Doug" <***@DEShawResearch.com>
wrote:

>Right you are! I didn't look closely enough. Ryan, that PATH line need to
>go into a file ~rancid/.bash_profile
>
>
>Ryan, you can do this:
>
> echo "PATH=/usr/lib/rancid/bin:$PATH" >> ~rancid/.bash_profile
>
>(but I do recommend a good introductory Unix or Linux book like those by
>Mark Sobell, O'Reilly, or other.)
>
>
>-----Original Message-----
>From: Alan McKinnon [mailto:***@gmail.com]
>Sent: Saturday, September 28, 2013 8:34 PM
>To: Hughes, Doug; Ryan Milton; rancid-***@shrubbery.net
>Subject: Re: [rancid] Explain email error
>
>On 29/09/2013 02:11, Hughes, Doug wrote:
>> Path looks good. So, if you become the rancid user (su to root, then su
>>- rancid), you should be able to run panrancid or hprancid or crancid or
>>whatever from any directory, anywhere.
>
>
>No, he will still need to set PATH in rancid's shell.
>
>rancid.conf is only sourced by rancid-run so settings there do not apply
>to the shell. Other postings by Ryan indicate that this is in fact what
>he's running into.
>
>
>
>
>>
>>
>> -----Original Message-----
>> From: rancid-discuss-***@shrubbery.net
>>[mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Ryan Milton
>> Sent: Saturday, September 28, 2013 8:05 PM
>> To: Alan McKinnon; rancid-***@shrubbery.net
>> Subject: Re: [rancid] Explain email error
>>
>> Thanks,
>>
>>
Ryan Milton
2013-09-29 03:47:18 UTC
Permalink
Alan,

Just
Let me know the timing and I'll give you access. That login won't work anyway.

Thank you,

Ryan Milton
MVS Network Manager
O: 201-447-1505 x124
C: 862-249-5230
________________________________________
From: rancid-discuss-***@shrubbery.net <rancid-discuss-***@shrubbery.net> on behalf of Ryan Milton <***@mvsusa.com>
Sent: Saturday, September 28, 2013 10:27:16 PM
To: Hughes, Doug; Alan McKinnon; rancid-***@shrubbery.net
Subject: Re: [rancid] Explain email error

I will be answering a couple of things here:

I don't have a .bash_profile only a .profile which I changed:

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"


To

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH=/usr/lib/rancid/bin:$PATH


Which doesn't seem to change what happens.

To Alan, the name is fake, because all our equipment has public IP
addresses! In fact
I named everything: IPADDRESS:hp:up or some variation, but all are IP
Addresses, no names.

Alan,
Locate .cloginrc yields:

/home/rancid/.cloginrc
/home/ryan/.cloginrc
/var/lib/rancid/.cloginrc


But they can't seem to be removed (?) They show up in the search, but when
I try to remove: "No such file".

Rancid-fe, I only added the paloalto line:

***@ObserviumNYC:/usr/lib/rancid/bin# sudo vi rancid-fe

'hp' => 'hrancid',
'juniper' => 'jrancid',
'mrtd' => 'mrancid',
'mrv' => 'mrvrancid',
'netopia' => 'trancid',
'netscaler' => 'nsrancid',
'netscreen' => 'nrancid',
'procket' => 'prancid',
'paloalto' => 'panrancid',
'redback' => 'rrancid',
'riverstone' => 'rivrancid',
'smc' => 'srancid',
'tnt' => 'tntrancid',
'zebra' => 'zrancid'
);

I followed the install instructions from:

https://help.ubuntu.com/community/RANCID#Introduction

http://www.binaryroyale.com/index.php/category/umbungo/


OK ALAN! I'M IN. With all the headache that this has caused, I'm not going
to stop now. I have been interested in a clean install, but I wouldn't
know where to begin.

Easiest thing is to use the rancid user, ***@nc1d pass. @94.229.11.72

I can do it now---but it is late, or at a scheduled time.

Ryan

I appreciate sticking with me on this, I WILL read those books!


On 9/28/13 9:29 PM, "Hughes, Doug" <***@DEShawResearch.com>
wrote:

>Right you are! I didn't look closely enough. Ryan, that PATH line need to
>go into a file ~rancid/.bash_profile
>
>
>Ryan, you can do this:
>
> echo "PATH=/usr/lib/rancid/bin:$PATH" >> ~rancid/.bash_profile
>
>(but I do recommend a good introductory Unix or Linux book like those by
>Mark Sobell, O'Reilly, or other.)
>
>
>-----Original Message-----
>From: Alan McKinnon [mailto:***@gmail.com]
>Sent: Saturday, September 28, 2013 8:34 PM
>To: Hughes, Doug; Ryan Milton; rancid-***@shrubbery.net
>Subject: Re: [rancid] Explain email error
>
>On 29/09/2013 02:11, Hughes, Doug wrote:
>> Path looks good. So, if you become the rancid user (su to root, then su
>>- rancid), you should be able to run panrancid or hprancid or crancid or
>>whatever from any directory, anywhere.
>
>
>No, he will still need to set PATH in rancid's shell.
>
>rancid.conf is only sourced by rancid-run so settings there do not apply
>to the shell. Other postings by Ryan indicate that this is in fact what
>he's running into.
>
>
>
>
>>
>>
>> -----Original Message-----
>> From: rancid-discuss-***@shrubbery.net
>>[mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Ryan Milton
>> Sent: Saturday, September 28, 2013 8:05 PM
>> To: Alan McKinnon; rancid-***@shrubbery.net
>> Subject: Re: [rancid] Explain email error
>>
>> Thanks,
>>
>>
heasley
2013-10-01 18:38:00 UTC
Permalink
as rancid, run hrancid -dl devicename to test and look at the file
devicename.new to verify that it is complete.
Loading...