Jump to content

LibraryMonitor - Not a directory error


kopl

Recommended Posts

 
Post install of Emby server 4.0.0.2 I was not seeing new content in some libraries, the scan was failing since I had upgraded to 4.0.0.2.
 
Investigated today and the log presents the information below.
 
System.IO.IOException: System.IO.IOException: Not a directory
 
In 4.0.0.2 the Manual Library scan and directory watching function does not like directories with a colon in the name  - where as the previous versions of Emby was OK with this  particular directory name  - this was an old directory and not a new addition.
 
xyz: abcdefg.2018/
Renaming this directory without the   :  fixed the problem.
 
Printing the actual problem directory into the log would have been helpful too :) 
 

2019-01-26 08:55:33.613 Error LibraryMonitor: Error watching path: /media/NAS/zzz/ggg
        *** Error Report ***
        Version: 4.0.0.2
        Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby-server -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: Unix 4.4.0.112
        64-Bit OS: True
        64-Bit Process: True
        User Interactive: True
        Processor count: 4
        Program data path: /var/lib/emby-server
        Application directory: /opt/emby-server/system
        System.IO.IOException: System.IO.IOException: Not a directory
           at System.IO.Enumeration.FileSystemEnumerator`1.FindNextEntry()
           at System.IO.Enumeration.FileSystemEnumerator`1.MoveNext()
           at System.IO.FileSystemWatcher.RunningInstance.AddDirectoryWatchUnlocked(WatchedDirectory parent, String directoryName)
           at System.IO.FileSystemWatcher.RunningInstance.AddDirectoryWatchUnlocked(WatchedDirectory parent, String directoryName)
           at System.IO.FileSystemWatcher.RunningInstance..ctor(FileSystemWatcher watcher, SafeFileHandle inotifyHandle, String directoryPath, Boolean includeSubdirectories, NotifyFilters notifyFilters, CancellationToken cancellationToken)
           at System.IO.FileSystemWatcher.StartRaisingEvents()
           at System.IO.FileSystemWatcher.StartRaisingEventsIfNotDisposed()
           at System.IO.FileSystemWatcher.set_EnableRaisingEvents(Boolean value)
           at Emby.Server.Implementations.IO.LibraryMonitor.<>c__DisplayClass38_0.<StartWatchingPath>b__0()
        Source: System.IO.FileSystem
        TargetSite: Void FindNextEntry()
           at System.IO.Enumeration.FileSystemEnumerator`1.FindNextEntry()
           at System.IO.Enumeration.FileSystemEnumerator`1.MoveNext()
           at System.IO.FileSystemWatcher.RunningInstance.AddDirectoryWatchUnlocked(WatchedDirectory parent, String directoryName)
           at System.IO.FileSystemWatcher.RunningInstance.AddDirectoryWatchUnlocked(WatchedDirectory parent, String directoryName)
           at System.IO.FileSystemWatcher.RunningInstance..ctor(FileSystemWatcher watcher, SafeFileHandle inotifyHandle, String directoryPath, Boolean includeSubdirectories, NotifyFilters notifyFilters, CancellationToken cancellationToken)
           at System.IO.FileSystemWatcher.StartRaisingEvents()
           at System.IO.FileSystemWatcher.StartRaisingEventsIfNotDisposed()
           at System.IO.FileSystemWatcher.set_EnableRaisingEvents(Boolean value)
           at Emby.Server.Implementations.IO.LibraryMonitor.<>c__DisplayClass38_0.<StartWatchingPath>b__0()

 

Link to comment
Share on other sites

Thanks for the report. I have a feeling this issue is in the netcore runtime but we'll take a look. Thanks.

Link to comment
Share on other sites

  • 1 month later...
soudis

Any news on this?

 

I get the same error since I upgraded to 4.0.0.2 , just upgraded to the newest Beta (4.1.0.12), no luck:

2019-03-11 21:04:48.235 Error LibraryMonitor: Error watching path: /NAS/video/Film
	*** Error Report ***
	Version: 4.1.0.12
	Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
	Operating system: Unix 4.9.0.8
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Processor count: 4
	Program data path: /config
	Application directory: /system
	System.IO.IOException: System.IO.IOException: Not a directory
	   at System.IO.Enumeration.FileSystemEnumerator`1.FindNextEntry()
	   at System.IO.Enumeration.FileSystemEnumerator`1.MoveNext()
	   at System.IO.FileSystemWatcher.RunningInstance.AddDirectoryWatchUnlocked(WatchedDirectory parent, String directoryName)
	   at System.IO.FileSystemWatcher.RunningInstance.AddDirectoryWatchUnlocked(WatchedDirectory parent, String directoryName)
	   at System.IO.FileSystemWatcher.RunningInstance..ctor(FileSystemWatcher watcher, SafeFileHandle inotifyHandle, String directoryPath, Boolean includeSubdirectories, NotifyFilters notifyFilters, CancellationToken cancellationToken)
	   at System.IO.FileSystemWatcher.StartRaisingEvents()
	   at System.IO.FileSystemWatcher.StartRaisingEventsIfNotDisposed()
	   at System.IO.FileSystemWatcher.set_EnableRaisingEvents(Boolean value)
	   at Emby.Server.Implementations.IO.LibraryMonitor.<>c__DisplayClass38_0.<StartWatchingPath>b__0()
	Source: System.IO.FileSystem
	TargetSite: Void FindNextEntry()
Link to comment
Share on other sites

soudis

There is no access rights problem there, another folder in the same directory with the exact same access rights is working just fine.

 

Also: It is a samba share from my NAS, mounted on a debian server, emby runs with docker

Edited by soudis
Link to comment
Share on other sites

soudis

The samba mount point on the host system is /media/NAS/video

 

The mount point in the docker container is host:/media/NAS => container:/NAS

 

As I wrote this, i figured that the error must be triggered by to some unregular content of the folder, because other folders mounted the same way are working. Therefore I created a new folder, moved everything that was in the old folder to the new folder and it came out that one subfolder was not moveable (at least not via the the linux shell). The subfolder had a folder name that ended with a dot character ".". After changing that in my ubuntu file explorer (on the shell it was not possible), everything worked again.

 

I have to add though, that this particular subfolder was already there for quite some time and Emby could still scan the parent folder in versions < 4. So there may still be an error within Emby.

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