Jump to content

Emby Server Running on Debian 11 Errors After Synology 7 Upgrade


yodajones
Go to solution Solved by yodajones,

Recommended Posts

yodajones

Hello,

I have a Emby Server instance running on Debian 11 with my libraries on a Synology NAS connected by NFS shares.  After upgrading my Synology NAS to DSM 7.x my Emby server can no longer read nor write to the NAS libraries.  Emby log attached.

Oddly, Emby does not seem able to connect to either SiliconDust network attached tuners which may imply the issue is not NAS permissions related but something with Emby Server itself.

Debian Ver. = 11
Emby Server Ver. = 4.7.14.0
Synology DSM Ver. = 7.1.1-42962

 

embyserver.txt

Link to comment
Share on other sites

yodajones

Sorry, I misreported my Debian version.  Emby Server is running on Debian 10, NOT Debian 11 as stated above and in my title.

Link to comment
Share on other sites

GrimReaper
Quote

SQLitePCL.pretty.SQLiteException: ReadOnly: attempt to write a readonly database SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.

This would suggest permission issues on your system. Can you verify those? Maybe restart host? 

You're also having permission issues with your Synology:

Quote

System.UnauthorizedAccessException: Access to the path '/media/synologynas/music' is denied.

System.UnauthorizedAccessException: Access to the path '/media/synologynas/shows is denied.

System.UnauthorizedAccessException: Access to the path '/media/synologynas/tv' is denied.

System.UnauthorizedAccessException: Access to the path '/media/synologynas/audiobooks' is denied.

System.UnauthorizedAccessException: Access to the path '/media/synologynas/movies' is denied.

 

Edited by GrimReaper
Link to comment
Share on other sites

yodajones

@GrimReaper

Quote

This would suggest permission issues on your system. Can you verify those? Maybe restart host? 

I have restarted the server many times via the web interface and via SSH.  No change.

Quote

You're also having permission issues with your Synology:

When I SSH into the Emby Server as root I can see all the mounted (FSTAB) shares and files.

When I try to SSH in as user emby I get a error "This account is currently not available:.

@Luke

Quote

Hi, have you taken a look at this?

Yes. and as I mentioned above I can see the folders and files mounted on the Emby Server when logged in as root.

Link to comment
Share on other sites

yodajones

I still cannot access the shared folders as the user embed but I can see them via SSH as root.

This was working for about a year and suddenly stopped working.  I'm pretty sure the problem started when I upgraded from DSM 6.x to 7.x.

I tried adding the embed user to the sudo group on the Emby Server but the problem persists.  Is there another group the embed user needs to be part of?  What permissions does the embed user need, and why would the permissions on the Embed Server have changed?

Link to comment
Share on other sites

1 hour ago, yodajones said:

I still cannot access the shared folders as the user embed but I can see them via SSH as root.

This was working for about a year and suddenly stopped working.  I'm pretty sure the problem started when I upgraded from DSM 6.x to 7.x.

I tried adding the embed user to the sudo group on the Emby Server but the problem persists.  Is there another group the embed user needs to be part of?  What permissions does the embed user need, and why would the permissions on the Embed Server have changed?

When you upgraded to DSM 7, did you follow this: 

 

Link to comment
Share on other sites

yodajones

@LukeAm I reading your link wrong?  It seems that you are refering to Emby running on the Synology NAS and my Emby Server runs separately on a Debian 10 system.

Link to comment
Share on other sites

On 12/9/2023 at 1:43 PM, yodajones said:

@LukeAm I reading your link wrong?  It seems that you are refering to Emby running on the Synology NAS and my Emby Server runs separately on a Debian 10 system.

OK sorry, then in that case, have you taken a look at this?

 

Link to comment
Share on other sites

  • 2 weeks later...
yodajones

Here is an example of what I get for one of my media folders (tv) the other shares are all the same.

root@emby:~# ls -l /media/synologynas/tv

total 892
drwxrwxrwx  2 nobody 4294967294  4096 Sep 12 03:00 '1990 The Bronx Warriors (1983)'
drwxrwxrwx  2 nobody 4294967294  4096 Apr 22  2023 '500 MPH Storm (2013)'
drwxrwxrwx  9 nobody 4294967294  4096 Jun 16  2023 'Adam-12 (1968)'
drwxrwxrwx  5 nobody 4294967294  4096 Jul  1 01:05 'Alfred Hitchcock Hour (1962)'
drwxrwxrwx  9 nobody 4294967294  4096 Nov  1 01:35 'Alfred Hitchcock Presents (1955)'
drwxrwxrwx  2 nobody 4294967294  4096 Apr  2  2023 'Alienator (1989)'
drwxrwxrwx  2 nobody 4294967294  4096 Jun  4  2023 'Alien Predator (2018)'
drwxrwxrwx  2 nobody 4294967294  4096 May 12  2023 'Android Cop (2014)'
drwxrwxrwx  2 nobody 4294967294  4096 Mar 31  2023 'April Fool'\''s Day (1986)'
drwxrwxrwx  2 nobody 4294967294  4096 Apr 15  2023 'Armed and Dangerous (1986)'
drwxrwxrwx  6 nobody 4294967294  4096 Oct  2 05:30 'Ask This Old House (2002)'
drwxrwxrwx  2 nobody 4294967294  4096 Jun  2  2023 'Badlanders (1992)'
drwxrwxrwx  2 nobody 4294967294  4096 Aug 26 12:31  Banacek
drwxrwxrwx  2 nobody 4294967294  4096 Sep  2 12:30 'Banacek (1972)'
drwxrwxrwx 11 nobody 4294967294  4096 Sep 30 04:05 'Barnaby Jones (1973)'

 

 

Link to comment
Share on other sites

yodajones

I can see the "emby" user does not seem to have the correct permissions.  Maybe someone can tell me where or what permissions are missing and how to change them.  In the above ls of one of the folders it shows "nobody".  That share is a FSTAB mounted shared folder residing on a Synology NAS. @Q-Droid

root@emby:~# groups emby
emby : emby sudo video render

If I do this:

cd /var/lib/emby/data/playlists

Then:

 

root@emby:/var/lib/emby/data/playlists# ls -l /var/lib/emby/data/playlists/Pop\ \[playlist\]/
total 4
-rw-r--r-- 1 emby emby 231 Dec  2 16:41 playlist.xml

So the emby user has user and group in the local /var/lib/emby/data/playlists folders.  I suppose the Synology NAS would have different user and groups but "nobody"?  Not sure where that comes from.

I don't know if this is related, but even though the emby user is in the sudo group I cannot SSH into the Emby Server using the emby user.

Link to comment
Share on other sites

Q-Droid

How are the NFS shares mounted on your Emby server? Show your fstab entries.

What do ownership and permissions look like for the full path to the media on the Emby server host. Example path from above, run:

namei -l /media/synologynas/tv/Banacek

 

  • Thanks 1
Link to comment
Share on other sites

yodajones

@Q-DroidThanks for your reply.

Here is my FSTAB file.  As you can see I was experimenting with different mount options.

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=aa280738-2634-4960-81a9-54df73fae6d7 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=c36e9555-92e3-4e7c-bae9-51ec465cdfa0 none            swap    sw              0       0
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
nas:/volume1/Video/movie /media/synologynas/movies nfs rsize=8192,wsize=8192,timeo=14,intr
nas:/volume1/Music /media/synologynas/music nfs rsize=8192,wsize=8192,timeo=14,intr
nas:/volume1/Video/shows /media/synologynas/shows nfs rsize=8192,wsize=8192,timeo=14,intr
nas:/volume1/AudioBooks /media/synologynas/audiobooks nfs rsize=8192,wsize=8192,timeo=14,intr 998 998
# nas:/volume1/Audiobooks /media/synologynas/audiobooks cifs credentials=/root/.smbcredentials,vers=3.0,uid=1000,gid=1000 0 0
nas:/volume1/TV /media/synologynas/tv nfs rsize=8192,wsize=8192,timeo=14,intr
# nas:/volume1/TV /media/synologynas/tv cifs credentials=/root/.smbcredentials,vers=3.0,uid=1000,gid=1000 0 0

I do have a credentials file with the emby user's credentials and cifs for the Synology NAS in the location of the remmed out line.  All the lines using nfs mounts worked previously.

I would like to mention again that this system was working for about a year and only failed after I upgraded the Synology NAS from their DSM 6.x to 7.x

In case it is relevant I originally setup the mounts using the directions found here: https://0ut3r.space/2019/07/23/mount-nas/

 

Link to comment
Share on other sites

yodajones

Sorry, here is the output from the command you asked for:

root@emby:~# namei -l /media/synologynas/tv/Banacek
namei: invalid option -- '?'
Try 'namei --help' for more information.
root@emby:~# 

I also tried this:

root@emby:~# namei /media/synologynas/tv/Banacek
f: /media/synologynas/tv/Banacek
 d /
 d media
 d synologynas
 d tv
 d Banacek

And this:

root@emby:~# namei -o /media/synologynas/tv/Banacek
f: /media/synologynas/tv/Banacek
 d root   root       /
 d root   root       media
 d emby   emby       synologynas
 d nobody 4294967294 tv
 d nobody 4294967294 Banacek

And this:

root@emby:~# namei -m /media/synologynas/tv/Banacek
f: /media/synologynas/tv/Banacek
 drwxr-xr-x /
 drwxrwxrwx media
 drwxrwxrwx synologynas
 drwxrwxrwx tv
 drwxrwxrwx Banacek

And then this:

root@emby:~# namei -v /media/synologynas/tv/Banacek
f: /media/synologynas/tv/Banacek
d /
d media
d synologynas
d tv
d Banacek

And lastly this:

root@emby:~# namei -o -l /media/synologynas/tv/Banacek
f: /media/synologynas/tv/Banacek
drwxr-xr-x root   root       /
drwxrwxrwx root   root       media
drwxrwxrwx emby   emby       synologynas
drwxrwxrwx nobody 4294967294 tv
drwxrwxrwx nobody 4294967294 Banacek

 

Edited by yodajones
Link to comment
Share on other sites

Q-Droid

You seem to have access to at least the path above. I agree that this is likely related to the DSM upgrade and it appears to be a fairly common problem but I'm not a Synology user.

What you could do as a test is undo and redo one of the NFS shares (paths) on the Synology side to see if the new export created with DSM 7.x works. If that does work you can then do the same for the rest. Also check and maybe change the settings for Squash but I would probably do this with a new export. The are other access related options on DSM for NFS clients but again, I don't do Synology.

Link to comment
Share on other sites

yodajones

@Q-Droid@LukeRe-doing the Synology shares and start stopping SMB and NFS services was no change.  I've been messing with this on and off for a couple weeks and quite frankly it's getting tiresome so I am thinking about wiping the Emby Server - it's a virtual machine - and re-installing.  My question is how will this affect my lifetime membership?  Are there any steps I need to take or be aware of before wiping the Emby Server?

I am really not looking forward to this and this mess has been very disappointing because I had setup a bunch of OTA shows to be recorded from our 6 SiliconDust tuners.  Also I have made some very extensive music playlists where a couple had hundreds of hand-picked music from our collection.

This sucks.

Link to comment
Share on other sites

17 minutes ago, yodajones said:

@Q-Droid@LukeRe-doing the Synology shares and start stopping SMB and NFS services was no change.  I've been messing with this on and off for a couple weeks and quite frankly it's getting tiresome so I am thinking about wiping the Emby Server - it's a virtual machine - and re-installing.  My question is how will this affect my lifetime membership?  Are there any steps I need to take or be aware of before wiping the Emby Server?

I am really not looking forward to this and this mess has been very disappointing because I had setup a bunch of OTA shows to be recorded from our 6 SiliconDust tuners.  Also I have made some very extensive music playlists where a couple had hundreds of hand-picked music from our collection.

This sucks.

You can just enter your Emby Premiere key into your new installation and you'll be fine.

Before you go to such a drastic step you could try installing the latest version of the server again on top of itself.

Link to comment
Share on other sites

Q-Droid

Emby relies on the access allowed by the OS and I really doubt redoing anything on the Emby side is going to make a difference.

If you want to test access for user emby on your Debian host then try this:

sudo su - emby -s /bin/bash

This way you can try to navigate the NFS volumes from the shell as emby to see how far you get and perhaps more useful info.

 

Search for Synology issues with NFS on DSM 7 on the web. There might be some posts in here with info but unless you know specifically what to look for it's going to be difficult.

I have kept from giving specific advice on this because of Synology and the DSM way of doing things. But at a high level, when dealing with NFS and Linux/UNIX clients life is easier when:

1. The user exists on both the NFS server and client with the same UID/GID. This means aligning the user and groups of interest so that they appear the same on both. With emby it's usually fairly easy because both emby user and group are "custom", meaning not a built in standard UID/GID. Be careful when changing UID/GID and it's better to do so on the NFS server side if possible and not on the Emby server side that's already running and working.

2. Change ownership of the files and directories on the NFS exports to match the primary user on the client. Again, in this case that would be emby.

If you can't do the above then at least make sure the mappings are configured so that the client has the needed access. In the case of DSM this might be done through Squash and maybe other options. They should also support ACLs but I'm not familiar with how the DSM UI might present these.

If the above doesn't make sense to you then research the DSM 7 NFS issues, perhaps in Synology forums or other places. Spend more time trying to understand what they mean and how to get there.

 

Link to comment
Share on other sites

yodajones

@LukeMy Emby Server is already on Version 4.7.14.0.  Isn't this the latest version?  Did you want me to try re-installing this version over the existing same version?  If so, I can try that. Let me know.

@Q-DroidI mentioned Thursday that I cannot login to the Emby Server via SSH as the emby user for some reason.

Speaking of mounted NFS Shares, I have a question.  If any remote file system is mounted via NFS, or even CIFS for that matter, what does running CHMOD or CHOWN from the remote machine actually do?  I mean, if the files are residing on the Synology NAS and mounted on the Emby Server via NFS or CIFS, what would running CHMOD or CHOWN from the Emby Server do?  It would seem to me that regardless what CHMOD or CHOWN are run the Synology NAS would maintain it's own file permissions.  Can someone set me straight on this?

Link to comment
Share on other sites

Q-Droid
1 minute ago, yodajones said:

 

@Q-DroidI mentioned Thursday that I cannot login to the Emby Server via SSH as the emby user for some reason.

Speaking of mounted NFS Shares, I have a question.  If any remote file system is mounted via NFS, or even CIFS for that matter, what does running CHMOD or CHOWN from the remote machine actually do?  I mean, if the files are residing on the Synology NAS and mounted on the Emby Server via NFS or CIFS, what would running CHMOD or CHOWN from the Emby Server do?  It would seem to me that regardless what CHMOD or CHOWN are run the Synology NAS would maintain it's own file permissions.  Can someone set me straight on this?

Did you try what I posted?

Regarding chmod, chown and permissions. Running any of those commands would work IF allowed within the setup. To run chown requires elevated privileges. If those privileges (root) match on both the NFS client and server then it would execute the command. Same for chmod and permissions which is why having common UID/GID on the client and server makes things go smoother. CIFS is different not being POSIX compliant so there will be limits to what can be done with ownership, permissions and other attributes. But this has to fit within the options available in DSM 7 for NFS.

The reason you see ownership of nobody on the client is likely due to settings around id mapping.

https://kb.synology.com/en-ph/DSM/help/DSM/AdminCenter/file_share_privilege_nfs?version=7

 

Link to comment
Share on other sites

  • 2 weeks later...
yodajones

@Q-DroidThe Squash settings on the Synology were set to "Map root to admin".  This setting used to work.  I tried changing this setting to "Map all users to admin" and the Embed Server user still cannot access the files.

I don't know if this is relevant, but I see this error also now.  See attachment.

 

thumbnail-image-extraction-failure.jpg

Link to comment
Share on other sites

OK the error in your screenshot is from 12/31. Let us know if it happens again. Thanks.

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