I think I got this fixed.
Search Criteria
Package Details: emby-server 3.0.5675.1-1
Package Actions
| Package Base: | emby-server |
|---|---|
| Description: | Emby Server is a home media server built using other popular open source technologies. |
| Upstream URL: | http://emby.media |
| Category: | multimedia |
| Licenses: | |
| Conflicts: | |
| Provides: | |
| Submitter: | DaBungalow |
| Maintainer: | DaBungalow |
| Last Packager: | DaBungalow |
| Votes: | 7 |
| First Submitted: | 2015-03-31 20:15 |
| Last Updated: | 2015-07-16 18:57 |
Dependencies (6)
Required by (0)
Sources
- emby-server
- emby-server.conf
- emby-server.service
- https://github.com/MediaBrowser/Emby/archive/3.0.5675.1.tar.gz
Latest Comments
Comment by DaBungalow
Comment by jani
I noticed the same problem as experbia did, although during the install: chown: invalid user: ‘emby:emby’
emby-server.install seems to do "chown -R emby:emby /var/lib/emby-server" before checking if the user and the group do exist. You might want to move that chown.
Comment by experbia
If you're having trouble getting the service to start as I was, I noticed permission complaints about /var/lib/emby-server in journalctl, so with a chown of that dir to emby:emby everything seems to start up naturally.
It was freshly installed, never having had any mediabrowser or emby installations on this system previously.
Comment by DaBungalow
New package going up. I made one other change to better conform to the naming scheme used in /etc/conf.d by other packages. The environment file is now name simply emby-server instead of emby-server.conf.
If you are using a custom environment file, please rename it to the new standard. If you are using a custom systemd service file, please rename the EnvironmentFile value to reflect the name change.
Comment by DaBungalow
Thanks for the bit about the backup. I wasn't sure how to keep users from needing to reconfigure their settings on every update. Now I guess I know. :)
I will make the changes.
Comment by carl.george
It its current state, the systemd service fails to start. It is trying to load this file.
EnvironmentFile=/etc/conf.d/emby-server.conf
But the PKGBUILD is installing the config in a different location.
install -Dm644 ${srcdir}/emby-server.conf ${pkgdir}/usr/share/emby-server/emby-server.conf
Here's a suggestion: change both of these to a standard location in /etc.
EnvironmentFile=/etc/emby-server.conf
install -Dm644 ${srcdir}/emby-server.conf ${pkgdir}/etc/emby-server.conf
And don't forget properly mark that file so it doesn't get overwritten on updates.
backup=('etc/emby-server.conf')
Comment by dominicm
No, that is not possible unless you implemented a script that grabs some info from the old folder. It will work if the media is named according to media browse requirements but not otherwise.
I tried replacing the absolute paths in library.db sqlite database file but then I started getting "Cannot cast from source type to destination type." I couldn't find anything on that error so I just re-installed and will stick with partial metadata on some movies for now (identifying one by one would take far too long).
Comment by DaBungalow
I am pretty sure that is the case. The forum thread led me to believe that at least. He just had to refresh the library which doesn't make you reidentify anything. It just uses the existing database IDs to query the databases for what the new metadata paths are.
Comment by dominicm
Oh, so the library is saved and only metadata is lost? All I need is the media path / id pairs as well as the settings (which I have already). I don't so much mind re-downloading metadata as long as I don't have to identify movies one by one again...
Comment by DaBungalow
Did you select the option to save the metadata to the media folders? If so, all of your metadata is safe and you can do a library rescan without having to worry about a rescan missing things. Everything should have the same metadata that it had before.
Comment by dominicm
Ok, I saw the forum post and I have my answers. That's not a good situation, I think I will give up on emby since it's been nothing but trouble since I began attempting to make it work with my setup. I appreciate your help in trying to figure this out!
Comment by dominicm
Well the user was created before the installation so that shouldn't be a problem. I did it so no home directory is created and I know exactly what options were used with useradd command. Will try re-installing once more like you said. How do the settings get imported from the previous install? Also are you saying that the library is lost during upgrade to emby? Because I have manually identified a few hundred movies and it's not acceptable for me to loose that not to mention date added metadata is very important.
Comment by DaBungalow
I already create a user and group for emby so you shouldn't have been able to create another user. If you did, that is probably what messed things up. Try removing the mediabrowser and emby users and groups, then reinstall the package.
If you look at my install script, it creates the /var/lib/emby-server directory and if it creates the directory, it gives the emby user permissions to it. Everything needed for Emby to just start happens.
I think that simply removing the user and groups that have been created, reinstalling, and giving emby access to the media should be quite helpful. Also, you will need to fire a refresh for each library as indicated in this forum thread:
http://emby.media/community/index.php?/topic/13120-arch-linux/page-2
Comment by dominicm
Reading back my last comment, renaming of the main directory could cause the issue but that's where all the settings are so I see no alternative.
Comment by dominicm
I didn't symlink or anything like that. The only thing I did is rename /var/lib/mediabrowser to /var/lib/emby-server to transfer metadata/settings. I chowned to emby:emby and chmodded to 775. I did also create the user with "sudo useradd -r -s /bin/false emby" command. Are there any other directories that may need permission changes? Perhaps there's some issue with UID's / GID's since I also renamed mediabrowser to emby (can't remember if I removed and re-created the user with the above useradd command).
Comment by DaBungalow
That is extremely weird since everything is pointing to the new directories.
I was trying to figure out how to make the transition as painless a possible and couldn't figure out how to get the database transferred so that is why there is no metadata. Did you do something to point /var/lib/emby-server to /var/lib/mediabrowser-server like symlinking or mount --bind? That would certainly cause permission problems.
Comment by DaBungalow
That is extremely weird since everything is pointing to the new directories.
I was trying to figure out how to make the transition as painless a possible and couldn't figure out how to get the database transferred so that is why there is no metadata. Did you do something to point /var/lib/emby-server to /var/lib/mediabrowser-server like symlinking or mount --bind? That would certainly cause permission problems.
Comment by dominicm
After upgrading automatically with packer I tried removing emby-server and re-installing. I rebooted a twice. mediabrowser service no longer exists and I started emby-service.service
I should also mention that the metadata/library has not imported, it's as if there are no media folders added (but they are in the gui). This is due to the same issue as can be seen from the log.
I also chowned a few directories to emby:emby and chmodded to 775 in case that could cause any issues. I assume it would not have worked correctly with old username since the username changed in systemd service file.
Log: http://pastebin.com/h4MZR63Y
Comment by DaBungalow
Also, can you post your latest log so that I can see what is set and what isn't.
Comment by DaBungalow
Have you stopped mediabrowser-server.service and started emby-server.service?
I am running out of ideas as everything should be set in the service and environment file and those are set correctly.
Comment by dominicm
Sync->Settings Temporary file path: blank
Playback->Transcoding Transcoding temporary path: blank
Metadata->Advanced Metadata path: blank
Advanced->Security Custom certificate path: blank (Hosting tab)
systemd service is the default file.
Since I am getting errors opening some settings tabs I don't think it's anything that can be set in the gui.
Comment by DaBungalow
Also, do you have a custom service file?
Comment by DaBungalow
What are
Sync->Settings Temporary file path:
Playback->Transcoding Transcoding temporary path
Metadata->Advanced Metadata path
Advanced->Security Custom certificate path
set too?
Comment by dominicm
Thanks for the speedy reply. If it is not an issue with the package itself then the removal of the package failed to remove something and the installation of emby did not replace or set something correctly.
The path in /etc/conf.d/emby-server.conf is /var/lib/emby-server. Which paths are you referring to when you say "the server itself"? I am not seeing any options to set paths other than media locations. Server -> Paths are all within /var/lib/emby-server/ directory.
Comment by DaBungalow
The package from a fresh install works out of the box and everything in the package itself is correct. Please check /etc/conf.d/emby-server.conf to make sure that the paths are correct. Also, please check all of the paths in the server itself to make sure that a path you custom set isn't pointing to the wrong directory.
Also, please post any future problems in the forums at http://emby.media/community
Comment by dominicm
This seems to be broken. After upgrading from mediabrowser package (or manually removing and then installing) I get this error when accessing many pages:
2015-04-03 20:56:42.9791 Error - ProviderManager: Error saving image to System.UnauthorizedAccessException: Access to the path "/var/lib/mediabrowser-server" is denied.
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in <filename unknown>:0
at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in <filename unknown>:0
at System.IO.DirectoryInfo.Create () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create ()
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in <filename unknown>:0
at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in <filename unknown>:0
at System.IO.DirectoryInfo.Create () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create ()
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in <filename unknown>:0
at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in <filename unknown>:0
at MediaBrowser.Providers.Manager.ImageSaver+<SaveImageToLocation>c__async1.MoveNext () [0x00000] in <filename unknown>:0
2015-04-03 20:56:42.9884 Error - App: Error in Default Image Provider
*** Error Report ***
Version: 3.0.5569.0
Command line: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe
Operating system: Unix 3.19.2.1
Processor count: 4
64-Bit OS: True
64-Bit Process: True
Program data path: /var/lib/emby-server
Mono: 3.12.1 (tarball Thu Mar 12 06:31:20 UTC 2015)
Application Path: /usr/lib/emby-server/MediaBrowser.Server.Mono.exe
Error saving image to /var/lib/mediabrowser-server/data/collections/poster.png
System.Exception
at MediaBrowser.Providers.Manager.ImageSaver+<SaveImageToLocation>c__async1.MoveNext () [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <filename unknown>:0
at MediaBrowser.Providers.Manager.ImageSaver+<SaveImage>c__async0.MoveNext () [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <filename unknown>:0
at MediaBrowser.Providers.Manager.ItemImageProvider+<DownloadImage>c__async3.MoveNext () [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[System.Boolean].GetResult () [0x00000] in <filename unknown>:0
at MediaBrowser.Providers.Manager.ItemImageProvider+<RefreshFromProvider>c__async2.MoveNext () [0x00000] in <filename unknown>:0
InnerException: System.UnauthorizedAccessException
Access to the path "/var/lib/mediabrowser-server" is denied.
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in <filename unknown>:0
at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in <filename unknown>:0
at System.IO.DirectoryInfo.Create () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create ()
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in <filename unknown>:0
at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in <filename unknown>:0
at System.IO.DirectoryInfo.Create () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create ()
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00000] in <filename unknown>:0
at System.IO.Directory.CreateDirectory (System.String path) [0x00000] in <filename unknown>:0
at MediaBrowser.Providers.Manager.ImageSaver+<SaveImageToLocation>c__async1.MoveNext () [0x00000] in <filename unknown>:0
It seems like the old path is either hard coded somewhere or more likely certain config files are not being replaced or deleted. Any idea where this path is defined in? I can't find it in any config files.