Discussion:
[rancid] File lock help
Todd Heide
2007-08-06 16:32:19 UTC
Permalink
I know I asked this before, but cant find the reply from a year ago.



hourly config diffs failed: /tmp/.Customer_Routers.run.lock exists

-rw-r----- 1 rancid netadm 0 Aug 2 14:10
/tmp/.Customer_Routers.run.lock







How do I unlock the files? Also what would have locked them in the first
place?
Lance
2007-08-06 18:37:10 UTC
Permalink
Todd,

rm /tmp/.Customer_Routers.run.lock


-Lance
-------- Original Message --------
Subject: [rancid] File lock help
Date: Mon, August 06, 2007 9:32 am
I know I asked this before, but cant find the reply from a year ago.
hourly config diffs failed: /tmp/.Customer_Routers.run.lock exists
-rw-r----- 1 rancid netadm 0 Aug 2 14:10
/tmp/.Customer_Routers.run.lock
How do I unlock the files? Also what would have locked them in the first
place?<hr>_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Manuel Noriega
2007-08-06 21:59:33 UTC
Permalink
I also kept finding these lock files which would not permit RANCID to
run, and I would only find out a couple of days later when I noticed
some notifications not being sent.

Si I know it's a bit drastic, but I placed a script in cron.daily to
remove these files periodcally.

================= clean-locks-rancid =================
#!/bin/sh

rm -rf /tmp/.*.lock
==================================================


Sincerely,

Manuel Noriega
ISP Engineer
Todd Heide
2007-08-06 19:02:29 UTC
Permalink
Thanks Guys, it was a DOH moment on my part, I forgot it is a hidden
file and couldn't find it due to a lack of using the -a after issuing
ls. Its working again.

Thanks
Todd Heide
Equivoice Inc.

CCNA CWLSS CS-CISecS
847-235-3308

Nothing ever goes as planned, Its a hell of a notion,
Even pharaohs turn to sand, Like a drop in the ocean
-----Original Message-----
From: Lance [mailto:***@gheek.net]
Sent: Monday, August 06, 2007 1:37 PM
To: Todd Heide
Cc: rancid-***@shrubbery.net
Subject: RE: [rancid] File lock help

Todd,

rm /tmp/.Customer_Routers.run.lock


-Lance
-------- Original Message --------
Subject: [rancid] File lock help
Date: Mon, August 06, 2007 9:32 am
I know I asked this before, but cant find the reply from a year ago.
hourly config diffs failed: /tmp/.Customer_Routers.run.lock exists
-rw-r----- 1 rancid netadm 0 Aug 2 14:10
/tmp/.Customer_Routers.run.lock
How do I unlock the files? Also what would have locked them in the
first
place?<hr>_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Lance
2007-08-06 22:31:10 UTC
Permalink
These lock files should never be left behind unless the scripts aren't
finishing correctly.

-Lance
-------- Original Message --------
Subject: Re: [rancid] Re: File lock help
Date: Mon, August 06, 2007 2:59 pm
I also kept finding these lock files which would not permit RANCID to
run, and I would only find out a couple of days later when I noticed
some notifications not being sent.
Si I know it's a bit drastic, but I placed a script in cron.daily to
remove these files periodcally.
================= clean-locks-rancid =================
#!/bin/sh
rm -rf /tmp/.*.lock
==================================================
Sincerely,
Manuel Noriega
ISP Engineer<hr>13 CALLE 3-40, ZONA 10
15 NIVEL, OFICINA 15-01
GUATEMALA CITY, C.A.
PBX (502) 2279 0099
FAX (502) 2279 0003
www.amnetdatos.com
Post by Lance
Todd,
rm /tmp/.Customer_Routers.run.lock
-Lance
-------- Original Message --------
Subject: [rancid] File lock help
Date: Mon, August 06, 2007 9:32 am
I know I asked this before, but cant find the reply from a year ago.
hourly config diffs failed: /tmp/.Customer_Routers.run.lock exists
-rw-r----- 1 rancid netadm 0 Aug 2 14:10
/tmp/.Customer_Routers.run.lock
How do I unlock the files? Also what would have locked them in the
first
place?<hr>_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
john heasley
2007-08-09 16:50:45 UTC
Permalink
Post by Lance
These lock files should never be left behind unless the scripts aren't
finishing correctly.
even if they do not finish correctly, the lock should be removed via the
signal handler. only if the machine crashed, it received a KILL signal,
or the scripts are hung, should the lock file remain.

if a script is hung, and you're using linux or solaris, please ensure
that you have installed an expect(1) with the patch available on the
rancid site.
Chris Stave
2007-08-06 17:41:15 UTC
Permalink
To unlock, you just delete the file in question,
/tmp/.Customer_Routers.run.lock

This file gets created during the hourly run, and sometimes doesn't get
properly removed.

Chris Stave
Computing and Network Services
Drew University
Post by Todd Heide
I know I asked this before, but cant find the reply from a year ago.
hourly config diffs failed: /tmp/.Customer_Routers.run.lock exists
-rw-r----- 1 rancid netadm 0 Aug 2 14:10 /tmp/.Customer_Routers.run.lock
How do I unlock the files? Also what would have locked them in the first
place?
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Alan Evans
2007-08-07 20:35:51 UTC
Permalink
This maybe a coincidence but I started to get the same problem a couple of days ago.
Rancid would hang after a while and I had to "kill -9" a number of rancid processes and then remove the lock file. It would work for about 12 hours and then hang again.

I knew about the expect patch but hadn't applied it because I didn't have any problems. I applied the expect patch to see if this would fix my problem but it made things worse. After applying the patch I did not get any output in the .new files.

I fixed my problem (hopefully) by installing the ActiveState's ActiveTcl distribution (http://www.activestate.com/Products/activetcl/).

This distribution includes expect as a package to tclsh rather than a separate executable therefore if you want to use ActiveTcl's expect you need to change the first line in the rancid login scripts:

From:
# /usr/bin/expect --

To something like this:
#! /usr/local/ActiveTcl-8.4/bin/tclsh8.4
package require Expect

cheers
AlanE

________________________________________
From: rancid-discuss-***@shrubbery.net [mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Chris Stave
Sent: Monday, August 06, 2007 10:41 AM
To: Todd Heide
Cc: rancid-***@shrubbery.net
Subject: [rancid] Re: File lock help

To unlock, you just delete the file in question, /tmp/.Customer_Routers.run.lock

This file gets created during the hourly run, and sometimes doesn't get properly removed.

Chris Stave
Computing and Network Services
Drew University
On 8/6/07, Todd Heide <***@equivoice.com > wrote:
I know I asked this before, but cant find the reply from a year ago.
 
hourly config diffs failed: /tmp/.Customer_Routers.run.lock exists
-rw-r-----  1 rancid netadm 0 Aug  2 14:10 /tmp/.Customer_Routers.run.lock
 
 
 
How do I unlock the files? Also what would have locked them in the first place?
john heasley
2007-08-09 16:58:41 UTC
Permalink
Post by Alan Evans
I knew about the expect patch but hadn't applied it because I didn't have any problems. I applied the expect patch to see if this would fix my problem but it made things worse. After applying the patch I did not get any output in the .new files.
This would lead me to believe that the patch was not applied properly or
the problem is completely different, such as a duplex mismatch on your
network interface. The patch is very simple and can not have the reverse
affect.

Todd Heide
2007-08-07 21:02:16 UTC
Permalink
My servers problem was due to it occasionally going into read only state due to a SCSI bios issue I have yet to fix. A new server is being built to replace it, slowly. I just haven't been checking on it for a while and found the locked file state when I noticed the router.db file for one group wasn't updated after I added some devices and did a rancid-run. It was a DOH moment for me because I forgot the darn file is hidden and I didn't see it to delete it. All is working fine for me. I like the Fedora Core server version that I run, other than the hardware issue, it has performed flawlessly.


Nothing ever goes as planned, Its a hell of a notion,
Even pharaohs turn to sand, Like a drop in the ocean

-----Original Message-----
From: rancid-discuss-***@shrubbery.net [mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Alan Evans
Sent: Tuesday, August 07, 2007 3:36 PM
To: rancid-***@shrubbery.net
Subject: [rancid] Re: File lock help

This maybe a coincidence but I started to get the same problem a couple of days ago.
Rancid would hang after a while and I had to "kill -9" a number of rancid processes and then remove the lock file. It would work for about 12 hours and then hang again.

I knew about the expect patch but hadn't applied it because I didn't have any problems. I applied the expect patch to see if this would fix my problem but it made things worse. After applying the patch I did not get any output in the .new files.

I fixed my problem (hopefully) by installing the ActiveState's ActiveTcl distribution (http://www.activestate.com/Products/activetcl/).

This distribution includes expect as a package to tclsh rather than a separate executable therefore if you want to use ActiveTcl's expect you need to change the first line in the rancid login scripts:

From:
# /usr/bin/expect --

To something like this:
#! /usr/local/ActiveTcl-8.4/bin/tclsh8.4
package require Expect

cheers
AlanE

________________________________________
From: rancid-discuss-***@shrubbery.net [mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Chris Stave
Sent: Monday, August 06, 2007 10:41 AM
To: Todd Heide
Cc: rancid-***@shrubbery.net
Subject: [rancid] Re: File lock help

To unlock, you just delete the file in question, /tmp/.Customer_Routers.run.lock

This file gets created during the hourly run, and sometimes doesn't get properly removed.

Chris Stave
Computing and Network Services
Drew University
On 8/6/07, Todd Heide <***@equivoice.com > wrote:
I know I asked this before, but cant find the reply from a year ago.
 
hourly config diffs failed: /tmp/.Customer_Routers.run.lock exists
-rw-r-----  1 rancid netadm 0 Aug  2 14:10 /tmp/.Customer_Routers.run.lock
 
 
 
How do I unlock the files? Also what would have locked them in the first place?
Loading...