Jump to content

Error when running emby as service


Recommended Posts

Guest Jaqo3000
Posted (edited)

Hi 

I just tried to run Emby as a service and I used the NSSM recommendation and I got the server to start. Problem is I get this error when I try to play any media (All my Media is on NAS connecting to the laptop running Emby on internal network) "No compatible streams are currently available. Please try again later or contact your system administrator for details." I understand this error is  due to access issue.

1- the NAS admin account is different from the Emby account and different from the account I use to log into my laptop

2- I mapped the NAS media folders (shared folders) into my Windows after logging with the NAS account. pretty standard thing

3- I added the media to Emby server and it plays fine when Emby is starting as an app. no issues of what so ever.

question is, is that really an access issue ? if yes, how do I grant Emby service access to the media folders?  log is attached

I searched here and on internet but no particular solution

thanks in advance

 

Edited by Abobader
As requested, remove the log file
Neminem
Posted (edited)

It looks like the user running emby service cant reach your nas.

2025-03-01 10:14:30.190 Info LibraryMonitor: Skipping realtime monitor for \\********\movies because the path is currently not available
2025-03-01 10:14:30.321 Info LibraryMonitor: Skipping realtime monitor for \\********\music because the path is currently not available
2025-03-01 10:14:30.455 Info LibraryMonitor: Skipping realtime monitor for \\********\personal\Study\EC-Council\Courses because the path is currently not available
2025-03-01 10:14:30.588 Info LibraryMonitor: Skipping realtime monitor for \\********\photos_videos\Photos because the path is currently not available
2025-03-01 10:14:30.728 Info LibraryMonitor: Skipping realtime monitor for \\********\photos_videos\Videos because the path is currently not available
2025-03-01 10:14:30.868 Info LibraryMonitor: Skipping realtime monitor for \\********\tv_shows because the path is currently not available

 

And you have user / password error using UNC path

2025-03-01 10:14:35.091 Error Server: Error processing request
    *** Error Report ***
    Version: 4.8.10.0
    Command line: C:\Users\<user name>\AppData\Roaming\Emby-Server\system\EmbyServer.dll -service
    Operating system: Microsoft Windows 10.0.22631
    Framework: .NET 6.0.33
    OS/Process: x64/x64
    Runtime: C:/Users/<user name>/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
    Processor count: 8
    Data path: C:\Users\<user name>\AppData\Roaming\Emby-Server\programdata
    Application path: C:\Users\<user name>\AppData\Roaming\Emby-Server\system
    System.IO.IOException: System.IO.IOException: The user name or password is incorrect. : '\\********\movies\Inside_Llewyn_Davis_(2013)\Inside_Llewyn_Davis_(2013)-fanart.jpg'
       at Emby.Drawing.Skia.SkiaEncoder.GetTempFile(String path)
       at Emby.Drawing.Skia.SkiaEncoder.GetSKFileStream(String path)
       at Emby.Drawing.Skia.SkiaEncoder.EncodeImage(String inputPath, String outputPath, Boolean autoOrient, Nullable`1 orientation, Int32 quality, ImageProcessingOptions options, ImageFormat selectedOutputFormat)
       at Emby.Drawing.ImageProcessor.ProcessImage(ImageProcessingOptions options, CancellationToken cancellationToken)
       at Emby.Api.Images.ImageService.GetImage(ImageRequest request, Int64 itemId, BaseItem item, 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: Emby.Drawing.Skia
    TargetSite: System.String GetTempFile(System.String)
    Path: \\********\movies\Inside_Llewyn_Davis_(2013)\Inside_Llewyn_Davis_(2013)-fanart.jpg

Edited by Abobader
Removing the local IP address as request from OP
Guest Jaqo3000
Posted

Hi Neminem

thanks for your reply. that is correct. I could see that in the log. so these are two different users and I could see that the Emby service is not able to access the NAS due to different accounts. I can't use log on option in the service either because the NAS user doesn't exist on the Laptop.

Emby server itself running as an app doesn't have any issues. this is due to mapping the folders in Windows with the NAS user then adding them to Emby

Now I find it very inconvenient (this is probably a windows thing) that the app can access them but the service cannot 😑 forcing me to perhaps create same users everywhere which I do not appreciate. Any other solution that allows me to keep my setup is highly appreciate it

Regards

Posted

Hi, the main thing that needs to be solved is the windows user running the service needs to be able to access the location.

Guest Jaqo3000
Posted

Hi Luke, thanks for your reply. that is what I was thinking, so I had several trials on how to achieve that with two different users, but of course with no success. because as you might have figured out that NAS user doesn't exist on Windows and therefore cannot be assigned as the Log on user for the Emby service. At the same time, the Windows user doesn't exist on NAS and therefore cannot be granted privilege to access NAS folders. (I like to keep things separated for security reasons)

In my opinion, this is Windows bad design for accessing files. Because it is perfectly fine and totally possible to access Network locations i.e. NAS from Windows Explorer and it will ask you to log onto NAS with its user name and password. Then there is no option to allow services to access the same Network location by similar method. 🫤

So I went with a simple solution and created the NAS user in my Windows as an additional Admin user and made that user the Log on account to the Emby Service then as expected everything worked fine.

Sorry for the long post, but I wanted to highlight that this isn't Emby, but rather the short coming of Windows.

I also want to mention that running Emby as a service is a huge advantage for me. Sometimes the Apps running in the background including Emby App would freeze (again Windows issue that I do not have the patience to investigate now) and then it is better to run Emby as a service which by testing, showed good performance.

Speaking of all those Windows issues, I would like to move my Emby Server and all its config to my NAS, is there a way of doing that in a migration style method for example, instead of having to do a setup from scratch?

Thanks and have a lovely day. 

 

Clackdor
Posted

The windows user account that the emby service runs under doesn't need to be an admin account. In fact it's best practice for it not to be as you should give things as minimum privileges as possible. Ideally the emby user account should be a standard user, and depending on where you have emby installed may need to be granted read/write NTFS permissions on the folder emby is installed to.

Also, I wouldn't necessarily say that this is bad design or a shortcoming on the part of windows. It makes perfect sense when you understand how services and user accounts work in windows, and how that affects the ability to access network shares on another device. Services on windows usually run as an account that is specific to that machine, hence the need to run the service as a user that has credentials to access the network share.

  • Like 1
rbjtech
Posted
1 hour ago, Jaqo3000 said:

Hi Luke, thanks for your reply. that is what I was thinking, so I had several trials on how to achieve that with two different users, but of course with no success. because as you might have figured out that NAS user doesn't exist on Windows and therefore cannot be assigned as the Log on user for the Emby service. At the same time, the Windows user doesn't exist on NAS and therefore cannot be granted privilege to access NAS folders. (I like to keep things separated for security reasons)

In my opinion, this is Windows bad design for accessing files. Because it is perfectly fine and totally possible to access Network locations i.e. NAS from Windows Explorer and it will ask you to log onto NAS with its user name and password. Then there is no option to allow services to access the same Network location by similar method. 🫤

So I went with a simple solution and created the NAS user in my Windows as an additional Admin user and made that user the Log on account to the Emby Service then as expected everything worked fine.

Sorry for the long post, but I wanted to highlight that this isn't Emby, but rather the short coming of Windows.

I also want to mention that running Emby as a service is a huge advantage for me. Sometimes the Apps running in the background including Emby App would freeze (again Windows issue that I do not have the patience to investigate now) and then it is better to run Emby as a service which by testing, showed good performance.

Speaking of all those Windows issues, I would like to move my Emby Server and all its config to my NAS, is there a way of doing that in a migration style method for example, instead of having to do a setup from scratch?

Thanks and have a lovely day. 

 

Windows is not the problem here - the problem is actually Emby as it does not have the ability to use alternate accounts when accessing remote shares - it simply uses the main service account that starts the emby application.     As you have done, you can get around this for a single NAS/share by loading the emby application with a service account that also has permissions on your NAS.    But what do you do if you had more than one NAS or wanted to use different accounts ?    

 

Clackdor
Posted
5 hours ago, rbjtech said:

As you have done, you can get around this for a single NAS/share by loading the emby application with a service account that also has permissions on your NAS.    But what do you do if you had more than one NAS or wanted to use different accounts ?

You would just add the same username/password combination for the windows emby service account on the other NAS and give it the necessary share permissions. 

I know this is out of scope for most average home users, but this is where having everything joined to Active Directory really shines, especially if your NAS is just a windows machine or your NAS can join the Active Directory domain and read users and groups from it. You just have a single username/password combo for the emby service account that gets synced across the domain. Even better when you consider that Emby can use AD for user authentication via the LDAP Plugin too.

 

5 hours ago, rbjtech said:

Windows is not the problem here - the problem is actually Emby as it does not have the ability to use alternate accounts when accessing remote shares - it simply uses the main service account that starts the emby application

I think it would be a nice to have feature but definitely not a requirement. IMO other platforms would benefit far more from this since it's a bit more convoluted on Linux, docker containers, etc. to change the user context emby is running as. The caveat is there may be overhead from having emby do this within the application itself rather than using native OS tooling. From what I understand emby would basically need its own SMB client built-in.

  • Like 1

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