CBers 6766 Posted November 13, 2015 Share Posted November 13, 2015 (edited) Every day I'm getting a notification that the "Cache file cleanup" task has failed with: Access to the path 'C:\Users\Media\AppData\Roaming\MediaBrowser-Server\cache\temp1\a094fb5ea40d4803bf8925493da49239.JPG' is denied. From the server log: 2015-11-13 16:41:48.5551 Info - App: Executing Cache file cleanup 2015-11-13 16:41:49.5412 Info - App: IntervalTrigger fired for task: Log file cleanup 2015-11-13 16:41:49.5412 Info - App: Queueing task DeleteLogFileTask 2015-11-13 16:41:59.9587 Error - App: Error *** Error Report *** Version: 3.0.5781.1 Command line: C:\Users\Media\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1 Processor count: 4 64-Bit OS: True 64-Bit Process: False Program data path: C:\Users\Media\AppData\Roaming\MediaBrowser-Server Application Path: C:\Users\Media\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe Access to the path 'C:\Users\Media\AppData\Roaming\MediaBrowser-Server\cache\temp1\a094fb5ea40d4803bf8925493da49239.JPG' is denied. System.UnauthorizedAccessException at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.InternalDelete(String path, Boolean checkHost) at System.IO.File.Delete(String path) at CommonIO.ManagedFileSystem.DeleteFile(String path) at MediaBrowser.Common.Implementations.ScheduledTasks.Tasks.DeleteCacheFileTask.DeleteFile(String path) at MediaBrowser.Common.Implementations.ScheduledTasks.Tasks.DeleteCacheFileTask.DeleteCacheFilesFromDirectory(CancellationToken cancellationToken, String directory, DateTime minDateModified, IProgress`1 progress) at MediaBrowser.Common.Implementations.ScheduledTasks.Tasks.DeleteCacheFileTask.Execute(CancellationToken cancellationToken, IProgress`1 progress) at MediaBrowser.Common.Implementations.ScheduledTasks.ScheduledTaskWorker.<ExecuteInternal>d__c.MoveNext() 2015-11-13 16:41:59.9587 Info - App: Cache file cleanup Failed after 0 minute(s) and 11 seconds Yeaterday's log has the same: 2015-11-12 16:41:36.5716 Info - App: Executing Cache file cleanup 2015-11-12 16:41:37.0596 Info - App: IntervalTrigger fired for task: Log file cleanup 2015-11-12 16:41:37.0596 Info - App: Queueing task DeleteLogFileTask 2015-11-12 16:41:48.5413 Error - App: Error *** Error Report *** Version: 3.0.5781.1 Command line: C:\Users\Media\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1 Processor count: 4 64-Bit OS: True 64-Bit Process: False Program data path: C:\Users\Media\AppData\Roaming\MediaBrowser-Server Application Path: C:\Users\Media\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe Access to the path 'C:\Users\Media\AppData\Roaming\MediaBrowser-Server\cache\temp1\a094fb5ea40d4803bf8925493da49239.JPG' is denied. System.UnauthorizedAccessException at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.InternalDelete(String path, Boolean checkHost) at System.IO.File.Delete(String path) at CommonIO.ManagedFileSystem.DeleteFile(String path) at MediaBrowser.Common.Implementations.ScheduledTasks.Tasks.DeleteCacheFileTask.DeleteFile(String path) at MediaBrowser.Common.Implementations.ScheduledTasks.Tasks.DeleteCacheFileTask.DeleteCacheFilesFromDirectory(CancellationToken cancellationToken, String directory, DateTime minDateModified, IProgress`1 progress) at MediaBrowser.Common.Implementations.ScheduledTasks.Tasks.DeleteCacheFileTask.Execute(CancellationToken cancellationToken, IProgress`1 progress) at MediaBrowser.Common.Implementations.ScheduledTasks.ScheduledTaskWorker.<ExecuteInternal>d__c.MoveNext() 2015-11-12 16:41:48.5413 Info - App: Cache file cleanup Failed after 0 minute(s) and 11 seconds The file in question is different each day,as when I look for it, I am able to delete without an issue. This is on my beta system, running v3.0.5781.1.Thanks. . Edited November 13, 2015 by CBers 1 Link to comment Share on other sites More sharing options...
CBers 6766 Posted November 19, 2015 Author Share Posted November 19, 2015 This is still failing on latest Beta v3.0.5781.2. Latest email notification: Access to the path 'C:\Users\Media\AppData\Roaming\MediaBrowser-Server\cache\temp\082cbbb4e8e941cf9ff70491e6eb4f3f.JPG' is denied. From the server log: 2015-11-19 16:43:25.8662 Info - App: IntervalTrigger fired for task: Cache file cleanup 2015-11-19 16:43:25.8662 Info - App: Queueing task DeleteCacheFileTask 2015-11-19 16:43:25.8662 Info - App: Executing Cache file cleanup 2015-11-19 16:43:26.4853 Info - App: IntervalTrigger fired for task: Log file cleanup 2015-11-19 16:43:26.4853 Info - App: Queueing task DeleteLogFileTask 2015-11-19 16:43:34.9178 Error - App: Error *** Error Report *** Version: 3.0.5781.2 Command line: C:\Users\Media\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1 Processor count: 4 64-Bit OS: True 64-Bit Process: False Program data path: C:\Users\Media\AppData\Roaming\MediaBrowser-Server Application Path: C:\Users\Media\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe Access to the path 'C:\Users\Media\AppData\Roaming\MediaBrowser-Server\cache\temp\082cbbb4e8e941cf9ff70491e6eb4f3f.JPG' is denied. System.UnauthorizedAccessException at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.InternalDelete(String path, Boolean checkHost) at System.IO.File.Delete(String path) at CommonIO.ManagedFileSystem.DeleteFile(String path) at MediaBrowser.Common.Implementations.ScheduledTasks.Tasks.DeleteCacheFileTask.DeleteFile(String path) at MediaBrowser.Common.Implementations.ScheduledTasks.Tasks.DeleteCacheFileTask.DeleteCacheFilesFromDirectory(CancellationToken cancellationToken, String directory, DateTime minDateModified, IProgress`1 progress) at MediaBrowser.Common.Implementations.ScheduledTasks.Tasks.DeleteCacheFileTask.Execute(CancellationToken cancellationToken, IProgress`1 progress) at MediaBrowser.Common.Implementations.ScheduledTasks.ScheduledTaskWorker.<ExecuteInternal>d__c.MoveNext() 2015-11-19 16:43:34.9178 Info - App: Cache file cleanup Failed after 0 minute(s) and 9 seconds Any ideas please ?? Link to comment Share on other sites More sharing options...
CBers 6766 Posted November 24, 2015 Author Share Posted November 24, 2015 Still getting this error every day. Latest: 2015-11-24 16:44:17.2142 Info - App: Executing Cache file cleanup 2015-11-24 16:44:17.7722 Info - App: IntervalTrigger fired for task: Log file cleanup 2015-11-24 16:44:17.7722 Info - App: Queueing task DeleteLogFileTask 2015-11-24 16:44:26.5057 Error - App: Error *** Error Report *** Version: 3.0.5781.3 Command line: C:\Users\Media\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1 Processor count: 4 64-Bit OS: True 64-Bit Process: False Program data path: C:\Users\Media\AppData\Roaming\MediaBrowser-Server Application Path: C:\Users\Media\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe Access to the path 'C:\Users\Media\AppData\Roaming\MediaBrowser-Server\cache\temp\082cbbb4e8e941cf9ff70491e6eb4f3f.JPG' is denied. System.UnauthorizedAccessException at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.InternalDelete(String path, Boolean checkHost) at System.IO.File.Delete(String path) at CommonIO.ManagedFileSystem.DeleteFile(String path) at MediaBrowser.Common.Implementations.ScheduledTasks.Tasks.DeleteCacheFileTask.DeleteFile(String path) at MediaBrowser.Common.Implementations.ScheduledTasks.Tasks.DeleteCacheFileTask.DeleteCacheFilesFromDirectory(CancellationToken cancellationToken, String directory, DateTime minDateModified, IProgress`1 progress) at MediaBrowser.Common.Implementations.ScheduledTasks.Tasks.DeleteCacheFileTask.Execute(CancellationToken cancellationToken, IProgress`1 progress) at MediaBrowser.Common.Implementations.ScheduledTasks.ScheduledTaskWorker.<ExecuteInternal>d__c.MoveNext() 2015-11-24 16:44:26.5057 Info - App: Cache file cleanup Failed after 0 minute(s) and 9 seconds I was able to delete the JPG immediately without issue. There must be a fix for this. Link to comment Share on other sites More sharing options...
scope99 7 Posted November 29, 2015 Share Posted November 29, 2015 Hi CBers I have been getting the same error message every three days or so for the last month. I am also able to delete the directory with no problems. The error occurs around 9pm every night. The only thing I can think of is that the HTPC is always running emby theater around the same time. The temp folder usually has around 3 gigabytes of photos even though as far as I know photos are not accessed by any of the users. My logs are very similar. Any idea anyone? Link to comment Share on other sites More sharing options...
scope99 7 Posted December 6, 2015 Share Posted December 6, 2015 Hi the problem is still happening. It is concerning from a security standpoint that the cache folder contains almost 3GB of photo files and users have confirmed no access. Is this normal behavior? Here is my log: 2015-12-06 20:56:25.8248 Info - App: Executing Cache file cleanup 2015-12-06 20:56:27.2413 Error - App: Error *** Error Report *** Version: 3.0.5781.4 Command line: C:\Users\x\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exe -service Operating system: Microsoft Windows NT 6.2.9200.0 Processor count: 8 64-Bit OS: True 64-Bit Process: False Program data path: C:\Users\x\AppData\Roaming\Emby-Server Application Path: C:\Users\x\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exe Access to the path 'C:\Users\x\AppData\Roaming\Emby-Server\cache\temp\02ad47f66e054a43b1ae20f969f58757.JPG' is denied. System.UnauthorizedAccessException at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.InternalDelete(String path, Boolean checkHost) at System.IO.File.Delete(String path) at CommonIO.ManagedFileSystem.DeleteFile(String path) at MediaBrowser.Common.Implementations.ScheduledTasks.Tasks.DeleteCacheFileTask.DeleteFile(String path) at MediaBrowser.Common.Implementations.ScheduledTasks.Tasks.DeleteCacheFileTask.DeleteCacheFilesFromDirectory(CancellationToken cancellationToken, String directory, DateTime minDateModified, IProgress`1 progress) at MediaBrowser.Common.Implementations.ScheduledTasks.Tasks.DeleteCacheFileTask.Execute(CancellationToken cancellationToken, IProgress`1 progress) at MediaBrowser.Common.Implementations.ScheduledTasks.ScheduledTaskWorker.<ExecuteInternal>d__c.MoveNext() 2015-12-06 20:56:27.2413 Info - App: Cache file cleanup Failed after 0 minute(s) and 1 seconds So CBers exactly the same as yours. Have you found out what was causing the issue? Link to comment Share on other sites More sharing options...
CBers 6766 Posted December 6, 2015 Author Share Posted December 6, 2015 @@scope99 - No solution as yet. I think the timing is related to the Cache File Cleanup scheduled task, which in my case runs at 16:45 each day. Link to comment Share on other sites More sharing options...
scope99 7 Posted December 6, 2015 Share Posted December 6, 2015 @@CBers - The timing is a good point. I have set the task to run at 3.00am each morning, potentially avoiding conflicts with open apps on other computers, if this is the problem. It seems to only fail every 3-5 days not everyday though. Link to comment Share on other sites More sharing options...
Happy2Play 8242 Posted December 6, 2015 Share Posted December 6, 2015 @@CBers - The timing is a good point. I have set the task to run at 3.00am each morning, potentially avoiding conflicts with open apps on other computers, if this is the problem. It seems to only fail every 3-5 days not everyday though. How did you change that task when it is not list in Scheduled Tasks? Link to comment Share on other sites More sharing options...
scope99 7 Posted December 7, 2015 Share Posted December 7, 2015 How did you change that task when it is not list in Scheduled Tasks? Sorry newbie error I assumed it was the Clean Database task. My bad. Link to comment Share on other sites More sharing options...
AdrianW 1052 Posted August 26, 2020 Share Posted August 26, 2020 I've been ignoring this error for months (probably years) - but I'm still getting "Cache file cleanup failed" errors every day. It insists on running at around 4am every morning when everything (including my NAS) is switched off. It's gradually moving a few seconds later each day - so I suppose after about a decade it might actually end up running at a time when my NAS is on. There should be config for ALL scheduled tasks. Link to comment Share on other sites More sharing options...
Luke 37007 Posted August 26, 2020 Share Posted August 26, 2020 Server log? Link to comment Share on other sites More sharing options...
AdrianW 1052 Posted August 27, 2020 Share Posted August 27, 2020 Log - reported as failing at 03:59:04 Link to comment Share on other sites More sharing options...
Happy2Play 8242 Posted August 27, 2020 Share Posted August 27, 2020 (edited) 14 minutes ago, AdrianW said: Log - reported as failing at 03:59:04 This log does not cover the time for the scheduled task Quote 2020-08-27 01:01:32.181 Info TaskManager: Daily trigger for Remove Old Cached Data set to fire at 08/27/2020 23:00:00 but there would appear to be this error in this log though I am guessing this path no longer exists but not positive on what custom path that is for. TaskManager: Error *** Error Report *** Version: 4.5.0.21 Command line: C:\Users\Adrian\AppData\Roaming\MediaBrowser-Server\system\EmbyServer.dll -noautorunwebapp Operating system: Microsoft Windows 10.0.18363 Framework: .NET Core 3.1.7 OS/Process: x64/x64 Runtime: C:/Users/Adrian/AppData/Roaming/MediaBrowser-Server/system/System.Private.CoreLib.dll Processor count: 4 Data path: C:\Users\Adrian\AppData\Roaming\MediaBrowser-Server Application path: C:\Users\Adrian\AppData\Roaming\MediaBrowser-Server\system System.IO.IOException: System.IO.IOException: The network path was not found. : '\\KANAME\Video\Other\ImagesByNameMB3\metadata\temp' at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound) at System.IO.Enumeration.FileSystemEnumerator`1.Init() at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized) at System.IO.Enumeration.FileSystemEnumerableFactory.FileInfos(String directory, String expression, EnumerationOptions options, Boolean isNormalized) at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options) at Emby.Server.Implementations.IO.ManagedFileSystem.GetFiles(String path, String[] extensions, Boolean enableCaseSensitiveExtensions, Boolean recursive) at Emby.Server.Implementations.IO.ManagedFileSystem.GetFiles(String path, Boolean recursive) at Emby.Server.Implementations.ScheduledTasks.Tasks.DeleteCacheFileTask.DeleteCacheFilesFromDirectory(CancellationToken cancellationToken, String directory, DateTimeOffset minDateModified, IProgress`1 progress) at Emby.Server.Implementations.ScheduledTasks.Tasks.DeleteCacheFileTask.Execute(CancellationToken cancellationToken, IProgress`1 progress) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options) Source: System.IO.FileSystem TargetSite: IntPtr CreateDirectoryHandle(System.String, Boolean) OT: This is a really old installation Data path: C:\Users\Adrian\AppData\Roaming\MediaBrowser-Server Edited August 27, 2020 by Happy2Play Link to comment Share on other sites More sharing options...
AdrianW 1052 Posted August 27, 2020 Share Posted August 27, 2020 (edited) 54 minutes ago, Happy2Play said: This log does not cover the time for the scheduled task It does - that's the log from midnight last night until this morning. The error occurs around 3:59am. \\kaname is my NAS which is switched off in the middle of the night. That's why I don't want scheduled tasks running in the middle of the night. Edited August 27, 2020 by AdrianW Link to comment Share on other sites More sharing options...
Happy2Play 8242 Posted August 27, 2020 Share Posted August 27, 2020 (edited) Sounds like you will need to adjust the task to run when your nas is online. Now this is a hidden task that is only visible via the API. So you would have to adjust it there. Edited August 27, 2020 by Happy2Play Link to comment Share on other sites More sharing options...
AdrianW 1052 Posted August 27, 2020 Share Posted August 27, 2020 2 minutes ago, Happy2Play said: Now this is a hidden task that is only visible via the API. So you would have to adjust it there. Somebody mentioned that previously - but I've no idea how to do that. And why would there be "hidden" tasks? It's not very user friendly if you can't easily reschedule them. Link to comment Share on other sites More sharing options...
Happy2Play 8242 Posted August 27, 2020 Share Posted August 27, 2020 Just now, AdrianW said: Somebody mentioned that previously - but I've no idea how to do that. And why would there be "hidden" tasks? It's not very user friendly if you can't easily reschedule them. Will do some searching in a bit but to many people disable key task and complain when they don't work properly. There is a easy way to modify any task and use a existing custom trigger and rename to proper task id. (In the middle of cooking dinner so will get back to you with a step by step.) Link to comment Share on other sites More sharing options...
AdrianW 1052 Posted August 27, 2020 Share Posted August 27, 2020 4 minutes ago, Happy2Play said: There is a easy way to modify any task and use a existing custom trigger and rename to proper task id. (In the middle of cooking dinner so will get back to you with a step by step. Thanks. Just going to get a morning coffee and an English muffin. Link to comment Share on other sites More sharing options...
Happy2Play 8242 Posted August 27, 2020 Share Posted August 27, 2020 @AdrianW Hmm not sure why renaming a custom task is not working, when do you want this task to run? Link to comment Share on other sites More sharing options...
AdrianW 1052 Posted August 28, 2020 Share Posted August 28, 2020 3 hours ago, Happy2Play said: @AdrianW Hmm not sure why renaming a custom task is not working, when do you want this task to run? I think 4pm would be good. Link to comment Share on other sites More sharing options...
Happy2Play 8242 Posted August 28, 2020 Share Posted August 28, 2020 5 minutes ago, AdrianW said: I think 4pm would be good. You would go to API ScheduledTaskService, then /ScheduledTasks/{Id}/Triggers, click try it out, enter id 241d4fcb19a1d557ee62428e411da609, and code below in the request body and execute. [ { "Type": "DailyTrigger", "TimeOfDayTicks": 576000000000, } ] Will look like this This will change the task trigger to run at 4pm daily. 1 Link to comment Share on other sites More sharing options...
AdrianW 1052 Posted August 28, 2020 Share Posted August 28, 2020 17 minutes ago, Happy2Play said: You would go to API ScheduledTaskService All the tasks are locked: Clicking the Authorize button shows this: Do I need to create an API key? I tried creating one named "api_key" and then "apikeyauth" - but neither of those worked. Link to comment Share on other sites More sharing options...
Happy2Play 8242 Posted August 28, 2020 Share Posted August 28, 2020 1 minute ago, AdrianW said: All the tasks are locked: Clicking the Authorize button shows this: Do I need to create an API key? I tried creating one named "api_key" and then "apikeyauth" - but neither of those worked. Yes the endpoint is locked, but when you click on one you can try it correct? No you do not need to generate a api key as the server already does that when you click the API link. Link to comment Share on other sites More sharing options...
AdrianW 1052 Posted August 28, 2020 Share Posted August 28, 2020 (edited) I tried using the ticks value of 34200000000 (9:30am) - and it just went past 9:30 and doesn't appear to have run. Log. Edited August 28, 2020 by AdrianW Link to comment Share on other sites More sharing options...
Happy2Play 8242 Posted August 28, 2020 Share Posted August 28, 2020 4 minutes ago, AdrianW said: I tried using the ticks value of 34200000000 (9:30am) - and it just went past 9:30 and doesn't appear to have run. Log. But 9:30 am is 342000000000, you are missing a zero. 2020-08-28 08:23:35.865 Info TaskManager: Daily trigger for Remove Old Cached Data set to fire at 08/28/2020 23:00:00 Hmm I do not see the same description in my log 2020-08-27 18:46:01.016 Info TaskManager: Daily trigger for Cache file cleanup set to fire at 08/28/2020 09:30:00 @Luke are these the same tasks? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now