Jump to content

Emby as a service with NSSM, could't find path by RaiDrive


brucmao
Go to solution Solved by Happy2Play,

Recommended Posts

brucmao

I'm using Windows 11 as my operating system and logging in with a Microsoft account. Previously, I had set up Emby Server to start automatically at boot time, but after the Windows 11 update, Emby Server no longer starts up when I haven't logged in. To fix this, I used NSSM software to register Emby Server as a service and set the same Microsoft account for the Log on settings. Now, Emby Server can run before I log in, but it's unable to play media. After checking the Emby Server logs, I found that it couldn't find the path. I'm using RaidDriver to mount the aliyun cloud as a network driver.

2024-03-16 09:34:26.304 Info Server: http/1.1 Response 404 to host1. Time: 3ms. GET http://host2/emby/videos/186557/stream.mkv?DeviceId=4c6e9b3f-3c5e-41b1-af55-990cc44373f3&MediaSourceId=abfa913b5cf1b0d8a129a7add578743b&Static=true&PlaySessionId=b3db5c243993435192b075e26803a862&api_key=x_secret1_x
2024-03-16 09:34:26.308 Info Server: http/1.1 GET http://host2/emby/videos/186557/stream.mkv?DeviceId=4c6e9b3f-3c5e-41b1-af55-990cc44373f3&MediaSourceId=abfa913b5cf1b0d8a129a7add578743b&Static=true&PlaySessionId=b3db5c243993435192b075e26803a862&api_key=x_secret1_x. Accept=*/*, Connection=close, Host=host2, User-Agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; Trident/7.0; rv:11.0) like Gecko, Accept-Encoding=gzip, deflate, X-Forwarded-Scheme=http, X-Forwarded-Proto=http, X-Forwarded-For=10.10.10.160, X-Real-IP=10.10.10.160, UA-CPU=AMD64
2024-03-16 09:34:26.311 Error Server: Error processing request
*** Error Report ***
Version: 4.8.3.0
Command line: C:\Users\bruce\AppData\Roaming\Emby-Server\system\EmbyServer.dll -service
Operating system: Microsoft Windows 10.0.22631
Framework: .NET 6.0.27
OS/Process: x64/x64
Runtime: C:/Users/bruce/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
Processor count: 16
Data path: C:\Users\bruce\AppData\Roaming\Emby-Server\programdata
Application path: C:\Users\bruce\AppData\Roaming\Emby-Server\system
System.IO.DirectoryNotFoundException: System.IO.DirectoryNotFoundException: Could not find a part of the path 'X:\aliyun\Anime\TV\Other\Jujutsu Kaisen (2020)\S01\Jujutsu.Kaisen.S01E42.2160p.WEB-DL.H264.AAC.mkv'.
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
at System.IO.FileStream..ctor(String path, FileStreamOptions options)
at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileStream(String path, FileOpenMode mode, FileAccessMode access, FileShareMode share, Int32 bufferSize, FileOpenOptions fileOpenOptions, Int64 preAllocationSize)
at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileStream(String path, FileOpenMode mode, FileAccessMode access, FileShareMode share, Int32 bufferSize, FileOpenOptions fileOpenOptions)
at Emby.Server.Implementations.IO.IOManager.GetResponse(HttpRequestOptions options, MediaProtocol protocol)
at Emby.Server.Implementations.IO.IOManager.GetResponse(HttpRequestOptions options)
at Emby.Server.Implementations.HttpServer.HttpResultFactory.GetContent(StaticFileResultOptions options, Int64 offset, Int64 length, CancellationToken cancellationToken)
at Emby.Server.Implementations.HttpServer.FileWriter.SetContentResponseHeaders(Nullable`1 reportedTotalContentLength, CancellationToken cancellationToken)
at Emby.Server.Implementations.HttpServer.HttpResultFactory.GetStaticResult(IRequest requestContext, StaticResultOptions options)
at Emby.Server.MediaEncoding.Api.Progressive.BaseProgressiveStreamingService.ProcessRequest(StreamRequest request, Boolean isHeadRequest)
at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task)
at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost httpHost, IServerApplicationHost appHost, IRequest httpReq, IResponse httpRes, IStreamHelper streamHelper, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
Source: System.Private.CoreLib
TargetSite: Microsoft.Win32.SafeHandles.SafeFileHandle CreateFile(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, System.IO.FileOptions)
 
Link to comment
Share on other sites

Hello brucmao,

** This is an auto reply **

Please wait for someone from staff support or our members to reply to you.

It's recommended to provide more info, as it explain in this thread:


Thank you.

Emby Team

Link to comment
Share on other sites

Hi, you need to ensure that the windows user account that you configured to run the windows service has permission to access that folder.

Link to comment
Share on other sites

brucmao
1 hour ago, Luke said:

Hi, you need to ensure that the windows user account that you configured to run the windows service has permission to access that folder.

I am currently logged in as a user who can directly access these paths. The user configured for Emby in NSSM and the user I am currently logged in as are the same account, a Microsoft online user example@live.com.

Link to comment
Share on other sites

7 minutes ago, brucmao said:

I am currently logged in as a user who can directly access these paths. The user configured for Emby in NSSM and the user I am currently logged in as are the same account, a Microsoft online user example@live.com.

Ok but nonetheless, something is preventing access to that folder. Emby Server is getting an error from the operating system when trying to access it. I can't you why because the answer to that is specific to your environment, but something is causing it to be unreachable.

The two most likely causes are going to be either the drive was offline at the time, or some kind of permissions problem.

Link to comment
Share on other sites

jaycedk

Can you check the service.

And confirm that the service it using the user that can access media files.

image.png.548f8a8f284c3d34ca7171a0b62694dd.png

Link to comment
Share on other sites

brucmao
26 minutes ago, jaycedk said:

Can you check the service.

And confirm that the service it using the user that can access media files.

image.png.548f8a8f284c3d34ca7171a0b62694dd.png

image.thumb.png.b69deec99c54523d0983ba449ada1a15.png

 

This user is the user I am currently logged into the system with. I also think it may be a permissions or user credentials issue. I have tried using a high-privilege user like Administrator but still cannot see these mounted drives. I asked chatgpt, and it suggested using UNC paths instead of mounting as local drives.

Link to comment
Share on other sites

brucmao

I found a similar issue online, and the final solution was to use the Administrator account, disable UAC, and map the network drive using the Administrator account in File Explorer.

Link to comment
Share on other sites

  • Solution
Happy2Play

Yes there are lots of quirks using MS accounts for logins.  Personally still don't use them and stick with local accounts.

Link to comment
Share on other sites

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...