Chuck 17 Posted November 4, 2017 Posted November 4, 2017 Scan media library failed.6 minutes agoThe directory name is invalid Emby version 3.2.36.0 All of a sudden I'm getting the above error msg on library scan. The directories are network resources, but this hasn't been a challenge for years. Looking at the attached log file, it looks like the IP mapping is correct. Please advise log.txt
Luke 42078 Posted November 4, 2017 Posted November 4, 2017 2017-11-04 12:46:25.591 Info LibraryMonitor: Watching directory D:\Emby\Recorded TV 2017-11-04 12:46:25.609 Error TaskManager: Error *** Error Report *** Version: 3.2.36.0 Command line: C:\Users\chuck\AppData\Roaming\Emby-Server\System\EmbyServer.dll C:\Users\chuck\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exe -service Operating system: Microsoft Windows NT 6.2.9200.0 64-Bit OS: True 64-Bit Process: True User Interactive: True Processor count: 12 Program data path: C:\Users\chuck\AppData\Roaming\Emby-Server Application directory: C:\Users\chuck\AppData\Roaming\Emby-Server\System System.IO.IOException: The directory name is invalid @@Chuck We strongly advise, and have always advised against using mapped network drives. What happens is windows will randomly disconnect them during idle periods and then Emby Server will be unable to access them. Instead just give Emby Server the original network location. Please let us know if this helps. Thanks.
Chuck 17 Posted November 4, 2017 Author Posted November 4, 2017 I'm actually not using mapped network drives. I'm using UNC paths to the NAS, note \\DISKSTATION\Emby\Movies. Recorded TV is stored on a local disk on the D:\ drive. The Emby system folder is local, and is correct.
Luke 42078 Posted November 4, 2017 Posted November 4, 2017 Nonetheless, review the path in the error message above and make sure the server can reach that path.
Chuck 17 Posted November 4, 2017 Author Posted November 4, 2017 II must be missing something here. Here's the breakdown of the directories, and all seem to be lining up correctly.
Chuck 17 Posted November 5, 2017 Author Posted November 5, 2017 Well ... I did a complete uninstall and reinstall and configuration. The error no longer happens. Odd, because nothing is different.
Luke 42078 Posted November 5, 2017 Posted November 5, 2017 @@Chuck i notice you were running as a service before and that always creates additional complication related to permissions.
Chuck 17 Posted November 5, 2017 Author Posted November 5, 2017 Yep, I run the service with a user login so that Emby can access the file shares on the NAS. Not sure that was the problem, but we're good now. If I had to raise suspicion, I'd point to the upgrade to v3.2.36.0 changing something, and reset with the fresh install.
Luke 42078 Posted November 5, 2017 Posted November 5, 2017 No I think it is permissions associated with the user the service is running under, thanks.
Chuck 17 Posted November 5, 2017 Author Posted November 5, 2017 Interesting, yeah, the problem still exists. I have a user named Emby with a password set-up as and Administrator on the machine. This user is set as the service login account so that Emby can access the NAS. It looks like the Scan start and effectively accesses the NAS, but dies part way through the run. But, the directory of the application install; Program data path: C:\Users\chuck\AppData\Roaming\Emby-Server\programdataApplication directory: C:\Users\chuck\AppData\Roaming\Emby-Server\systemSystem.IO.IOException: The directory name is invalid Is the default install directory. Having been running Emby since Media Browser, this is the first time I've run into this problem. Any thoughts on how to resolve?
Luke 42078 Posted November 5, 2017 Posted November 5, 2017 Right now i would try to keep it simple and just run Emby using the regular tray icon. Once you've confirmed that is working as expected, then you can look at the windows service user permissions.
Chuck 17 Posted November 6, 2017 Author Posted November 6, 2017 OK ... Stopped the service, ran the tray executable, and attempted a scan. Exact same log error. :-( I've gotten around it by running a metadata refresh on each library, I get all of the content populated in the web client, and I'm able to watch movies and live tv. But, when ever the scan job runs, it fails.
mscrivo 14 Posted November 6, 2017 Posted November 6, 2017 Strangely, I started getting this same error 2 days ago, right after the update to Emby 3.2.36.0. I also have everything on a Diskstation and it's accessed via UNC path. I am not running Emby as a service. The Emby Server backup plugin also started giving me an error at the same time: *** Error Report *** Version: 3.2.36.0 Command line: C:\Users\Michael\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe Operating system: Microsoft Windows NT 6.2.9200.0 64-Bit OS: True 64-Bit Process: True User Interactive: True Processor count: 4 Program data path: C:\Users\Michael\AppData\Roaming\MediaBrowser-Server Application directory: C:\Users\Michael\AppData\Roaming\MediaBrowser-Server\System System.IO.IOException: Cannot create "\\DISKSTATION\Data\Backup" because a file or directory with the same name already exists. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost) at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost) at MBBackup.ServerEntryPoint.CopyAllFiles(String sourceDir, String targetDir, Boolean recursive) at MBBackup.ServerEntryPoint.<ExecuteBackup>d__61.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MBBackup.Entities.ScheduledBackupTask.<Execute>d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.<ExecuteInternal>d__68.MoveNext() System.IO.IOException at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost) at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost) at MBBackup.ServerEntryPoint.CopyAllFiles(String sourceDir, String targetDir, Boolean recursive) at MBBackup.ServerEntryPoint.<ExecuteBackup>d__61.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MBBackup.Entities.ScheduledBackupTask.<Execute>d__8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.<ExecuteInternal>d__68.MoveNext()
Luke 42078 Posted November 6, 2017 Posted November 6, 2017 @@mscrivo it appears the backup plugin is unable to access to access the backup location on your diskstation.
Chuck 17 Posted November 12, 2017 Author Posted November 12, 2017 I have backup running on a separate disk on the same server, and it's not giving me any grief. I've verified permissions across the Emby server and the UNC paths to the DISKSTATION. The error seems to be coming from the application directory, and I've verified that the Emby user, configured as Administrator on the machine, has full permissions across the Emby directory. The library scan ran after reinstalling Emby, but only that first time on install. Subsequent library scans fail, and the end result of the failed scans is no media is showing up in any of the libraries, Movies, TV, Home Videos or Music. No Joy. The error seems to have started with Emby version 3.2.36.0.
dethknite 45 Posted November 13, 2017 Posted November 13, 2017 (edited) I too have been getting weird issues with "The directory name is invalid" errors. These started about a week ago. Also failing to backup "Cannot create 'M:\!Emby Backups' because a file or directory with the same name already exists." I am NOT running a service although I do use mapped drives to my NAS. If the drives disconnect and need reconnecting.. I simply remap via script or reboot. I use this setup for security and so I prefer it. Still, I am confident that the drive mapping has nothing to do with it. Restarting the application seemed to allow me to manually refresh metatdata on a subfolder and the contents came back. However, still getting errors when running the task. I also just attempted rebooting the NAS, then rebooting the PC to get a clean cycle... still erroring out. Probably began around v3.2.36.0... I am currently running v3.2.36.8 beta ** One thing I noticed is that both errors occur on paths that include a space (M:\Blues Hockey, and M:\!Emby Backups) log.txt Edited November 13, 2017 by dethknite
dethknite 45 Posted November 15, 2017 Posted November 15, 2017 Still having these issues... I rolled back to the stable but to no avail as that is v3.2.36.0. I noticed the errors about "directory name is invalid" are coming from ffprobe (attached log). log.txt
dethknite 45 Posted November 15, 2017 Posted November 15, 2017 (edited) I switched all the folders in each library to use UNC pathing.. ran task... it still fails out at some point and requires me to continually keep kicking it off. Edited November 15, 2017 by dethknite
Luke 42078 Posted November 15, 2017 Posted November 15, 2017 If you're able to, try the beta server and see how that compares. Thanks.
dethknite 45 Posted November 16, 2017 Posted November 16, 2017 Well, completely removed Emby, reinstalled the Beta, and then restored from backup. As before, kicking off the task would result in failures time and time again. But going into Library, Scan Library, Search for Missing Metadata, eventually made it through everything. So I got the library all back up and functional, and the scheduled task now finishes.
dethknite 45 Posted November 18, 2017 Posted November 18, 2017 (edited) I take that back... scheduled task still fails with an invalid directory error. Running the library scans manually on each library works fine. On Version 3.2.36.12 beta now.. This at the top stuck out.. these paths do indeed exist: 2017-11-17 19:38:28.496 Info LibraryMonitor: Skipping realtime monitor for \\192.168.1.4\Media\Blues Hockey because the path does not exist 2017-11-17 19:38:28.497 Info LibraryMonitor: Skipping realtime monitor for \\192.168.1.4\Media\Kids\Movies because the path does not exist I am looking into the possibility that some issue might have crept up in my network... perhaps it is getting congested and the traffic to the NAS is timing out... server.txt Edited November 18, 2017 by dethknite
Luke 42078 Posted November 18, 2017 Posted November 18, 2017 I am looking into the possibility that some issue might have crept up in my network... I think that is what's going on here. @@Chuck's issue was different and my suggestion about the beta server was mostly targeted towards him.
Chuck 17 Posted December 3, 2017 Author Posted December 3, 2017 Did I hear my name? I'm still having the failed media scan. After about three tries, it runs. I'm starting to believe that the failure may be a timeout issue. The NAS has disks that will go to sleep with inactivity. When I open Windows Explorer and browse the network path, it often will take a few moments to connect and browse. This delay is due to the disks spinning back up. Did the timeout decrease on the library scan somewhere along the line?
Chuck 17 Posted December 3, 2017 Author Posted December 3, 2017 I'm still having the failed media scan. After about three tries, it runs. I'm starting to believe that the failure may be a timeout issue. The NAS has disks that will go to sleep with inactivity. When I open Windows Explorer and browse the network path, it often will take a few moments to connect and browse. This delay is due to the disks spinning back up. Did the timeout decrease on the library scan somewhere along the line?
Luke 42078 Posted December 3, 2017 Posted December 3, 2017 Emby doesn't have a timeout for connecting to drives. It's all managed by Windows. Did you setup Emby with network paths or with mapped network drives?
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