Not unarchiving properly

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

Moderator: Mr_Noodle

Not unarchiving properly Wed Jan 01, 2014 11:28 am • by JRhodes88
Hazel was working fine for the rules I had set up. I have only changed a few things since I noticed Hazel was not properly unarchiving files for me. I have Hazel watching a folder that has a bunch or RAR archives, it copies them, unarchives the copied files, moves the unarchived file, and then deletes the copies.

In red is where the issue is occurring.

This was working great until either one of two things happened.
1) An update to Hazel broke my rule (unlikely)
2) I just attached a 4TB Firewire 800 External Hard Drive to my system which is now where most of the unarchived files are downloaded to.

My thought is something is happening where Hazel is not allowing the external hard drive to spin up completely before running the rules because it finishes copying all of the unarchived files, but then errors when attempting to unarchive them. When I manually go in that folder and try to unarchive the copied .RAR my unarchiving application gives me an error about "This is not an unarchivable format".

Here is the weird part, if I manually erase the copied files and the drive is spinning and I allow Hazel to run the rule again....it works. It only seems to happen when I'm not currently using the computer do I notice it has issues.

I've already tried to fix any strange permission issues with the drive and tried to run a customer LaunchAgent to touch a file on the root of the drive every 5 minutes to prevent it from going to sleep.

Any ideas?
JRhodes88
 
Posts: 23
Joined: Sun Jan 06, 2013 10:32 am

Re: Not unarchiving properly Thu Jan 02, 2014 4:19 pm • by Mr_Noodle
What program is downloading the files? Is it possible that it is still downloading while Hazel is copying?
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Not unarchiving properly Thu Jan 02, 2014 10:27 pm • by JRhodes88
Mr_Noodle wrote:What program is downloading the files? Is it possible that it is still downloading while Hazel is copying?


uTorrent.
Unlikely because I was using the exact setup with Hazel, but it was running all the rules off the internal drives.
The workflow kinda looks like this:

1) uTorrent (internal HDD)
2) Downloads to External HDD
3) Hazel runs rules which is watching completed download folder
4) Hazel unarchives and moves files to specific folder on external HDD.
JRhodes88
 
Posts: 23
Joined: Sun Jan 06, 2013 10:32 am

Re: Not unarchiving properly Fri Jan 03, 2014 4:17 pm • by Mr_Noodle
Is uTorrent first downloading to the local drive then moving them to completed on the external drive? If so, then doing that will be a good bit slower which may explains things. Also, I'm guessing uTorrent does not use proper locking of the files when doing this (which is a common problem with cross-platform/ported apps). You may have to add a condition to Hazel like "Date modified is not in the last X minutes" to delay processing.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Not unarchiving properly Sat Jan 04, 2014 12:32 am • by JRhodes88
Mr_Noodle wrote:You may have to add a condition to Hazel like "Date modified is not in the last X minutes" to delay processing.


I don't think that will help because Hazel does not see the folder until the download is 100% complete.
uTorrent is downloading to the external drive directly to a folder (lets call it Folder_A). Once the download is 100% complete, uTorrent moves that download to another folder (lets call it Folder_B).

Hazel doesn't even know about Folder_A. Hazel only watches Folder_B for specific rules to run, one of which is unarchiving certain files it detects. I'm getting a lot of "failed to unpack" errors in the Hazel log that I have never received when doing the same operation on my internal drives.
JRhodes88
 
Posts: 23
Joined: Sun Jan 06, 2013 10:32 am

Re: Not unarchiving properly Sun Jan 05, 2014 10:56 am • by JRhodes88
So it seems when Hazel is running automatically (I'm not using the computer so external hard drive is asleep) I get these errors in the Hazel log:

Code: Select all
2014-01-05 04:28:17.193 hazelworker[1896] Could not identify archive type for file: /Volumes/Macintosh HD3/Downloads/Complete/[filehere].r06
2014-01-05 04:28:17.193 hazelworker[1896] [Error] Unarchive failed: Failed to unpack archive for /Volumes/Macintosh HD3/Downloads/Complete/[filehere].r06.


This error is always followed by something about "fire time"

But when I'm on the computer and tell it to run the rules (external hard drive is awake) I do not get that error.
JRhodes88
 
Posts: 23
Joined: Sun Jan 06, 2013 10:32 am

Re: Not unarchiving properly Mon Jan 06, 2014 12:11 am • by JRhodes88
So i feel like an idiot on this one...

The issue was from Hazel....but only because uTorrent was messing up first.

You were correct in your guess that uTorrent was transferring files for Hazel to examine before they were finished. Thus, Hazel was copying non-completed files and then trying to unarchive.

The problem I was having had nothing to do with my external hard drive other than the issues started to happen the same time I was reconfiguring my set up to work with the drive.

Thanks for the troubleshooting tips!
JRhodes88
 
Posts: 23
Joined: Sun Jan 06, 2013 10:32 am


Return to Support