uk_philip 0 Posted May 28, 2021 Posted May 28, 2021 Hi. Emby has been working perfect for months, no issues at all. I updated today and rebooted my computer. Since then Emby won't start. I've tried reinstalling, rebooting again, changing ownership of some folders and reading though the forums to see if anyone else has had this same issue. I'm guessing the problem is because Emby can't access "lastversion.txt", I have changed ownership of that file to my user but it still can't access the file. Any help will be greatly appreciated, I don't want to have to completely uninstall and reinstall Emby as my library is huge. embyserver-63757762432.txt
uk_philip 0 Posted May 28, 2021 Author Posted May 28, 2021 I have now tried completely uninstalling emby and reinstalling it. Still getting the same error, gonna try rolling it back to an older version if I can't get it to work soon
Q-Droid 989 Posted May 28, 2021 Posted May 28, 2021 Changing ownership can definitely muck things up. Let's see who's running things. ls -l /var/lib/emby/logs Should be the emby user but if not you'll have to figure out why. If it's emby then everything under /var/lib/emby should be owned by the same. chown -R emby /var/lib/emby
uk_philip 0 Posted May 28, 2021 Author Posted May 28, 2021 1 hour ago, Q-Droid said: Changing ownership can definitely muck things up. Let's see who's running things. ls -l /var/lib/emby/logs Should be the emby user but if not you'll have to figure out why. If it's emby then everything under /var/lib/emby should be owned by the same. chown -R emby /var/lib/emby Thanks for replying! Everything is owned by emby, but when I try to start Emby I still get that same access denied error.
Luke 42077 Posted May 28, 2021 Posted May 28, 2021 Hi, that's odd. Try deleting the file that it's complaining about and see if that helps.
uk_philip 0 Posted May 28, 2021 Author Posted May 28, 2021 16 minutes ago, Luke said: Hi, that's odd. Try deleting the file that it's complaining about and see if that helps. Still the same error even though the file it's trying to access no longer exists. Might try installing Beta version instead see if that helps? embyserver-63757784753.txt
Luke 42077 Posted May 28, 2021 Posted May 28, 2021 No I think you need to look at the permissions of the /var/lib/emby folder recursively. Have you taken a look at this?
Q-Droid 989 Posted May 28, 2021 Posted May 28, 2021 (edited) Let's do this again and please post the output. ls -l /var/lib/emby/logs ls -l /var/lib/emby ls -l /var/lib/emby/data/lastversion.txt Edited May 28, 2021 by Q-Droid
uk_philip 0 Posted May 28, 2021 Author Posted May 28, 2021 3 hours ago, Q-Droid said: Let's do this again and please post the output. ls -l /var/lib/emby/logs ls -l /var/lib/emby ls -l /var/lib/emby/data/lastversion.txt phil@phil-HPE-470uk:~$ ls -l /var/lib/emby/logs total 37860 -rw-r--r-- 1 emby phil 401078 May 24 18:23 embyserver-63757481164.txt -rw-r--r-- 1 emby phil 505875 May 24 22:57 embyserver-63757497599.txt -rw-r--r-- 1 emby phil 743451 May 25 15:11 embyserver-63757555893.txt -rw-r--r-- 1 emby phil 697970 May 25 22:48 embyserver-63757584000.txt -rw-r--r-- 1 emby phil 8156313 May 26 08:10 embyserver-63757617097.txt -rw-r--r-- 1 emby phil 6599627 May 26 22:59 embyserver-63757670400.txt -rw-r--r-- 1 emby phil 10433657 May 27 21:10 embyserver-63757750231.txt -rw-r--r-- 1 emby phil 1095760 May 27 22:59 embyserver-63757756800.txt -rw-r--r-- 1 emby phil 11730 May 28 00:09 embyserver-63757757373.txt -rw-r--r-- 1 emby phil 11871 May 28 00:27 embyserver-63757758425.txt -rw-r--r-- 1 emby phil 11730 May 28 00:28 embyserver-63757758533.txt -rw-r--r-- 1 emby phil 11730 May 28 00:29 embyserver-63757758568.txt -rw-r--r-- 1 emby phil 11730 May 28 00:32 embyserver-63757758721.txt -rw-r--r-- 1 emby phil 11730 May 28 00:32 embyserver-63757758737.txt -rw-r--r-- 1 emby phil 11730 May 28 00:34 embyserver-63757758842.txt -rw-r--r-- 1 emby phil 11730 May 28 00:40 embyserver-63757759221.txt -rw-r--r-- 1 emby phil 11730 May 28 00:50 embyserver-63757759830.txt -rw-r--r-- 1 emby phil 11730 May 28 00:50 embyserver-63757759848.txt -rw-r--r-- 1 emby phil 11730 May 28 00:55 embyserver-63757760113.txt -rw-r--r-- 1 emby phil 172586 May 27 23:53 embyserver-63757760297.txt -rw-r--r-- 1 emby phil 10113 May 27 23:58 embyserver-63757760326.txt -rw-r--r-- 1 emby phil 11871 May 28 01:04 embyserver-63757760663.txt -rw-r--r-- 1 emby phil 11730 May 28 01:13 embyserver-63757761191.txt -rw-r--r-- 1 emby phil 11730 May 28 01:18 embyserver-63757761525.txt -rw-r--r-- 1 emby phil 11730 May 28 01:30 embyserver-63757762240.txt -rw-r--r-- 1 emby phil 11871 May 28 01:33 embyserver-63757762432.txt -rw-r--r-- 1 emby phil 11730 May 28 02:17 embyserver-63757765047.txt -rw-r--r-- 1 emby phil 11541 May 28 02:30 embyserver-63757765846.txt -rw-r--r-- 1 emby phil 11730 May 28 02:40 embyserver-63757766406.txt -rw-r--r-- 1 emby phil 11802 May 28 02:40 embyserver-63757766442.txt -rw-r--r-- 1 emby phil 11730 May 28 02:49 embyserver-63757766995.txt -rw-r--r-- 1 emby emby 11871 May 28 05:06 embyserver-63757775169.txt -rw-r--r-- 1 emby emby 11730 May 28 05:31 embyserver-63757776702.txt -rw-r--r-- 1 emby emby 10936 May 28 07:45 embyserver-63757784753.txt -rw-r--r-- 1 emby emby 11268 May 28 08:17 embyserver-63757786648.txt -rw-r--r-- 1 emby emby 11268 May 28 08:17 embyserver-63757786673.txt -rw-r--r-- 1 emby emby 12320 May 28 15:28 embyserver-63757812534.txt -rw-r--r-- 1 emby emby 12203 May 28 15:37 embyserver-63757813033.txt -rw-r--r-- 1 emby phil 31407 May 26 21:28 ffmpeg-remux-22a5bd46-778b-485f-afaf-11caf834da7e_1.txt -rw-r--r-- 1 emby phil 26887 May 26 20:38 ffmpeg-remux-ba9ae463-8101-47b7-a1bd-5bb42c61bc0e_1.txt -rw-r--r-- 1 emby phil 187755 May 27 20:33 ffmpeg-transcode-0dae079c-6c89-43a4-b97c-077fc734478f_1.txt -rw-r--r-- 1 emby phil 19171 May 26 21:33 ffmpeg-transcode-1d811bb4-baa2-43ed-a706-95817abe463e_1.txt -rw-r--r-- 1 emby phil 1041338 May 26 05:55 ffmpeg-transcode-4602e901-c382-421f-b275-3d626e854c32_1.txt -rw-r--r-- 1 emby phil 20831 May 27 16:45 ffmpeg-transcode-58c38cc7-7342-4044-98b2-e206456b81b2_1.txt -rw-r--r-- 1 emby phil 2104125 May 27 17:08 ffmpeg-transcode-629b4ba4-daeb-454d-a307-48f3d6797375_1.txt -rw-r--r-- 1 emby phil 1123863 May 26 04:05 ffmpeg-transcode-62d3337d-5cad-411f-88c2-7a8313e14fea_1.txt -rw-r--r-- 1 emby phil 856482 May 26 21:42 ffmpeg-transcode-6b833751-8360-4cd3-9e5e-0fc27578d9ef_1.txt -rw-r--r-- 1 emby phil 1048399 May 26 22:38 ffmpeg-transcode-6f5559a2-c7ac-45e9-8a3f-349424301e03_1.txt -rw-r--r-- 1 emby phil 915352 May 26 05:06 ffmpeg-transcode-75766ebc-7db0-42fa-adf4-2a290b4a76c9_1.txt -rw-r--r-- 1 emby phil 1058756 May 26 21:24 ffmpeg-transcode-76de3faf-72ba-41d6-8566-487e02448259_1.txt -rw-r--r-- 1 emby phil 158212 May 27 20:31 ffmpeg-transcode-9e6b6071-62ee-41c3-9ea5-d1f5c311eb35_1.txt -rw-r--r-- 1 emby phil 27233 May 27 20:31 ffmpeg-transcode-c17a909b-cc79-44dc-90eb-c6cb64aeb065_1.txt -rw-r--r-- 1 emby phil 136009 May 27 21:22 ffmpeg-transcode-ecdfd0e3-fbae-4f69-8b48-ccc4435f76e8_1.txt -rw-r--r-- 1 emby phil 176229 May 24 18:26 hardware_detection-63757481185.txt -rw-r--r-- 1 emby phil 176229 May 25 15:11 hardware_detection-63757555908.txt -rw-r--r-- 1 emby phil 176228 May 26 08:11 hardware_detection-63757617105.txt -rw-r--r-- 1 emby phil 176228 May 27 21:11 hardware_detection-63757750272.txt
uk_philip 0 Posted May 28, 2021 Author Posted May 28, 2021 3 hours ago, Q-Droid said: Let's do this again and please post the output. ls -l /var/lib/emby/logs ls -l /var/lib/emby ls -l /var/lib/emby/data/lastversion.txt phil@phil-HPE-470uk:~$ ls -l /var/lib/emby total 1224 drwxr-xr-x 17 emby phil 4096 May 27 21:30 cache drwxr-xr-x 5 emby phil 4096 Oct 29 2020 config lrwxrwxrwx 1 emby phil 18 Jan 14 22:59 data -> /dev/shm/emby-data drwxr-xr-x 7 emby phil 4096 May 28 01:36 data-static drwxr-xr-x 2 emby phil 90112 May 28 15:37 logs drwxr-xr-x 8 emby phil 4096 May 26 08:17 metadata drwxr-xr-x 3 emby phil 4096 Jan 13 05:08 plugins drwxr-xr-x 3 emby phil 4096 Jul 19 2020 root drwxr-xr-x 4 emby phil 4096 Jan 15 17:52 sync drwxr-xr-x 2 emby phil 1126400 Jan 16 08:14 transcoding-temp
uk_philip 0 Posted May 28, 2021 Author Posted May 28, 2021 3 hours ago, Q-Droid said: Let's do this again and please post the output. ls -l /var/lib/emby/logs ls -l /var/lib/emby ls -l /var/lib/emby/data/lastversion.txt phil@phil-HPE-470uk:~$ ls -l /var/lib/emby/data/lastversion.txt -rwxr-xr-x 1 emby phil 8 May 28 01:36 /var/lib/emby/data/lastversion.txt
uk_philip 0 Posted May 28, 2021 Author Posted May 28, 2021 4 hours ago, Luke said: No I think you need to look at the permissions of the /var/lib/emby folder recursively. Have you taken a look at this? Why would there be a permissions issue all the sudden? I have been using this fine no problems for about a year now. Seems strange
Solution Q-Droid 989 Posted May 28, 2021 Solution Posted May 28, 2021 Under normal circumstances I would agree that it seems strange. But you didn't disclose that you appear to be copying the data directory to /dev/shm as part of your startup process. Not exactly a minor detail. lrwxrwxrwx 1 emby phil 18 Jan 14 22:59 data -> /dev/shm/emby-data So you have to make sure the emby user has access to that resource as well. Can't tell yet whether this is an Emby, OS or data staging problem.
uk_philip 0 Posted May 28, 2021 Author Posted May 28, 2021 (edited) 1 hour ago, Q-Droid said: Under normal circumstances I would agree that it seems strange. But you didn't disclose that you appear to be copying the data directory to /dev/shm as part of your startup process. Not exactly a minor detail. lrwxrwxrwx 1 emby phil 18 Jan 14 22:59 data -> /dev/shm/emby-data So you have to make sure the emby user has access to that resource as well. Can't tell yet whether this is an Emby, OS or data staging problem. I didn't know I was copying the data to dev/shm. I followed this guide a few months ago to speed up Emby, could it be something to do with this? That error is no longer showing but emby still won't start Edit* After using "sudo chown -R emby /dev/shm/emby-data" Emby started to work again. Thank you so much!! embyserver.txt Edited May 28, 2021 by uk_philip
Q-Droid 989 Posted May 28, 2021 Posted May 28, 2021 Good, this is a start and you're not quite done yet. The /dev/shm is a memory backed fs and volatile. So the changes you made to /dev/shm/emby-data will be lost when the host reboots. This is also a good way to lose your Emby databases and everything else in the data directory. A server crash or loss of power or any other unexpected shutdown will leave you without incremental changes made since the previous startup. You might want to consider cleanly reverting data to the default location in emby home and test to see if performance is acceptable. If you want to stick with /dev/shm then keep the above in mind.
uk_philip 0 Posted May 28, 2021 Author Posted May 28, 2021 20 minutes ago, Q-Droid said: Good, this is a start and you're not quite done yet. The /dev/shm is a memory backed fs and volatile. So the changes you made to /dev/shm/emby-data will be lost when the host reboots. This is also a good way to lose your Emby databases and everything else in the data directory. A server crash or loss of power or any other unexpected shutdown will leave you without incremental changes made since the previous startup. You might want to consider cleanly reverting data to the default location in emby home and test to see if performance is acceptable. If you want to stick with /dev/shm then keep the above in mind. Thanks. It's stopped working again. emby-server.service - Emby Server is a personal media server with apps on just about every device. Loaded: loaded (/lib/systemd/system/emby-server.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Fri 2021-05-28 19:28:28 BST; 30s ago Process: 5326 ExecStartPre=/opt/emby-server/bin/emby-data_sync.sh (code=exited, status=23) Process: 5331 ExecStopPost=/opt/emby-server/bin/emby-data_sync.sh (code=exited, status=23) May 28 19:28:28 phil-HPE-470uk emby-data_sync.sh[5331]: --> Emby: Sync Disk May 28 19:28:28 phil-HPE-470uk emby-data_sync.sh[5333]: sending incremental file list May 28 19:28:28 phil-HPE-470uk emby-data_sync.sh[5333]: rsync: chgrp "/var/lib/emby/data-static/." failed: Operation not permitted (1) May 28 19:28:28 phil-HPE-470uk emby-data_sync.sh[5333]: ./ May 28 19:28:28 phil-HPE-470uk emby-data_sync.sh[5333]: sent 119,434 bytes received 1,072 bytes 241,012.00 bytes/sec May 28 19:28:28 phil-HPE-470uk emby-data_sync.sh[5333]: total size is 1,593,637,353 speedup is 13,224.55 May 28 19:28:28 phil-HPE-470uk emby-data_sync.sh[5333]: rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3] May 28 19:28:28 phil-HPE-470uk systemd[1]: emby-server.service: Control process exited, code=exited, status=23/n/a May 28 19:28:28 phil-HPE-470uk systemd[1]: emby-server.service: Failed with result 'exit-code'. May 28 19:28:28 phil-HPE-470uk systemd[1]: Failed to start Emby Server is a personal media server with apps on just about every device..
Q-Droid 989 Posted May 28, 2021 Posted May 28, 2021 Yup, sync is showing problems. The sync from RAM back to Disk is the one above. I wouldn't be surprised if Disk to RAM is also throwing errors.
Dan64 30 Posted May 29, 2021 Posted May 29, 2021 (edited) The script is working on my system. looking to your logs it seems that your static directory is corrupted There could be several resons for that, if your system is very slow probably the timer of 5m used in the systemctl service is too low, try to increase it to 10m. Practically you have to change the systemd service as follow: [Unit] Description=Emby Server is a personal media server with apps on just about every device. After=network.target [Service] TimeoutSec=10min EnvironmentFile=/etc/emby-server.conf WorkingDirectory=/opt/emby-server ExecStartPre=/opt/emby-server/bin/emby-data_sync.sh ExecStart=/opt/emby-server/bin/emby-server ExecStopPost=/opt/emby-server/bin/emby-data_sync.sh RestartForceExitStatus=3 User=emby [Install] WantedBy=multi-user.target But now you have to manually fix your folder. The simpler action could be to run just this command sudo chown -R emby:emby /var/lib/emby Edited May 29, 2021 by Dan64 1
Q-Droid 989 Posted May 29, 2021 Posted May 29, 2021 With the ongoing SQL changes and the recent introduction of DB cache tunables and DB optimization this approach is high risk for low returns. It's fine for users who understand what it does, accept the risk and can fix it when something breaks. And three years ago it could have given big libraries on slowish storage a major perf boost overall. Users on the current release of Emby should reconsider - go back to the default data location if using /dev/shm or at least test to see if the performance boost is noticeable enough to keep it.
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