Jump to content

Empty Library


Go to solution Solved by Q-Droid,

Recommended Posts

anonymousmouse
Posted

Emby library suddenly has no media. Emby can see the media as confirmed by the fact that I was able to search for it through Emby  if I tried to add a new library. I really don't want to do this for tv. Emby screwed up the naming on a good portion of my library the first time (Don't even mention name formatting, My library conforms) and I noticed in the new Movie library I created I lost all my identified watched movies. I really want to like Emby but it seems to screw up monthly even when I don't touch it. I am afraid to even add media anymore.

Rant over. How do I get my libraries back without just creating new libraries? Scanning libraries only finds my middle finger.

anonymousmouse
Posted (edited)

Thought I was pretty specific but ok. Monday  June 2, 2025 In the evening I logged into Emby via the browser and watched a tv show and browsed the movie library. Both were populated with my collection of each. Tuesday June 3rd 2025 In the afternoon I logged in to Emby via the browser and both my movie and tv libraries where empty.  I tried immediately on the server itself and had the same problem on it directly. On June 3rd, 2025 I could go into settings and do all the work to add a new library and Emby could see my media folders so it's not a permission problem.

Logs.

 

embyserver.txt

Anonymize log contents
 
2025-06-04 00:00:00.004 Info App: Emby Server Version: 4.8.11.0
2025-06-04 00:00:00.004 Info App: Emby
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-rpm_{version}_x86_64.rpm
Operating system: Linux version 5.14.0-503.38.1.el9_5.x86_64 (mockbuild@iad1-prod-build001.bld.equ.rockylinux.org) (gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5), GNU ld
Framework: .NET 6.0.36
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
2025-06-04 00:00:00.004 Info App: Logs path: /var/lib/emby/logs
2025-06-04 00:00:00.004 Info App: Cache path: /var/lib/emby/cache
2025-06-04 00:00:00.004 Info App: Internal metadata path: /var/lib/emby/metadata
2025-06-04 00:00:00.004 Info App: Transcoding temporary files path: /var/lib/emby/transcoding-temp
2025-06-04 00:00:00.004 Info App: Plugins:
Backup & Restore 1.7.8.0
Bluray Folder Support 1.0.2.0
Cinema Intros 1.0.47.0
Diagnostics PlugIn 4.8.0.81
DLNA 1.5.0.0
Dvd Folder Support 1.0.0.0
Emby Guide Data 1.0.18.0
Fanart.tv 1.0.16.0
M3U TV Tuner 1.0.39.0
MovieDb 1.8.3.0
MusicBrainz 1.0.25.0
Nfo Metadata 1.0.83.0
OMDb 1.0.22.0
Open Subtitles 1.0.64.0
Port Mapper 1.2.8.0
Studio Images 1.0.3.0
TheAudioDb 1.0.20.0
TheTVDB 1.6.2.0
Webhooks 1.0.35.0
XmlTV 1.2.0.0
2025-06-04 00:00:17.577 Error App: Error sending socket message from 192.168.68.62:54689 to 239.255.255.250:1900
*** Error Report ***
Version: 4.8.11.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-rpm_{version}_x86_64.rpm
Operating system: Linux version 5.14.0-503.38.1.el9_5.x86_64 (mockbuild@iad1-prod-build001.bld.equ.rockylinux.org) (gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5), GNU ld
Framework: .NET 6.0.36
OS/Process: x64/x64
Edited by anonymousmouse
Posted

In order for help here you need to attach the full log file (Best way is to restart emby-server then scan libraries then download (with anonymize on) embyserver.txt)

then drag the downloaded file to your reply below.

visproduction
Posted (edited)

Anon, 

Check your Admin / Emby Server / Users / Access Tab & Parental Control

There was just a similar issue last week, where somehow the rights to see libraries or Parental control ratings was limited for a login, which resulted a lot of content missing.  The content came back when the rights were turned back on.

Edited by visproduction
anonymousmouse
Posted
8 minutes ago, visproduction said:

Anon, 

Check your Admin / Emby Server / Users / Access Tab & Parental Control

There was just a similar issue last week, where somehow the rights to see libraries or Parental control ratings was limited for a login, which resulted a lot of content missing.  The content came back when the rights were turned back on.

Maximum allowed parental rating is blank. There doesn't appear to be any Restrict Items With Tags.
Library Access  Enable access to all libraries is checked.

 
visproduction
Posted

Aha... Well with Linux, file access rights shift and change a lot, sometimes after updates or other shananigans.  I assume you already checked that the files are stored and accessible with a login using command line terminal?  Which user and group does Emby use?  Can you login to terminal with that account.  I guess that is the best to check if the files have no rights blocking. 

anonymousmouse
Posted
3 hours ago, visproduction said:

Aha... Well with Linux, file access rights shift and change a lot, sometimes after updates or other shananigans.  I assume you already checked that the files are stored and accessible with a login using command line terminal?  Which user and group does Emby use?  Can you login to terminal with that account.  I guess that is the best to check if the files have no rights blocking. 

Emby has it's own user group, Emby. I believe it does have rights. If I go in to Emby (Website)server settings and go to libraries and I can add a new library and browse for the location and see the folders with my media, including the media itself Example. Home folder-Media-TV-TV show season- Episode.media. Also If I select details it shows Emby as the owner with read permission.

I may end up just adding a new library and deleting the old one I just don't want to lose my "watched" tagged media.

Posted

Sorry for the delay…

That log is only 1 min, 8 sec please attach on that includes a “Scan Library Files” on a problem library after it completes (or at least runs for 10 min (please don’t edit the file the anonymous download does work (at least for embyserver*.txt files)

What the log does show is that you have a lot of plugins installed, do you Really use all of these? Please uninstall the ones you are not really using (then restart emby).

I see :

Info	2025-06-05 16:23:18	Info	LibraryMonitor	Watching directory with new FileSystemWatcher for /run/media/nemesis/3ff9d542-0267-4d30-ae1c-779b9e8265b9/Videos/Movies for item 32355

So lets start there:

o   How is this directory being mount? Why is mounted on “/run” (meant of OS use)

o   What do you get if you run the following command “namei -mo /run/media/nemesis/3ff9d542-0267-4d30-ae1c-779b9e8265b9/Videos/Movies”

Next I see 9 errors and the log ends the errors are all:

Error sending socket message from 192.168.68.62:53105 to 239.255.255.250:1900	*** Error Report ***
	Version: 4.8.11.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-rpm_{version}_x86_64.rpm
	Operating system: Linux version 5.14.0-503.38.1.el9_5.x86_64 (mockbuild@iad1-prod-build001.bld.equ.rockylinux.org) (gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5), GNU ld
	Framework: .NET 6.0.36
	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.Net.Sockets.SocketException: System.Net.Sockets.SocketException (13): Permission denied
	   at Rssdp.SsdpCommunicationsServer.SendFromSocket(Tuple`3 socketTuple, Memory`1 messageData, IPEndPoint destination, CancellationToken cancellationToken)
	Source: System.Private.CoreLib
	TargetSite: Void Throw()
	

The Socket appears to be failing to open a multicast session?? Why or what I’m not familiar with OTHER helpers?)

None the less I think it would be very useful to sea a full log with a scan (at least running for a while), thanks.

anonymousmouse
Posted (edited)
38 minutes ago, TMCsw said:

Sorry for the delay…

That log is only 1 min, 8 sec please attach on that includes a “Scan Library Files” on a problem library after it completes (or at least runs for 10 min (please don’t edit the file the anonymous download does work (at least for embyserver*.txt files)

What the log does show is that you have a lot of plugins installed, do you Really use all of these? Please uninstall the ones you are not really using (then restart emby).

I see :

Info	2025-06-05 16:23:18	Info	LibraryMonitor	Watching directory with new FileSystemWatcher for /run/media/nemesis/3ff9d542-0267-4d30-ae1c-779b9e8265b9/Videos/Movies for item 32355

So lets start there:

o   How is this directory being mount? Why is mounted on “/run” (meant of OS use)

o   What do you get if you run the following command “namei -mo /run/media/nemesis/3ff9d542-0267-4d30-ae1c-779b9e8265b9/Videos/Movies”

Next I see 9 errors and the log ends the errors are all:

Error sending socket message from 192.168.68.62:53105 to 239.255.255.250:1900	*** Error Report ***
	Version: 4.8.11.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-rpm_{version}_x86_64.rpm
	Operating system: Linux version 5.14.0-503.38.1.el9_5.x86_64 (mockbuild@iad1-prod-build001.bld.equ.rockylinux.org) (gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5), GNU ld
	Framework: .NET 6.0.36
	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.Net.Sockets.SocketException: System.Net.Sockets.SocketException (13): Permission denied
	   at Rssdp.SsdpCommunicationsServer.SendFromSocket(Tuple`3 socketTuple, Memory`1 messageData, IPEndPoint destination, CancellationToken cancellationToken)
	Source: System.Private.CoreLib
	TargetSite: Void Throw()
	

The Socket appears to be failing to open a multicast session?? Why or what I’m not familiar with OTHER helpers?)

None the less I think it would be very useful to sea a full log with a scan (at least running for a while), thanks.

Starting from the top since you discussed a lot, not complaining. I scanned my tv library via setting, Emby Server, library and then uploaded the logs here. If I am supposed to do something different I'm going to need better directions. I am not to familiar with how this works in details. Put simply I am an idiot.

Plugins... I have not purposely installed any. I looked and most of those, if not all I have no idea what they are. I could research them and uninstall any I don't use but that will take time.

As far as why it's mounted in run, that is where my system mounted it. I am not sure if this will help answer that question but the libraries are kept on a hard drive  only used for the libraries mounted via a hard drive enclosure. I think that's the term. 

$ namei -mo /run/media/nemesis/3ff9d542-0267-4d30-ae1c-779b9e8265b9/Videos/Movies
f: /run/media/nemesis/3ff9d542-0267-4d30-ae1c-779b9e8265b9/Videos/Movies
 dr-xr-xr-x root root /
 drwxr-xr-x root root run
 drwxr-xr-x root root media
 drwxr-x--- emby emby nemesis
 drwxr-xr-x emby emby 3ff9d542-0267-4d30-ae1c-779b9e8265b9
 drwxr-xr-x emby emby Videos
 drwxr-xr-x emby emby Movies

"The Socket appears to be failing to open a multicast session?? Why or what I’m not familiar with OTHER helpers?)

None the less I think it would be very useful to sea a full log with a scan (at least running for a while), thanks."

Not really following you here. If I understand multicast sessions, and I probably don't I watch the media mostly on my laptop, which is not my  Emby server unless that is casting I don't think I am trying to cast. 

Full logs?

If I missed anything I apologies, I'll try and address it in my next response.

2.txt

Edited by anonymousmouse
Posted

Okay an emby dev. will need to comment on this @Lukeas there are nearly 7K of the below errors:

Error sending socket message from 192.168.68.62:53105 to 239.255.255.250:1900    *** Error Report ***

I actually do think the library is mounting is a (another) problem but I have verry little experience with 'Arch based' Linux systems, perhaps @Q-Droidor the other Linux peps here can help more. 

Q-Droid
Posted

The socket errors look like DLNA broadcasts. I don't know why they're erroring but if you don't use DLNA then it's safe to remove that plugin to stop the logging.

Is the storage enclosure USB attached? Does it spin down/sleep? What were the steps to mount it?

At first I was thinking that it might be a case of storage spinning down or sleeping at a time when the Emby server runs a scheduled scan. If it can't find the media then it can treat the condition as a deletion. But I would expect it to find and refresh the media when the mount is accessible again.

Does anything change if you reboot the server? Can Emby then find the files to rescan and present the media again?

 

anonymousmouse
Posted
On 6/7/2025 at 12:10 PM, Q-Droid said:

The socket errors look like DLNA broadcasts. I don't know why they're erroring but if you don't use DLNA then it's safe to remove that plugin to stop the logging.

Is the storage enclosure USB attached? Does it spin down/sleep? What were the steps to mount it?

At first I was thinking that it might be a case of storage spinning down or sleeping at a time when the Emby server runs a scheduled scan. If it can't find the media then it can treat the condition as a deletion. But I would expect it to find and refresh the media when the mount is accessible again.

Does anything change if you reboot the server? Can Emby then find the files to rescan and present the media again?

 

I believe I removed the DLNA plugin. Assuming I understood how to.

Yes, it's USB attached. It does not I believe. Up until now I have not had to do anything to watch any media on it. 

Mounting it.

This is a bit complex. Upon booting the server I have to switch it off or the computer won't boot.Been a while since I tried it so can't remember exactly where but it hangs until I power off the enclosure. Once logged in turning the power switch on the enclosure to the on position automatically mounts it. However with a server restart Emby no longer has permissions and I have to modify them in the terminal. 

Nothing seemed to change on my end. My tv selection is still blank however if I go in like I am adding a new library Emby finds my media, as it has since I started this thread.
 

Q-Droid
Posted

This makes more sense now. If at any time the Emby server happens to start and scan while the enclosure volumes are not mounted then it can remove that media from the libraries (not delete the files). There are different scenarios for this to happen so it's not guaranteed but it's a risk.

It sounds to me like your problem is centered entirely around your enclosure and how the storage is mounted. Emby can only work with the resources it's given and if it has unreliable hardware and storage then it's going to be hit or miss. 

Your goal should be to get your server to mount the external storage on boot so that it's ready and has the right permissions every time. Probably also configure Emby to not start if the storage is missing so you don't run into "deleted" libraries.

 

  • Agree 2
anonymousmouse
Posted

So what caused the problem in the first place since the server was running and not shutoff between uses? And why did it this time and not the entire year prior in it's use, including a few reboots?

Posted

Can’t really say why it worked up till recently (OS updates?) but auto-mounts are prone to access/permission problems.

I’d suggest trying the following get the info to the subject USB drive:

df -h

Find the drive that is automounted and note the first column i.e. /dev/hd$#

Now use that file info (remember on linux everything is a file) to find it’s UUID with this:

sudo blkid /dev/sd$#

copy the UUID=”looks like garbage” part

Now `sudo nano /etc/fstab` and go to the bottom and add an new line 

UUID=”looks like garbage” /mnt/m ext4 defaults,lazytime,nofail 0 0

Save and exit (CRTL-s,CRTL-x)

I’m using “/mnt/m”  as an example but you can use (almost) any EMPY directory you want (must exist) and have proper privileges. I’m also assuming the drive is EXT4 formatted.

Now `sudo mount -a`

If it doesn’t error then REBOOT the computer (with the USB drive attached and powered up.)

Now `df -h `

Make sure the permissions for the drive are good

If your mounts are different from what they were then you will need to Edit the Library folders and remove the old one(s) and add the new one(s).

Unfortunately this will likely need a rescan of your library(ies) But the user stats should be maintained.

Get back here regardless (if in doubt ask)

  • Like 1
anonymousmouse
Posted

$ df -h
Filesystem                           Size  Used Avail Use% Mounted on
devtmpfs                             4.0M     0  4.0M   0% /dev
tmpfs                                7.6G     0  7.6G   0% /dev/shm
tmpfs                                3.1G  9.7M  3.1G   1% /run
/dev/mapper/rl_localhost--live-root   70G   12G   59G  16% /
tmpfs                                7.6G  8.0K  7.6G   1% /tmp
/dev/nvme0n1p1                       960M  703M  258M  74% /boot
/dev/mapper/rl_localhost--live-home  387G   96G  292G  25% /home
tmpfs                                1.6G   76K  1.6G   1% /run/user/1000
/dev/sda2                            3.7T  2.4T  1.3T  66% /run/media/nemesis/Backup Plus
/dev/sdb1                            916G  117G  754G  14% /run/media/nemesis/3aacfa98-e12f-4673-acc4-d356d44e353c
/dev/sdd1                             11T  2.2T  8.1T  22% /run/media/nemesis/3ff9d542-0267-4d30-ae1c-779b9e8265b9

SDD1 is the media drive

/dev/sdd1: UUID="3ff9d542-0267-4d30-ae1c-779b9e8265b9" TYPE="ext4" PARTUUID="166eb322-a14e-4a3b-b7ca-f1644ce9e830"
 

# /etc/fstab
# Created by anaconda on Wed Feb 19 20:47:26 2025
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
/dev/mapper/rl_localhost--live-root /                       xfs     defaults        0 0
UUID=26b595e8-060a-4ed2-b74b-7d8bea9cb792 /boot                   xfs     defaults        0 0
/dev/mapper/rl_localhost--live-home /home                   xfs     defaults        0 0
/dev/mapper/rl_localhost--live-swap none                    swap    defaults        0 0
UUID="3ff9d542-0267-4d30-ae1c-779b9e8265b9" /mnt/m ext4 defaults,lazytime,nofail 0 0

Am I supposed to create /mnt/m file? (m)

/mnt exists but not m

Posted
14 minutes ago, anonymousmouse said:

Am I supposed to create /mnt/m file? (m)

yes

 

anonymousmouse
Posted
20 minutes ago, TMCsw said:

yes

 

I guess I missed what it's supposed to have.

Posted

Is it working ? ...

anonymousmouse
Posted
  1. Is the m file blank?
  • Solution
Q-Droid
Posted

/mnt/m should be a directory path (not a file) using mkdir. The path "/mnt/m" was given as an example and you can call it "/mnt/media1" or something else for you to identify that external enclosure. If you have other enclosures then you can change those mounts too following a naming scheme that works for you.

 

anonymousmouse
Posted
On 6/9/2025 at 11:18 AM, Q-Droid said:

/mnt/m should be a directory path (not a file) using mkdir. The path "/mnt/m" was given as an example and you can call it "/mnt/media1" or something else for you to identify that external enclosure. If you have other enclosures then you can change those mounts too following a naming scheme that works for you.

 

OK sorry for the delay. I knew that, admittedly directories are something I am not real familiar with. It just didn't click at first. Unfortunately it gets worse. I did everything including modifying the fstab file and realized I had done it all on my laptop not my server. Facepalm!!! I repeated everything again on my server and it seems fixed at the moment. Weirdly some of the watched selected media stayed watched and some I know I have watched did not stay watched. I will also have to modify some of the metadata since some of my media is mislabeled but assuming it continues to see my media I think everything is back to how it should be. Thank you Q-Droid and TMCsw.

  • Like 2
  • Thanks 1
Q-Droid
Posted (edited)

The solution is really in the steps @TMCsw gave you to follow and the post that should be marked as such. Mine just cleared up some of the details.

 

 

Edited by Q-Droid
  • Thanks 1

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