Jump to content

Access to the path is denied


Recommended Posts

Posted (edited)
 

Had a server crash the other day and restarted it.  Everything came back up and all the files are still there but noticed that it was no longer populating images for new shows or metadata.

I did have to clear the temp database files but still not populating . Getting errors that seem obvious but I haven't changed anything bunch of different errors like:

 

2021-11-24 08:45:44.543 Error App: Error checking for application updates.
	*** Error Report ***
	Version: 4.6.7.0
	Command line: C:\Users\jriker1\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
	Operating system: Microsoft Windows 10.0.14393
	Framework: .NET Core 3.1.21
	OS/Process: x64/x64
	Runtime: C:/Users/jriker1/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
	Processor count: 24
	Data path: C:\Users\jriker1\AppData\Roaming\Emby-Server\programdata
	Application path: C:\Users\jriker1\AppData\Roaming\Emby-Server\system
	System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path 'E:\Emby\EmbyCache\cache\httpclient\0fb243ded9649ae6d18059c674a4ae00' is denied.
	   at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
	   at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
	   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
	   at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileStream(String path, FileOpenMode mode, FileAccessMode access, FileShareMode share, Int32 bufferSize, FileOpenOptions fileOpenOptions)
	   at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileStream(String path, FileOpenMode mode, FileAccessMode access, FileShareMode share, FileOpenOptions fileOpenOptions)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.CacheResponse(HttpResponseInfo response, String responseCachePath)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
	   at MediaBrowser.Common.Updates.GithubUpdater.CheckForUpdateResult(String organzation, String repository, Version minVersion, PackageVersionClass updateLevel, String assetFilename, String packageName, String targetFilename, TimeSpan cacheLength, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.ApplicationHost.CheckForApplicationUpdate(CancellationToken cancellationToken, IProgress`1 progress)
	   at Emby.Server.Implementations.ScheduledTasks.SystemUpdateTask.Execute(CancellationToken cancellationToken, IProgress`1 progress)
	Source: System.Private.CoreLib
	TargetSite: Microsoft.Win32.SafeHandles.SafeFileHandle ValidateFileHandle(Microsoft.Win32.SafeHandles.SafeFileHandle)
	

 

2021-11-24 08:46:52.133 Error App: Error in TheTVDB
	*** Error Report ***
	Version: 4.6.7.0
	Command line: C:\Users\jriker1\AppData\Roaming\Emby-Server\system\EmbyServer.dll -noautorunwebapp
	Operating system: Microsoft Windows 10.0.14393
	Framework: .NET Core 3.1.21
	OS/Process: x64/x64
	Runtime: C:/Users/jriker1/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
	Processor count: 24
	Data path: C:\Users\jriker1\AppData\Roaming\Emby-Server\programdata
	Application path: C:\Users\jriker1\AppData\Roaming\Emby-Server\system
	System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path 'E:\Emby\EmbyCache\cache\tvdb\70328\actors.xml' is denied.
	   at System.IO.FileSystem.DeleteFile(String fullPath)
	   at Tvdb.TvdbSeriesProvider.DeleteXmlFiles(String path)
	   at Tvdb.TvdbSeriesProvider.DownloadSeriesZip(String seriesId, String idType, String seriesName, Nullable`1 seriesYear, String seriesDataPath, Nullable`1 lastTvDbUpdateTime, String preferredMetadataLanguage, String saveAsMetadataLanguage, CancellationToken cancellationToken)
	   at Tvdb.TvdbSeriesProvider.DownloadSeriesZip(String seriesId, String idType, String seriesName, Nullable`1 seriesYear, String seriesDataPath, Nullable`1 lastTvDbUpdateTime, String preferredMetadataLanguage, CancellationToken cancellationToken)
	   at Tvdb.TvdbSeriesProvider.EnsureSeriesInfo(Dictionary`2 seriesProviderIds, String seriesName, Nullable`1 seriesYear, String preferredMetadataLanguage, CancellationToken cancellationToken)
	   at Tvdb.TvdbEpisodeProvider.GetMetadata(EpisodeInfo searchInfo, CancellationToken cancellationToken)
	   at MediaBrowser.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(BaseItem originalItem, MetadataResult`1 temp, LibraryOptions libraryOptions, String logName, TIdType id, IEnumerable`1 providers, CancellationToken cancellationToken)
	Source: System.IO.FileSystem
	TargetSite: Void DeleteFile(System.String)


On Emby Windows 4.6.7.0.  

 

To catch one item preemtively, my Windows Version is Windows 2016 R2 Server and not a dated version of Windows 10. 

Also note when I look at the EmbyServer and embytray.exe both are running as jriker which is the admin of the box.

 

Edited by jriker1
Posted

Hi, looks like you configured a custom cache folder, but did not sure that the server would have write access to it.

Please either resolve this, or set the cache folder option back to default by blanking it out.

Posted (edited)

May not have posted it, but I have had that custom path for years now.  I can try and "resolve" it but doesn't make sense it's an issue in the first place.  Something recently happened with an Emby update or something from what I can see as having these permission issues lately and also database issues where if I cleanly reboot the computer the database is screwed up and have to manually delete the temp files also.  Like:

 

2021-11-26 12:35:25.238 Error Server: Error processing request
    *** Error Report ***
    Version: 4.6.7.0
    Command line: C:\Users\jriker1\AppData\Roaming\Emby-Server\system\EmbyServer.dll
    Operating system: Microsoft Windows 10.0.14393
    Framework: .NET Core 3.1.21
    OS/Process: x64/x64
    Runtime: C:/Users/jriker1/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
    Processor count: 24
    Data path: C:\Users\jriker1\AppData\Roaming\Emby-Server\programdata
    Application path: C:\Users\jriker1\AppData\Roaming\Emby-Server\system
    SQLitePCL.pretty.SQLiteException: Busy: database is locked
    SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
       at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
       at SQLitePCL.pretty.StatementImpl.MoveNext()
       at Emby.Server.Implementations.Data.SqliteUserDataRepository.SaveUserData(Int64 internalUserId, Int64 itemId, UserItemData userData, CancellationToken cancellationToken)
       at Emby.Server.Implementations.Library.UserDataManager.SaveUserData(User user, BaseItem item, UserItemData userData, UserDataSaveReason reason, CancellationToken cancellationToken)
       at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(User user, BaseItem item, PlaybackProgressInfo info, SessionInfo sessionInfo)
       at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
       at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task)
       at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
       at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
    Source: SQLitePCL.pretty
    TargetSite: Void CheckOk(SQLitePCLEx.sqlite3, Int32)

 

Never had these kind of items we will say weeks ago.

 

Plus when deleting files get errors removing the record from Emby that usually again is tied to DB issues which weren't there before:

2021-11-26 12:19:01.702 Error Server: Error processing request
    *** Error Report ***
    Version: 4.6.7.0
    Command line: C:\Users\jriker1\AppData\Roaming\Emby-Server\system\EmbyServer.dll
    Operating system: Microsoft Windows 10.0.14393
    Framework: .NET Core 3.1.21
    OS/Process: x64/x64
    Runtime: C:/Users/jriker1/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
    Processor count: 24
    Data path: C:\Users\jriker1\AppData\Roaming\Emby-Server\programdata
    Application path: C:\Users\jriker1\AppData\Roaming\Emby-Server\system
    SQLitePCL.pretty.SQLiteException: Busy: database is locked
    SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
       at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
       at SQLitePCL.pretty.StatementImpl.MoveNext()
       at Emby.Server.Implementations.Data.SqliteItemRepository.ExecuteWithStringFormatParam(IDatabaseConnection db, String query, String valueText, Int64[] values)
       at Emby.Server.Implementations.Data.SqliteItemRepository.DeleteItemsInTransaction(IDatabaseConnection db, Int64[] ids, Boolean containsFolders, Boolean supportsPeople, Boolean supportsChapters, Boolean supportsCollections, Boolean supportsMediaStreams, Boolean supportsListItems, Boolean supportsExternalDatabases)
       at Emby.Server.Implementations.Data.SqliteItemRepository.DeleteItemsInChunks(Int64[] ids, IDatabaseConnection db, Boolean containsFolders, Boolean supportsPeople, Boolean supportsChapters, Boolean supportsCollections, Boolean supportsMediaStreams, Boolean supportsListItems, Boolean supportsExternalDatabases)
       at Emby.Server.Implementations.Data.SqliteItemRepository.DeleteItems(Int64[] ids)
       at Emby.Server.Implementations.Data.SqliteItemRepository.DeleteItems(BaseItem[] items)
       at Emby.Server.Implementations.Library.LibraryManager.DeleteItem(BaseItem item, DeleteOptions options, BaseItem parent, Boolean notifyParentItem)
       at Emby.Server.Implementations.Library.LibraryManager.DeleteItem(BaseItem item, DeleteOptions options, Boolean notifyParentItem)
       at MediaBrowser.Api.Library.LibraryService.Delete(DeleteItems request)
       at MediaBrowser.Api.Library.LibraryService.Delete(DeleteItem request)
       at Emby.Server.Implementations.Services.ServiceController.<>c__DisplayClass6_0.<VoidActionDelegate>b__0(Object service, Object request)
       at Emby.Server.Implementations.Services.ServiceController.Execute(HttpListenerHost appHost, Object requestDto, IRequest req)
       at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
       at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
    Source: SQLitePCL.pretty
    TargetSite: Void CheckOk(SQLitePCLEx.sqlite3, Int32)

 

Of course not sure how "Emby" deals with restarting before or now when a computer restarts.  Since Emby doesn't run as a service have to start it with a scheduled task on startup but beyond that, not sure if there are database cleanup issues or shutdown issues.

 

JR

Edited by jriker1
Posted
2 hours ago, jriker1 said:

May not have posted it, but I have had that custom path for years now.  I can try and "resolve" it but doesn't make sense it's an issue in the first place.  Something recently happened with an Emby update or something from what I can see as having these permission issues lately and also database issues where if I cleanly reboot the computer the database is screwed up and have to manually delete the temp files also.  Like:

 

2021-11-26 12:35:25.238 Error Server: Error processing request
    *** Error Report ***
    Version: 4.6.7.0
    Command line: C:\Users\jriker1\AppData\Roaming\Emby-Server\system\EmbyServer.dll
    Operating system: Microsoft Windows 10.0.14393
    Framework: .NET Core 3.1.21
    OS/Process: x64/x64
    Runtime: C:/Users/jriker1/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
    Processor count: 24
    Data path: C:\Users\jriker1\AppData\Roaming\Emby-Server\programdata
    Application path: C:\Users\jriker1\AppData\Roaming\Emby-Server\system
    SQLitePCL.pretty.SQLiteException: Busy: database is locked
    SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
       at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
       at SQLitePCL.pretty.StatementImpl.MoveNext()
       at Emby.Server.Implementations.Data.SqliteUserDataRepository.SaveUserData(Int64 internalUserId, Int64 itemId, UserItemData userData, CancellationToken cancellationToken)
       at Emby.Server.Implementations.Library.UserDataManager.SaveUserData(User user, BaseItem item, UserItemData userData, UserDataSaveReason reason, CancellationToken cancellationToken)
       at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(User user, BaseItem item, PlaybackProgressInfo info, SessionInfo sessionInfo)
       at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
       at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task)
       at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
       at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
    Source: SQLitePCL.pretty
    TargetSite: Void CheckOk(SQLitePCLEx.sqlite3, Int32)

 

Never had these kind of items we will say weeks ago.

 

Plus when deleting files get errors removing the record from Emby that usually again is tied to DB issues which weren't there before:

2021-11-26 12:19:01.702 Error Server: Error processing request
    *** Error Report ***
    Version: 4.6.7.0
    Command line: C:\Users\jriker1\AppData\Roaming\Emby-Server\system\EmbyServer.dll
    Operating system: Microsoft Windows 10.0.14393
    Framework: .NET Core 3.1.21
    OS/Process: x64/x64
    Runtime: C:/Users/jriker1/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
    Processor count: 24
    Data path: C:\Users\jriker1\AppData\Roaming\Emby-Server\programdata
    Application path: C:\Users\jriker1\AppData\Roaming\Emby-Server\system
    SQLitePCL.pretty.SQLiteException: Busy: database is locked
    SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
       at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
       at SQLitePCL.pretty.StatementImpl.MoveNext()
       at Emby.Server.Implementations.Data.SqliteItemRepository.ExecuteWithStringFormatParam(IDatabaseConnection db, String query, String valueText, Int64[] values)
       at Emby.Server.Implementations.Data.SqliteItemRepository.DeleteItemsInTransaction(IDatabaseConnection db, Int64[] ids, Boolean containsFolders, Boolean supportsPeople, Boolean supportsChapters, Boolean supportsCollections, Boolean supportsMediaStreams, Boolean supportsListItems, Boolean supportsExternalDatabases)
       at Emby.Server.Implementations.Data.SqliteItemRepository.DeleteItemsInChunks(Int64[] ids, IDatabaseConnection db, Boolean containsFolders, Boolean supportsPeople, Boolean supportsChapters, Boolean supportsCollections, Boolean supportsMediaStreams, Boolean supportsListItems, Boolean supportsExternalDatabases)
       at Emby.Server.Implementations.Data.SqliteItemRepository.DeleteItems(Int64[] ids)
       at Emby.Server.Implementations.Data.SqliteItemRepository.DeleteItems(BaseItem[] items)
       at Emby.Server.Implementations.Library.LibraryManager.DeleteItem(BaseItem item, DeleteOptions options, BaseItem parent, Boolean notifyParentItem)
       at Emby.Server.Implementations.Library.LibraryManager.DeleteItem(BaseItem item, DeleteOptions options, Boolean notifyParentItem)
       at MediaBrowser.Api.Library.LibraryService.Delete(DeleteItems request)
       at MediaBrowser.Api.Library.LibraryService.Delete(DeleteItem request)
       at Emby.Server.Implementations.Services.ServiceController.<>c__DisplayClass6_0.<VoidActionDelegate>b__0(Object service, Object request)
       at Emby.Server.Implementations.Services.ServiceController.Execute(HttpListenerHost appHost, Object requestDto, IRequest req)
       at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
       at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
    Source: SQLitePCL.pretty
    TargetSite: Void CheckOk(SQLitePCLEx.sqlite3, Int32)

 

Of course not sure how "Emby" deals with restarting before or now when a computer restarts.  Since Emby doesn't run as a service have to start it with a scheduled task on startup but beyond that, not sure if there are database cleanup issues or shutdown issues.

 

JR

Hi, please go through the steps in this article and let us know if it helps:

https://support.emby.media/support/solutions/articles/44002210894-corrupt-database

Thanks.

Posted

Hi, looking at these different issues it would seem like something at the host level has changed.
I'd check permissions for all Emby locations and paths used outside the normal areas like your cache directory.  Make sure the user running Emby Server has read/write if not ownership permissions.  Same with any locations where media stored that Emby is pointed to in your different Libraries.

If you have a backup of your data directory you could replace the files there with the backup (then check permissions) or follow the knowledge base article to repair the library.db file.
There are several steps you can try to fix the SQL errors from easy to moderate to a complete file rebuild but it's simple and easy to do following the instructions given.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...