File is busy

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

File is busy Tue Jun 16, 2009 2:02 am • by jkinghome
I have recently been having a number of problems with my rules where Hazel will not run the rules as the "file is busy". Nothing is accessing the file, and I have rebooted to make sure, but doesn't change. I can manually modify the file, delete etc.

Any ideas?

Thank you for the great application!!
jkinghome
 
Posts: 7
Joined: Tue Jun 16, 2009 2:00 am

Re: File is busy Tue Jun 16, 2009 1:26 pm • by a_freyer
Check the logs. You should be able to see what is accessing the file there.

What kind of file is it?
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado

Re: File is busy Tue Jun 16, 2009 1:48 pm • by jkinghome
Thanks for your reply.

I checked my logs and don't see the file being accessed by any other program.

It is an .avi file. As I mentioned, I can manually move, delete, rename all the files that are "busy" - but Hazel won't run any rules on it. So, I don't think it is really busy. Could I place a script to change the file flag to null, before Hazel is running the rule.

Also, originally the rule is to move the file, but I would have thought if I "copy" the file I shouldn't have a "file busy" problem. But it still happens.
jkinghome
 
Posts: 7
Joined: Tue Jun 16, 2009 2:00 am

Re: File is busy Tue Jun 16, 2009 1:51 pm • by a_freyer
Was this a torrented AVI?

If so, it might not be a completed download, and your torrent client might be holding fast. Transmission does this to me every now and then, although I usually don't have a problem with Hazel.

If you attempt to re-name the file, does Hazel recognize it? Another test would be - if you move the file out and back into your rule directory, waht does hazel do?
a_freyer
 
Posts: 631
Joined: Tue Sep 30, 2008 9:21 am
Location: Colorado

Re: File is busy Wed Jun 17, 2009 1:35 am • by jkinghome
It is an avi from newsgroups (nzb). The file plays fine, and I can do everything I need with it - other than Hazel moving it for me.

I am able to manually move and rename the file with terminal commands. Wouldn't that give me an indication of if the file was being used by something else?

Is there a way that I can bypass the busy file check in Hazel?
jkinghome
 
Posts: 7
Joined: Tue Jun 16, 2009 2:00 am

Re: File is busy Wed Jun 17, 2009 9:33 pm • by Mr_Noodle
First off, make sure you are running the latest version of Hazel (2.2.4).

Being able to rename using terminal commands doesn't indicate anything as they tend to ignore any locks and such. Also, copying a busy file is not safe as you can end up with a corrupt file at the other end.

Try using the 'lsof' command to see what process has the file open. Let me know if anything turns up there.
Mr_Noodle
Site Admin
 
Posts: 11251
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: File is busy Tue Jun 23, 2009 11:16 pm • by jkinghome
Yes, I can confirm that I am using 2.2.4.

I did the lsof check, and the files are not being used by anything.

I have a feeling that this only started happening after I updated to OSX 10.5.7. But can't be certain.

Thanks for your help.

EDIT - Tried it on a different OSX system running 10.5.6, still the same "file is busy" issue.
jkinghome
 
Posts: 7
Joined: Tue Jun 16, 2009 2:00 am

Re: File is busy Wed Jun 24, 2009 12:52 pm • by Mr_Noodle
One last thing to check is the modification date on the file. Sometimes, it is mistakenly set to the future which tricks Hazel into think it is busy. You can try re-saving the file to see if it resets the date to something sane otherwise you can try setting the date using the commandline using the 'touch' program. If you need to go this route and need instructions, let me know.

If the modification date is fine, then email me so I can do deeper diagnostics.
Mr_Noodle
Site Admin
 
Posts: 11251
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron