Jump to content

some libraries losing contact with external hard drive until Emby restart


Recommended Posts

Posted

Occasionally, some (but not all) of my libraries which have had movies added from an external hard-drive cannot be found.  (If I try to play one movie, I get "no compatible streams".  The only remedy is to restart the Emby server, which necessitates re-scanning.  Again, not every library has this problem, just a few -- but if it does affect a library, every movie from the external drive cannot be played.

The big headache from this is that movies I've added to a Collection, which get afflicted by this glitch, gets removed and I have to manually add these movies again.

I thought that perhaps the drive was entering in a mode (sleep or something), but a couple of facts don't support this:  First, I can read from the drive anytime but it doesn't clear up the library's access.  Second, only some libraries have this happen (as mentioned above).  All movies in all libraries that have movies added from the drive would all be inaccessible, so this is most likely to be something with Emby.

I've gone as far as I can go with the non-Emby end of things.  Is this a known issue?

Thanks in advance,

-Wes

Posted (edited)

This isn't a playback issue.  This is a "things disappearing from the library" issue.  It's impossible to know when this happens exactly as it is something I notice perhaps days later, a may take weeks to appear.  This only happens with the external drives.  I'd just like to know if this is a known issue.

Edited by gogginguy
Happy2Play
Posted

Probably need to see server log and maybe even with debug enable for when it happens but does sound like a odd issue as it should affect the entire drive not specific files.  But can only be something specific to your setup.

  • Agree 1
Posted

When I setup the external drive, it could "see" but not navigate into the directories until I changed something with the permissions or something -- I don't remember and I don't have any notes about it (unlike me).  Please let me know how best to enable debug.  I'll have to fix things manually, and then check it each day until it happens again.  Thanks :)

Happy2Play
Posted

A server log would be the first step when issues happen.   Then we may need you to enable debug logging is nothing is seen.  But your issue does not make much sense so far.

Posted

Add to the particulars that a) the linux system restarts on it's own from time-to-time.  I will have to see if there's a causation there.  b) the server is a docker'd container which does not start upon reboot.  I do it manually with each linux restart.  Neither should make any difference, but best to note.

Posted (edited)

It happened again.  I restored from the previous day's backup.  Perfect.  I added all of my 4K movies to a Collection named "4K".  It listed 49 in the Collection.

Just now, I checked and "4K" only has 46.  The three missing movies all come from the same external drive directory /home/4KMOVIES/Drama.

What log files would you like to see?

Edited by gogginguy
Happy2Play
Posted
2 hours ago, gogginguy said:

It happened again.  I restored from the previous day's backup.  Perfect.  I added all of my 4K movies to a Collection named "4K".  It listed 49 in the Collection.

Just now, I checked and "4K" only has 46.  The three missing movies all come from the same external drive directory /home/4KMOVIES/Drama.

What log files would you like to see?

The embyserver log from when it happened.  So it could be the current embyserver.txt or the previous one.

 

Happy2Play
Posted (edited)

Well you have a storage/database issue.

	Line  332: 2025-02-26 07:30:57.291 Error App: Error in validateChildren for 33254 /storage/walter/OTHER MOVIES/damaged
	Line  359: 2025-02-26 07:31:02.851 Error App: Error in validateChildren for 51349 /storage/4KMOVIES/Thriller
	Line  384: 2025-02-26 07:31:02.852 Error App: Error in validateChildren for 51371 /storage/4KMOVIES/Romance
	Line  411: 2025-02-26 07:31:02.852 Error App: Error in validateChildren for 51394 /storage/4KMOVIES/Action-Adventure
	Line  438: 2025-02-26 07:31:02.853 Error App: Error in validateChildren for 51395 /storage/4KMOVIES/COLLECTIONS/MAD MAX
	Line  465: 2025-02-26 07:31:02.854 Error App: Error in validateChildren for 51501 /storage/4KMOVIES/Holiday
	Line  492: 2025-02-26 07:31:02.855 Error App: Error in validateChildren for 51503 /storage/4KMOVIES/Comedy
	Line  519: 2025-02-26 07:31:02.856 Error App: Error in validateChildren for 51504 /storage/4KMOVIES/COLLECTIONS/BEVERLY HILLS COP
	Line  546: 2025-02-26 07:31:02.857 Error App: Error in validateChildren for 51621 /storage/4KMOVIES/Sci-Fi
	Line  573: 2025-02-26 07:31:02.859 Error App: Error in validateChildren for 51663 /storage/4KMOVIES/Film Noir
	Line  598: 2025-02-26 07:31:02.860 Error App: Error in validateChildren for 51776 /storage/4KMOVIES/Westerns
	Line  775: 2025-02-26 07:31:02.972 Error App: Error in validateChildren for 51868 /storage/4KMOVIES/Animated Pixar Dreamworks
	Line  802: 2025-02-26 07:31:02.973 Error App: Error in validateChildren for 52003 /storage/4KMOVIES/COLLECTIONS/ROCKY
	Line  829: 2025-02-26 07:31:02.990 Error App: Error in validateChildren for 52347 /storage/4KMOVIES/Sports
	Line  856: 2025-02-26 07:31:02.991 Error App: Error in validateChildren for 52487 /storage/4KMOVIES/COLLECTIONS/OCEANS
	Line  883: 2025-02-26 07:31:03.060 Error App: Error in validateChildren for 58796 /storage/4KMOVIES/Marvel
	Line  910: 2025-02-26 07:31:03.063 Error App: Error in validateChildren for 58797 /storage/4KMOVIES/Musicals
	Line  937: 2025-02-26 07:31:03.066 Error App: Error in validateChildren for 58856 /storage/4KMOVIES/Food and Wine
	Line  964: 2025-02-26 07:31:03.068 Error App: Error in validateChildren for 58872 /storage/4KMOVIES/Stand-up

All showing, just picked one.

 System.IO.DirectoryNotFoundException: Could not find a part of the path '/storage/4KMOVIES/Comedy'.

 

Input/output error : '/storage/4KMOVIES/Film Noir'

So we will ask how many libraries do you have and the folder paths you have assigned to them?

Edited by Happy2Play
Happy2Play
Posted (edited)

OT: you need to adjust inotify also.

2025-02-26 01:52:10.925 Error LibraryMonitor: Error creating FileSystemWatcher for:

The configured user limit (128) on the number of inotify instances has been reached, or the per-process limit on the number of open file descriptors has been reached.

Looks like we only have a how to for Synology from Linux forum.

Looks like you need to adjust instances instead of watches.

fs.inotify.max_user_watches=1048576;
fs.inotify.max_user_instances=4096;

 

Edited by Happy2Play
Posted

I don't know Synology, but will try different settings anyway.

To answer:
33 libraries (18 have /storage/4KMOVIES/<library> mapped)  The others are not mapped to that external drive.

 

 
Happy2Play
Posted

@Lukeor @sa2000may have to help with the validateChildren error on all those libraries then.

Posted
On 2/26/2025 at 3:47 PM, Happy2Play said:

@Lukeor @sa2000may have to help with the validateChildren error on all those libraries then.

This is really nothing to worry about. It just means that the folder was offline or not available during the time of the library scan:

2025-02-26 07:30:57.291 Error App: Error in validateChildren for 33254 /storage/walter/OTHER MOVIES/damaged
	System.IO.DirectoryNotFoundException: System.IO.DirectoryNotFoundException: Could not find a part of the path '/storage/walter/OTHER MOVIES/damaged'.

Whatever the case may be, the server couldn't reach the folder, but the library scan can handle this and keep going and scan other things.

Posted
Quote

The only remedy is to restart the Emby server, which necessitates re-scanning. 

Why does restarting the server result in re-scanning? Did you set that up?

Posted
9 hours ago, Luke said:

Why does restarting the server result in re-scanning? Did you set that up?

If the library has gone offline and I've added a new movie, restarting won't find the new movie.  Until I rescan.
 

Posted
10 hours ago, Luke said:

This is really nothing to worry about. It just means that the folder was offline or not available during the time of the library scan:

2025-02-26 07:30:57.291 Error App: Error in validateChildren for 33254 /storage/walter/OTHER MOVIES/damaged
	System.IO.DirectoryNotFoundException: System.IO.DirectoryNotFoundException: Could not find a part of the path '/storage/walter/OTHER MOVIES/damaged'.

Whatever the case may be, the server couldn't reach the folder, but the library scan can handle this and keep going and scan other things.

Who were you talking to when you said it's nothing to worry about?  I worry.  I worry I have to re-do things.  Each time.  Why is it going "offline"?

I installed inotify and changed these settings:
fs.inotify.max_user_watches=1048576
fs.inotify.max_user_instances=4096

Committed them and confirmed:
sysctl -p  
cd /proc/sys/fs/inotify/
cat max_queued_events ;cat max_user_instances ;cat max_user_watches

Then rebooted.

This morning, I get this:
16:24:31.928 /storage/4KMOVIES/Sci-Fi/2001- A Space Odyssey [imdbid=tt0062622]/Featurettes/2001: The Making of a Myth.mkv: No such file or directory
(same with the movie:  No such file or directory)

Posted (edited)

 

On 25/02/2025 at 19:17, gogginguy said:

When I setup the external drive, it could "see" but not navigate into the directories until I changed something with the permissions or something

And are the permissions being set automatically correct for the new media folders and files that get added?

On 28/02/2025 at 16:41, gogginguy said:

This morning, I get this:
16:24:31.928 /storage/4KMOVIES/Sci-Fi/2001- A Space Odyssey [imdbid=tt0062622]/Featurettes/2001: The Making of a Myth.mkv: No such file or directory
(same with the movie:  No such file or directory)

I am not a linux expert - but how is this /storage path mounted? Is it permanent mount ?

And is ":" in a filename supported on the filesystem that you have running?

On 25/02/2025 at 19:43, gogginguy said:

b) the server is a docker'd container which does not start upon reboot.  I do it manually with each linux restart

There may be docker aspects to how external drives need to be mounted

It does not seem to be an Emby issue

Initially you had 128 inotify limit which meant you would need to do manual or time scheduled scans to find any added media

And all the errors were I/O Errors, eg

System.IO.IOException: System.IO.IOException: Input/output error : '/storage/4KMOVIES/Drama/Karate Kid [imdbid=tt0087538]'

 

Edited by sa2000
gogginguy
Posted

"are the permissions being set automatically correct"  -- yes, the movies get added and play just fine.
"And is ":" in a filename supported on the filesystem"  -- yes (and this is happening to more than just this title)
"Is it permanent mount"  yes -- as much as external storage can be.
"I am not a linux expert"  then, I'm guessing you know even less about docker.
Thanks for playing.

  • Thanks 1
Posted
On 3/4/2025 at 9:00 AM, gogginguy said:

"are the permissions being set automatically correct"  -- yes, the movies get added and play just fine.
"And is ":" in a filename supported on the filesystem"  -- yes (and this is happening to more than just this title)
"Is it permanent mount"  yes -- as much as external storage can be.
"I am not a linux expert"  then, I'm guessing you know even less about docker.
Thanks for playing.

@gogginguyhas this resolved your issue?

gogginguy
Posted

Nope.  I'm restarting the container each morning just to save me the headache until I can get a line on a possible fix.

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