xbmcgotham 35 Posted January 12, 2018 Posted January 12, 2018 Hi, I followed the guide https://github.com/MediaBrowser/Wiki/wiki/Running%20Emby%20Server%20as%20a%20Windows%20Service and was able to successfully start Emby as a service on the Win 7 machine. However when the web config page started, all the original settings where gone and it asked to walk through the install setup wizard again. Which I thought was strange as I thought that it was recalling the same service instance. As I was interested to know if all was removed with the running of the new service, I removed the service and rebooted again Win7. And their it was again fine, all old settings where still there. So my question is, what needs to be done in the service installation to make sure it uses the "active" Emby configuration without going through a new installation again. Thanks
Luke 42079 Posted January 12, 2018 Posted January 12, 2018 is it running under a different windows user?
xbmcgotham 35 Posted January 12, 2018 Author Posted January 12, 2018 I followed the instructions to a T, so if not mistaken the Emby Server install is installed using the windows user (admin rights) that installed it. nssm.exe was also run using the same user. However, the nssm service would be run using the system user. So yes, both are different. But should the nssm not take the active emby session and make it a service independed from the windows user?
Luke 42079 Posted January 15, 2018 Posted January 15, 2018 The servers program data path is based on the user local appdata path so yes changing the service user could be a problem.
xbmcgotham 35 Posted January 15, 2018 Author Posted January 15, 2018 Is it possible for you to tell me what needs to be changed to have these the same and that the service is running the same emby session? The current manual doesn't take this in consideration when having already an emby session active. So not sure where what to change.
Luke 42079 Posted January 15, 2018 Posted January 15, 2018 I'm not exactly sure what you're asking to change?
xbmcgotham 35 Posted January 15, 2018 Author Posted January 15, 2018 I am missing the part of the manual that deals with this current problem. What do I need to change in the setup so that the "windows service" will run the current/active emby session and not create a complete new one. :-) I like to get it to work with my current emby session. ;-)
d00zah 149 Posted January 15, 2018 Posted January 15, 2018 I like to get it to work with my current emby session. ;-) @@xbmcgotham, I may be way off here, but I need to ask... In the NSSM installation instructions: "Open a command prompt as admin and "cd" to the folder containing NSSM." did you use the same account credentials used to originally install the server? I've done this installation on over a dozen machines & it has proven fairly straight forward. Just trying to help.
xbmcgotham 35 Posted January 15, 2018 Author Posted January 15, 2018 Please ask @@d00zah :-) If not mistaken, I clicked on the download link for emby server on Windows and after this clicked it to install. I can't remember if I selected "run as administrator" before clicking the exe. I did run CMD as admin to install NSSM. You you think that running emby install without specific the admin is the problem? If yes, would it be possible to backup the current session, install the emby service and put the backup back to this new instance? Will this work with the backup plugin, is it that simple or some issues doing it this way? Thanks
d00zah 149 Posted January 15, 2018 Posted January 15, 2018 I believe it has a bearing on where it was installed & what credentials it runs under. Both my server & the NSSM installations share the same admin credentials on every machine I've installed on. It just works. My understanding is that the Backup plugin will allow that migration.
xbmcgotham 35 Posted January 21, 2018 Author Posted January 21, 2018 Thanks @@d00zah So, I installed the service again and in the service manager I selected the emby service and changed the login as the same user that emby was installed with instead of using the system user. This time, it showed to use the active emby session and showed all the libraries etc which I had setup before. However the following occurred which I find strange. 1. Podcast will not show anymore, podcast page is empty. Re-adding the same podcast xml file does not make a difference. Running the channel refresh schedular does not make a difference. 2. All images of the movie and tv shows are gone. rescanning the library and replace all meta data + images doesn't make a difference. Only when I go to a movie or tv show in the emby library gui and click and refresh meta data + images, will it download and show the images again for the particular movie/tv show. 3. Library loading seems slower 4. No progress loader is shown anymore in the server config page of the library and dashboard. No way to see if or what library is being processed/updated. These are some observations. Unless this is easily fixed, I won't be able to use this windows service unfortunately. Unfortunately for now, I will need to revert back to the default installation. Hope this will be addressed in a future update. Thanks
d00zah 149 Posted January 21, 2018 Posted January 21, 2018 (edited) @@xbmcgotham, Verify the locations of cache: http://localhost:8096/web/dashboardgeneral.html & metadata: http://localhost:8096/web/librarysettings.html are correct. The backup plugin will have saved the 'old' paths from the non-admin installation. Copying 'cache' & 'metadata' folders (or adjusting the path) should solve this. EDIT: I have these located on a 'scratch' drive, independent of the server installation, which would have mitigated this particular gotcha. EDIT 2: The podcast channel issue may have a similar cause... if you moved: ?:\Users\[admin]\AppData\Roaming\Emby-Server\plugins the configuration MAY still include the former path? Try uninstalling (w/ restart)/reinstalling (w/ restart) the plugin... might do the trick? EDIT 3: If correcting the paths fixes other problems, 'Transcoding temporary path' should be edited for the same reason: http://localhost:8096/web/encodingsettings.html Edited January 21, 2018 by d00zah
d00zah 149 Posted January 21, 2018 Posted January 21, 2018 After re-reading your last post, I may have incorrectly assumed some things. Could you please post a recent server log?
xbmcgotham 35 Posted January 21, 2018 Author Posted January 21, 2018 Hi, thanks for your assistance. I have no access to recent log files at the moment. hope to be able to find something tomorrow for you. However, I did refer back to the original config, and all is working again after re scanning. It did not like the service change.
d00zah 149 Posted January 21, 2018 Posted January 21, 2018 @xbmcgotham, I've re-read this thread (from the beginning) & want to do a 'reset'. - You have an installation of Emby server running successfully as an app (tray icon, not service) under a user acc't (w/ admin rights?). note: In my cases, the acc't used to install the server & nssm are the same. - Using any admin credentials, you follow the instructions to install nssm & configure it to run Emby as a service? & You used the path (assuming '?' is your root drive i.e. 'C'): ?:\Users\[your EmbyServer acc't]\AppData\Roaming\Emby-Server\system\EmbyServer.exe the 'startup directory' field should default to: ?:\Users\[your EmbyServer acc't]\AppData\Roaming\Emby-Server\system as the target? Like Luke, I believe that, if you used the same working install for the path, the service should work without changing the defaults.... the local SYSTEM account SHOULD, by default, have full rights to said startup directory structure. - Since you describe an unconfigured server when you started the service, you don't have a 2nd, 'forgotten' Emby server installation in another acc't you might have pointed nssm at by accident? Just a SWAG, but stranger things... - Did you stop the app (no more tray icon) & disable 'Run server at startup' in the config UI before starting the service? 2 instances of the server MAY have clashed? - Did you delete (or at least disable) the original, Emby-installed service? This assumes a pre-v3.2.36.0 installation existed.
xbmcgotham 35 Posted January 22, 2018 Author Posted January 22, 2018 Hi @@d00zah thanks for your help, In my case, I think I had the emby server initially installed on the administrator account. When I installed the service it must have used the systems account which gave the difference in startup by going through the wizard again. I removed completely the service and rebooted the PC. This in return started my original emby config and all worked fine again. The second try, I stopped the emby server, followed the service install guide and than went into service config to change system login to my admin login (same as emby sever install was done on). Then started the service and emby was looking the same as before. However than I noticed the difference as described above. Unless you have specific config steps I need to take after installing the service, I am not sure what else I need to change in the emby config to fix the problems, e.g not showing the artwork. By the way, the not displaying the podcast was another issue that was solved. Thanks
d00zah 149 Posted January 22, 2018 Posted January 22, 2018 @xbmcgotham... just for clarification... you currently have a server installation that is: 1. running as an app (tray icon)? 2. working to your satisfaction? IF the answer to these questions is 'yes', then all I can think of is to delete the service ('nssm remove [servicename]') & try again. The requirement to 'run as administrator' is only so you have the necessary permissions to create the service. No need to change 'login' credentials from 'local SYSTEM account'. Unless you've messed with permissions in the root 'Emby-Server' directory, the instructions are quite accurate & effective. IF the server instance configured in nssm is the same one you are running as an app, the service will be reading the same config data/plugins/database, etc... you should see no difference other than the lack of a tray icon. Sorry for the earlier confusion... the flu did not lend itself to clarity of thought...
xbmcgotham 35 Posted January 23, 2018 Author Posted January 23, 2018 Hope you got better. :-) Thanks. both answers are Yes. However, I like to run it as a service so that I dont have to login specifically to start emby. The strange thing about it is that the last try I did (see above) gave me the same service instance, however, the artwork disappeared. So the service was reading the same config etc, but suddenly no pictures and loader not showing anymore. Makes no sense to me. How to determine what is happening and how to solve it? Any idea?
d00zah 149 Posted January 23, 2018 Posted January 23, 2018 (edited) Server log, maybe? Wonder whether it'd fill in following a scan? Edited January 23, 2018 by d00zah
xbmcgotham 35 Posted January 23, 2018 Author Posted January 23, 2018 Yes, I will reinstall the service again and do a run. Will take a few days before I can post this to you. Thanks again
xbmcgotham 35 Posted January 30, 2018 Author Posted January 30, 2018 (edited) Hi, just a quick check. Maybe someone running emby as a service could check for me. When using emby as a service: 1. Will the library update process still be shown as a loading image in the library view and dashboard? 2. Will it be possible to start the service again through the web browser if you stopped it? If not, you would need to go into services I guess. 3. @@Luke Can I now connect directly the NAS to emby with login credentials with the latest emby update instead of mapping it locally first? Thanks Edited January 30, 2018 by xbmcgotham
d00zah 149 Posted January 30, 2018 Posted January 30, 2018 Sounds like you have things working. 1. Behavior, in general, should be no different than running Emby as an app. (some dashboard buttons removed by '-service' arg when setting up 'nssm'). 2. Service is now managed by Windows service manager. Cmd line 'net start [servicename]'/'net stop [servicename]' will work, too. 3. not 4 me
xbmcgotham 35 Posted January 31, 2018 Author Posted January 31, 2018 (edited) Well just reinstalled emby and service. Looks good so far. Only noticed that the circular loading image that shows up when a library is updated is not shown anymore, pity as it makes it a little easier to see the progress. And when i logged in to windows, i got a message that emby services needed to stop. Will have to keep an I on this. :-) Thanks again for the help. and will let you know of any updates UPDATE: For some reason the local share that I had setup to connect to the NAS drive is no longer in the browse list and I cant add anymore libraries from this share. Additionally the images are gone again from the gui as had happened before. Unless its an easy fix, I will have once again go back to the normal emby installation. As I see it, the only way getting over this issue easily is to make sure that emby can connect to a NAS drives using UNC with credentials. Edited January 31, 2018 by xbmcgotham
xbmcgotham 35 Posted February 1, 2018 Author Posted February 1, 2018 (edited) UPDATE 2: So I decided to change the login user for the service from "system" to the same user I use working on the PC with. After changing it and restarting service, the share was still not visible is the emby library browser, however I was able to UNC to the NAS and add a new library that way.(this was not possible before the change). Also noticed that the round loading library scan images are also shown again. I have not had the time to check if the service would be able to operate correctly if I have not physically logged in with the user account. Again, this is a temporary fix until we are able to directly connect to password protected remote storage's with emby. Edited February 1, 2018 by xbmcgotham
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