yodajones 3 Posted January 9 Author Share Posted January 9 @LukeSorry about the old screenshot, but I think it is the same as todays. See attachment. The error logs I posted this morning are also from today. Link to comment Share on other sites More sharing options...
Luke 37253 Posted January 9 Share Posted January 9 The log you provided is not from the same time as that activity entry occurred. Can you please provide the one from when the problem was experienced? Thanks. Link to comment Share on other sites More sharing options...
yodajones 3 Posted January 10 Author Share Posted January 10 @LukeIf you mean a log from 1/9/2024 1:59:59 AM there is none. I see only 8 logs. Here is what I see (attachment), unless I should be looking somewhere else. If you want one of the ones shown let me know. Link to comment Share on other sites More sharing options...
Luke 37253 Posted January 10 Share Posted January 10 It would be the one that contains the date/time that you see in that error entry in the activity log. Link to comment Share on other sites More sharing options...
yodajones 3 Posted January 14 Author Share Posted January 14 @LukeHere are 2 from this morning and a screenshot of the error in the dashboard. embyserver.txt hardware_detection-63840807937.txt Link to comment Share on other sites More sharing options...
Luke 37253 Posted January 14 Share Posted January 14 Data path: /var/lib/emby Application path: /opt/emby-server/system SQLitePCL.pretty.SQLiteException: ReadOnly: attempt to write a readonly database 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() I would make sure the server has full write access to the folder /var/lib/emby and everything underneath. Please let us know if this helps. Thanks. Link to comment Share on other sites More sharing options...
yodajones 3 Posted January 14 Author Share Posted January 14 (edited) @LukeDo you have a recommended command? Maybe this: chown emby:emby /var/lib/emby How can I see who / what the permissions are currently before I make changes? Edited January 14 by yodajones Link to comment Share on other sites More sharing options...
TMCsw 123 Posted January 15 Share Posted January 15 (edited) 4 hours ago, yodajones said: How can I see who / what the permissions are currently before I make changes? ls -la /var/lib/emby Edited January 15 by TMCsw forgot the a Link to comment Share on other sites More sharing options...
Luke 37253 Posted January 15 Share Posted January 15 2 hours ago, TMCsw said: ls -la /var/lib/emby 5 hours ago, yodajones said: @LukeDo you have a recommended command? Maybe this: chown emby:emby /var/lib/emby How can I see who / what the permissions are currently before I make changes? Please take a look at this and see if it helps: Link to comment Share on other sites More sharing options...
yodajones 3 Posted January 15 Author Share Posted January 15 @Lukeand @TMCswHere is what I get from the ls command so it doesn't look like a permissions issue unless I'm reading this wrong. root@emby:~# ls -la /var/lib/emby total 60 drwxr-xr-x 12 emby emby 4096 Dec 27 12:26 . drwxr-xr-x 28 root root 4096 Dec 7 09:23 .. -rw-r--r-- 1 emby emby 220 Apr 17 2019 .bash_logout -rw-r--r-- 1 emby emby 3526 Apr 17 2019 .bashrc drwxr-xr-x 7 emby emby 4096 Jan 14 16:42 cache drwxr-xr-x 3 emby emby 4096 Mar 12 2023 config drwxr-xr-x 6 emby emby 4096 Jan 14 05:45 data drwxr-xr-x 3 emby emby 4096 Dec 8 10:41 .dotnet drwxr-xr-x 2 emby emby 4096 Mar 4 2023 fonts drwxr-xr-x 2 emby emby 4096 Jan 15 00:00 logs drwxr-xr-x 12 emby emby 4096 Mar 4 2023 metadata drwxr-xr-x 3 emby emby 4096 Mar 12 2023 plugins -rw-r--r-- 1 emby emby 807 Apr 17 2019 .profile drwxr-xr-x 3 emby emby 4096 May 22 2022 root drwxr-xr-x 2 emby emby 4096 Dec 2 16:38 transcoding-temp root@emby:~# Link to comment Share on other sites More sharing options...
Luke 37253 Posted January 15 Share Posted January 15 Have you checked recursively? Link to comment Share on other sites More sharing options...
yodajones 3 Posted January 15 Author Share Posted January 15 @LukeI had not, but I just did. That was a long list. Do you want to see the entire output, or only some particular parts? Here is an example: root@emby:~# ls -laR /var/lib/emby /var/lib/emby/root/default/Music: total 16 drwxr-xr-x 2 emby emby 4096 Nov 20 2022 . drwxr-xr-x 8 emby emby 4096 Dec 2 16:41 .. -rw-r--r-- 1 emby emby 4858 Dec 7 09:39 options.xml Link to comment Share on other sites More sharing options...
Q-Droid 670 Posted January 15 Share Posted January 15 Try these two commands. find /var/lib/emby ! -user emby -ls find /var/lib/emby ! -perm -u+w -ls Link to comment Share on other sites More sharing options...
yodajones 3 Posted January 16 Author Share Posted January 16 @Q-DroidHere is what I get: root@emby:~# find /var/lib/emby ! -user emby -ls 1574204 65964 -rw-r--r-- 1 root root 67547136 Dec 2 16:38 /var/lib/emby/data/library.db.backup 1574240 65964 -rw-r--r-- 1 root root 67547136 Dec 2 16:45 /var/lib/emby/data/library.db root@emby:~# root@emby:~# find /var/lib/emby ! -perm -u+w -ls root@emby:~# Link to comment Share on other sites More sharing options...
Q-Droid 670 Posted January 16 Share Posted January 16 That explains why Emby couldn't write to that DB. Those files should be owned by emby, not root. Stop the emby server, change ownership of those files to emby:emby then start the server. 1 Link to comment Share on other sites More sharing options...
yodajones 3 Posted January 17 Author Share Posted January 17 @Q-DroidShould I only change those files, or is there any reason I shouldn't do the entire file tree as such: chown -R emby:emby /var/lib/emby Link to comment Share on other sites More sharing options...
Q-Droid 670 Posted January 17 Share Posted January 17 Changing those two files would be faster but either way would have the same result as those two are the only files under that path that are not owned by emby. 1 Link to comment Share on other sites More sharing options...
yodajones 3 Posted January 17 Author Share Posted January 17 (edited) @Q-DroidSome success! - I ran these: chown emby:emby /var/lib/emby/data/library.db chown emby:emby /var/lib/emby/data/library.db.backup And afterwards some of my libraries are working. What I can now read and play are "Movies", "Audiobooks" and "TV Shows". For some reason "Music" and "Recordings" are not able to scan their respective libraries. Here is the FSTAB This library works and I can play files from this share in Emby: nas:/volume1/Video/movie /media/synologynas/movies nfs rsize=8192,wsize=8192,timeo=14,intr This library does not work and Emby says it is empty: nas:/volume1/Music /media/synologynas/music nfs rsize=8192,wsize=8192,timeo=14,intr This library works and I can play files from this share in Emby: nas:/volume1/Video/shows /media/synologynas/shows nfs rsize=8192,wsize=8192,timeo=14,intr This library works and I can play files from this share in Emby: nas:/volume1/AudioBooks /media/synologynas/audiobooks nfs rsize=8192,wsize=8192,timeo=14,intr This library does not work and Emby says it is empty: nas:/volume1/TV /media/synologynas/tv nfs rsize=8192,wsize=8192,timeo=14,intr Inside Emby here are the libraries I have setup: Working: Audiobooks: /media/synologynas/audiobooks FSTAB Line: nas:/volume1/AudioBooks /media/synologynas/audiobooks nfs rsize=8192,wsize=8192,timeo=14,intr Movies: /media/synologynas/movies FSTAB Line: nas:/volume1/Video/movie /media/synologynas/movies nfs rsize=8192,wsize=8192,timeo=14,intr TV Shows: /media/synologynas/shows FSTAB Line: nas:/volume1/Video/shows /media/synologynas/shows nfs rsize=8192,wsize=8192,timeo=14,intr Not Working: Music: /media/synologynas/music FSTAB Line: nas:/volume1/Music /media/synologynas/music nfs rsize=8192,wsize=8192,timeo=14,intr Recordings: /media/synologynas/tv FSTAB Line: nas:/volume1/TV /media/synologynas/tv nfs rsize=8192,wsize=8192,timeo=14,intr The playlists are also not working. These are music playlists I created inside Emby and have the path: /var/lib/emby/data/playlists. I presume they do not work because the music library is not working. Just after posting this I looked at the logs and saw this: 2024-01-16 18:42:56.205 Error ProviderManager: Error validating children for tv 7 /media/synologynas/tv *** Error Report *** Version: 4.7.14.0 Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb Operating system: Linux version 4.19.0-26-amd64 (debian-kernel@lists.debian.org) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.304-1 (2024-01-09) Framework: .NET 6.0.20 OS/Process: x64/x64 Runtime: opt/emby-server/system/System.Private.CoreLib.dll Processor count: 4 Data path: /var/lib/emby Application path: /opt/emby-server/system System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path '/media/synologynas/tv' is denied. ---> System.IO.IOException: Permission denied --- End of inner exception stack trace --- at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound) at System.IO.Enumeration.FileSystemEnumerator`1.Init() at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized) at System.IO.Enumeration.FileSystemEnumerableFactory.FileSystemInfos(String directory, String expression, EnumerationOptions options, Boolean isNormalized) at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options) at System.IO.DirectoryInfo.EnumerateFileSystemInfos(String searchPattern, SearchOption searchOption) at Emby.Server.Implementations.IO.ManagedFileSystem.GetFileSystemEntries(String path, Boolean recursive) at MediaBrowser.Controller.Providers.DirectoryService.GetFileSystemEntries(String path, Boolean clearCache) at MediaBrowser.Controller.Providers.DirectoryService.GetFileSystemEntries(String path) at MediaBrowser.Controller.Entities.BaseItem.GetFileSystemChildren(IDirectoryService directoryService) at MediaBrowser.Controller.Entities.Folder.GetNonCachedChildren(IDirectoryService directoryService, LibraryOptions libraryOptions) at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService) at Emby.Providers.Manager.ProviderManager.RefreshCollectionFolderChildren(MetadataRefreshOptions options, CollectionFolder collectionFolder, CancellationToken cancellationToken) Source: System.Private.CoreLib TargetSite: IntPtr CreateDirectoryHandle(System.String, Boolean) InnerException: System.IO.IOException: Permission denied Source: TargetSite: 2024-01-16 18:42:59.988 Info Server: http/1.1 GET http://192.168.2.209:8096/emby/videos/100/stream.mp4?DeviceId=836F74E8-7DEE-4F08-981A-43DCE37B2325&MediaSourceId=7af347fc8e23215d49b09d1fcb98feb3&Static=true&PlaySessionId=643035db0eb3487f87b14c3bc4765fb0. Accept=*/*, Connection=keep-alive, Host=192.168.2.209:8096, User-Agent=AppleCoreMedia/1.0.0.21K365 (Apple TV; U; CPU OS 17_2 like Mac OS X; en_us), Accept-Encoding=identity, Accept-Language=en-US,en;q=0.9, Range=bytes=2929393664-4792647679, X-Playback-Session-Id=0594C38E-CD74-47CB-A81F-AE7B07DD5ECC Edited January 17 by yodajones Link to comment Share on other sites More sharing options...
Q-Droid 670 Posted January 17 Share Posted January 17 Access to some of the media is still not working. Compare a path that works to one that doesn't to see what's different about them both on the Emby server host and the Synology NAS. Pick some media items of each and compare the full paths, every directory along the way to the files and the files for ownership and/or permissions differences. Every access setting for those on Synology and how they look on the server. Something is different somewhere. It's the only way to get to the bottom of this. Link to comment Share on other sites More sharing options...
Solution yodajones 3 Posted January 18 Author Solution Share Posted January 18 (edited) @Q-Droid& @Lukeand everyone else who helped me out with this. I want you guys to know that it looks like everything is working again! I really appreciate you guys taking the time to help me. To summarize: I had a completely working Emby Server running on a Debian virtual machine on a Proxmox server. After updating Synology DSM from 6.x to 7.x I noticed that I could no longer view any videos or listen to any music via Emby in a browser or on the Emby app on our AppleTV. The Synology NAS is where all our media files are stored and were attached to the Emby Server via NFS shares. There were two significant steps that helped me for my situation: 1. Fixing the permissions on /var/lib/emby/data/library.db and /var/lib/emby/data/library.db.backup with these commands: chown emby:emby /var/lib/emby/data/library.db chown emby:emby /var/lib/emby/data/library.db.backup After running these commands I was able to access some of our shares. 2. Fixing the Squash settings on the Synology NAS. The original Squash settings on the Synology NFS shares was set to "Map root to admin" and changing this setting to "Map all users to admin" fixed the shares. After doing these two things I was able to watch videos and listen to music again in the Emby AppleTV app and in all the browsers. Obviously the permissions for the library.db and library.db.backup files could not have been changed from a Synology DSM update so I probably messed them up with my attempts to fix the original access issues. Perhaps all I would have needed to do was change the Squash settings on the Synology but I'll never know now. I have a couple questions remaining, one may be off topic and one could be related: 1. Music Playlists. Before this all started, I had created some extensive music playlists. The library shows the playlists are located at /var/lib/emby/data/playlists so are stored locally on the Emby Server. Now all the playlists are empty. Here is an example of one of my playlist.xml files: <?xml version="1.0" encoding="utf-8" standalone="yes"?> <Item> <Added>3/5/2023 11:47:11 AM</Added> <LockData>false</LockData> <LocalTitle>Pop</LocalTitle> <SortTitle>Pop</SortTitle> <RunningTime>0</RunningTime> </Item> I would have expected to see some of the songs listed in here. Isn't that a correct assumption? Why would this playlist.xml be empty now? 2. Media Images. In the library settings there is a checkbox "Save artwork into media folders". OK, that makes sense. But if this is NOT selected where are the images saved? The reason I ask is because all the images I previously had are now gone. I was able to "Refresh meta data" and that seemed to get most back, but some were manually set and are now gone. Again, thank you to everyone here for their help. Edited January 18 by yodajones 1 Link to comment Share on other sites More sharing options...
Luke 37253 Posted January 18 Share Posted January 18 Thanks for following up and thanks to @Q-Droidfor helping with this ! 1 Link to comment Share on other sites More sharing options...
Luke 37253 Posted January 18 Share Posted January 18 Quote 1. Music Playlists. What version of the server are you on now? Link to comment Share on other sites More sharing options...
Luke 37253 Posted January 18 Share Posted January 18 Quote 2. Media Images. In the library settings there is a checkbox "Save artwork into media folders". OK, that makes sense. But if this is NOT selected where are the images saved? The reason I ask is because all the images I previously had are now gone. I was able to "Refresh meta data" and that seemed to get most back, but some were manually set and are now gone. In the server metadata folder. Link to comment Share on other sites More sharing options...
yodajones 3 Posted January 18 Author Share Posted January 18 @LukeThank you! 43 minutes ago, Luke said: What version of the server are you on now? Version 4.7.14.0 43 minutes ago, Luke said: In the server metadata folder. What is the path to this folder? Link to comment Share on other sites More sharing options...
Luke 37253 Posted January 18 Share Posted January 18 36 minutes ago, yodajones said: @LukeThank you! Version 4.7.14.0 What is the path to this folder? It is displayed in advanced library settings. Link to comment Share on other sites More sharing options...
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