"Could not switch to directory" Hazel not acting

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

Moderator: Mr_Noodle

Hi - I see the following error in the Console:

Code: Select all
2012-09-25 21:24:30.301 hazelworker[73788] Processing folder Boardwalk Empire
2012-09-25 21:24:32.321 hazelworker[73788] Could not switch to directory: </Volumes/media/tv/Boardwalk Empire>
2012-09-25 21:24:32.390 hazelworker[73788] Error enumerating path (null): Error Domain=NSCocoaErrorDomain Code=256 "The file “Boardwalk Empire” couldn’t be opened." UserInfo=0x1002625f0 {NSURL=file://localhost/Volumes/media/tv/Boardwalk%20Empire, NSFilePath=/Volumes/media/tv/Boardwalk Empire, NSUnderlyingError=0x100262380 "The operation couldn’t be completed. Operation timed out"}
2012-09-25 21:24:32.414 hazelworker[73788] Done processing folder Boardwalk Empire
2012-09-25 21:29:32.514 hazelworker[73832] Processing folder Boardwalk Empire
2012-09-25 21:29:34.530 hazelworker[73832] Done processing folder Boardwalk Empire


It sees a new episode on the folder, tries to act on it and then fails. Hazel never goes back to process the file.

I have many other folders that do seem to work. The folder is in a directory along with all my other TV shows and is mounted via NFS with correct permissions etc.

If I manually choose to run the rules it works:
Code: Select all
2012-09-26 10:10:01.589 hazelworker[85164] Processing folder Boardwalk Empire (forced)
2012-09-26 10:10:03.616 hazelworker[85164] Boardwalk Empire - S03E01.mkv: Rule Convert matched.
ilium007
 
Posts: 23
Joined: Sun May 01, 2011 5:42 pm

It says the operation timed out, which is quite possible when NFS is concerned. Is /Volumes/media the NFS mount point? Are you using "Run rules on folder contents" in your rules?
Mr_Noodle
Site Admin
 
Posts: 11951
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

If so why does it never go back and check ? Why does it work fine when I run manually ?

As far as folder rules go, the files sit directly under the watches folder. There are no sub directories.
ilium007
 
Posts: 23
Joined: Sun May 01, 2011 5:42 pm

Well, I'm trying to figure that out. So, is /Volumes/media an NFS mount point? Also, in your log with the error, was there a new file in that folder already or was it added later?

One thing about network shares: they don't send file events like local filesystems do. As a result, there may be a delay of a few minutes for those types of folders. Not sure if that's what you are seeing here but something to consider.

Oh, and lastly, you should turn on debug mode as described in the sticky article up top.
Mr_Noodle
Site Admin
 
Posts: 11951
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I have now turned on debug, but obviously when the machine is running normally I don't have debug turned on. The share is an NFS mount point and the file had been sitting there for some hours.

I will turn on debug now and see if it happens again. Cheers and thanks for the help.
ilium007
 
Posts: 23
Joined: Sun May 01, 2011 5:42 pm

Could you tell me the exact mount point? I want to know where the mount point is relative to the monitored folder. Is it /Volumes/media or /Volumes/media/tv or /Volumes/media/tv/Boardwalk Empire ?
Mr_Noodle
Site Admin
 
Posts: 11951
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Hi - the NFS mount is at /Volumes/media and the watched folder is /Volumes/media/tv/Boardwalk Empire

Cheers
ilium007
 
Posts: 23
Joined: Sun May 01, 2011 5:42 pm

I'm wondering if it's a case of the file already matching the rule and not executing again (if you do a manual run, it will force it to execute). Check the debug logs for a message about matching a rule signature and not executing actions.
Mr_Noodle
Site Admin
 
Posts: 11951
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Hi Mr Noodle - hope you have not been flooded away... I need you !!!

Its happened again !
Code: Select all
2012-11-05 00:42:36.242 hazelworker[10621] DEBUG: Directory /Volumes/media/tv/Revenge processed in 0.007707 seconds
2012-11-05 00:42:36.278 hazelworker[10621] Done processing folder Revenge
2012-11-05 00:47:36.453 hazelworker[10675] Processing folder Revenge
2012-11-05 00:47:38.460 hazelworker[10675] DEBUG: About to process directory /Volumes/media/tv/Revenge
2012-11-05 00:47:38.466 hazelworker[10675] DEBUG: Directory /Volumes/media/tv/Revenge processed in 0.006781 seconds
2012-11-05 00:47:38.471 hazelworker[10675] Done processing folder Revenge
2012-11-05 20:41:27.315 hazelworker[25668] Processing folder Revenge
2012-11-05 20:41:29.346 hazelworker[25668] DEBUG: About to process directory /Volumes/media/tv/Revenge
2012-11-05 20:41:29.384 hazelworker[25668] Revenge - S02E06.mkv: Rule batch into hb matched.
2012-11-05 20:41:29.415 hazelworker[25668] DEBUG: No description for disk with path: /Volumes/media/tv/Revenge/Revenge - S02E06.mkv
2012-11-05 20:41:29.501 hazelworker[25668] DEBUG: Action changed file: Revenge - S02E06.mkv
2012-11-05 20:41:29.503 hazelworker[25668] DEBUG: [PREDICTION] Predicted fire time for file: /Volumes/media/tv/Revenge/Revenge - S02E06.mkv and rule batch into hb: 5828963-12-20 10:00:00.000 Should poll: 0
2012-11-05 20:41:29.504 hazelworker[25668] DEBUG: Writing out DB file: /Volumes/media/tv/Revenge
2012-11-05 20:41:29.505 hazelworker[25668] DEBUG: Directory /Volumes/media/tv/Revenge processed in 0.159495 seconds
2012-11-05 20:41:29.507 hazelworker[25668] DEBUG: About to process directory /Volumes/media/tv/Revenge
2012-11-05 20:41:29.517 hazelworker[25668] DEBUG: [PREDICTION] Predicted fire time for file: /Volumes/media/tv/Revenge/Revenge - S02E06.mkv and rule batch into hb: 5828963-12-20 10:00:00.000 Should poll:


So you can see here that the folder check stopped at about 00:47 last night and was not checked until 20:41 when I remote connected to the media server tonight when I got home.

I know the file was downloaded today at 16:24 and at about 16:25 I got a Prowl message on my phone to say it had downloaded. This is when Hazel should pick up the file and run through my Handbrake batch script.

Image

The Hazel job looks like:
Image

So I have an NFS mount (/media) under which I have a folder called tv under which I have my tv series. I am watching the folder 'Revenge'.

It seems to me like something is sleeping causing my problems. And its not the Macmini:
Image

NFS Manager handles my NFS mounts:
Image

NFS mounts are off of my FreeNAS server and it is set never to sleep:
Image

I don't know what else to try !!! My automation has failed me !! Please untwist my noodle.
ilium007
 
Posts: 23
Joined: Sun May 01, 2011 5:42 pm

Wasn't flooded but I was without power until last Friday. Luckily, I had friends with power and an internet connection so hopefully no one was missing my support.

I think at this point, you should email me so we can dig deeper. I'm wondering whether the NFS mount is not being reported as a network drive.
Mr_Noodle
Site Admin
 
Posts: 11951
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I would be interested in any update on this.

Whilst not the same issue, I am seeing metadata issues on NFS files
QuaCKeReD
 
Posts: 8
Joined: Thu Nov 29, 2012 12:47 pm

That's a different issue. I could be misremembering but I don't think Spotlight metadata is supported on NFS volumes so you can't really access any attributes which require Spotlight.
Mr_Noodle
Site Admin
 
Posts: 11951
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support