nuentes 33 Posted August 25, 2019 Share Posted August 25, 2019 I've realized that emby doesn't appear to be scanning in real-time, and seeing new downloads. It appears to only see these files after its overnight full scan. Previously I was running emby on Ubuntu Mate 16.04 directly. However, I am now running emby in a Ubuntu Mate 18.04 VM in virtualbox. So Ubuntu no longer has direct access to the HDDs. Because of the amount of USB HDDs I have, shared folder was the only smart choice (opposed to adding the USBs directly to the VM). These shared folders are mapped in the /mnt/ directory using the virtualbox guest additions. I'm assuming this is related. It can't possibly be a permissions issue, since emby can obviously SEE the files. Anybody have any guesses? I'm not really sure what other info to provide, so feel free to ask questions. Link to comment Share on other sites More sharing options...
Luke 37253 Posted August 25, 2019 Share Posted August 25, 2019 Hi there, can you please discuss an example? Thanks. Link to comment Share on other sites More sharing options...
nuentes 33 Posted August 26, 2019 Author Share Posted August 26, 2019 sure. Most of my movie/tv show downloads are automated. Since migrating to this new server in a VM, the downloads are happening just fine. However, the newly downloaded episodes and movies don't show up in Emby until the following day. So for example, new episode of Baskets is downloaded on Friday. I don't see the episode appear in emby until saturday morning. The weird thing is that all of my libraries are set up for real-time scanning. Hope this helps. Link to comment Share on other sites More sharing options...
Luke 37253 Posted August 26, 2019 Share Posted August 26, 2019 Can you please attach the emby server log? thanks. Link to comment Share on other sites More sharing options...
nuentes 33 Posted August 28, 2019 Author Share Posted August 28, 2019 I have an episode of Chopped that downloaded this morning at 3:20am and emby hasn't created NFO files for it yet. Here is my current logfile Link to comment Share on other sites More sharing options...
Luke 37253 Posted August 28, 2019 Share Posted August 28, 2019 How do i download it? Link to comment Share on other sites More sharing options...
nuentes 33 Posted August 28, 2019 Author Share Posted August 28, 2019 That appears to not be an option. You can click "raw text" at the top, and then select all and then paste into a blank local file. Sorry, pastebin flagged me as a robot when I tried to upload it there. Link to comment Share on other sites More sharing options...
Luke 37253 Posted August 28, 2019 Share Posted August 28, 2019 Can you update to Emby Server 4.2.1, then enable debug logging under the Logs section, then restart the server, add another new file and then give it a few minutes and provide the new log? thanks. Link to comment Share on other sites More sharing options...
nuentes 33 Posted August 29, 2019 Author Share Posted August 29, 2019 I updated to 4.2.1, enabled debug, then restarted and left the server for a few minutes. Hardware detection log Emby server log Link to comment Share on other sites More sharing options...
nuentes 33 Posted September 2, 2019 Author Share Posted September 2, 2019 Any ideas whats happening? Need any more info? Link to comment Share on other sites More sharing options...
Luke 37253 Posted September 2, 2019 Share Posted September 2, 2019 I updated to 4.2.1, enabled debug, then restarted and left the server for a few minutes. Hardware detection log Emby server log What time did you add new content during this log file? This is only an eight minute log file. Are you sure this is the right one? Link to comment Share on other sites More sharing options...
nuentes 33 Posted September 7, 2019 Author Share Posted September 7, 2019 I suppose I may have missed the "add a new file" portion of your message. Sorry about that. I enabled debug logging, and restarted around 1:50pm today. I then added a new file (Baskets s04e08) about 2-3 minutes later. After adding that file, I waited another 15 minutes, and here is the resulting logfile. Baskets s04e08 still is not appearing in Emby at this point. The file is in the same path as the rest of Baskets s04, and the folder is in a Library with real-time monitoring enabled. Link to comment Share on other sites More sharing options...
Luke 37253 Posted September 7, 2019 Share Posted September 7, 2019 Hi there, how is it possible that you restarted the server at 1:50pm given that the log file runs from 0:00 midnight to what looks like 2:11pm. Are you sure this is the right one? Link to comment Share on other sites More sharing options...
nuentes 33 Posted September 7, 2019 Author Share Posted September 7, 2019 Ugh. I had selected restart, and the "are you sure?" message came up, and I clicked restart, and nothing happened. I clicked restart 3 more times, and still nothing. I then refreshed the page, and for some reason, my brain said "ah, it's back online." Do you need me to try this again? That episode has now been processed by emby. Link to comment Share on other sites More sharing options...
Luke 37253 Posted September 7, 2019 Share Posted September 7, 2019 I'm not sure to be honest. If you did the same activity then that log should be fine. To be honest, I'm not sure there's a lot we can do about this. It looks like the server is not getting notified of the file system changes, and if i had to guess it's probably due to the virtualized environment and the additional complication that this will bring. Let me explain how this works. Emby is built with the .Net core runtime, so we use a .Net core API to get notified of file system changes. .Net core internally then uses INotify on Linux so that it can be notified and then when it does, those events are relayed to Emby Server. To me based on this log it looks like those events are just not firing, and this is probably due to the extra layer being added by the VirtualBox mappings. Link to comment Share on other sites More sharing options...
nuentes 33 Posted September 10, 2019 Author Share Posted September 10, 2019 Is it possible that the emby team could test within a virtualbox Ubuntu VM with emby only searching in folders that were added via Guest Additions? To be clear, I'm not saying "you should support this", but I'd just like to know whether this is the issue, or is it possibly something else that needs to be addressed. Also, I'm leaving on a 2 week vacation today, so I'll be of limited assistance in the meantime. Not that I've been particularly helpful thus far... Link to comment Share on other sites More sharing options...
Solution mastrmind11 717 Posted September 10, 2019 Solution Share Posted September 10, 2019 inotify is not supported in virtualbox via shared folders. they do not plan to implement it simply because it's basically impossible to write a wrapper generic enough to support every possible combination of host/share filesystem. https://stackoverflow.com/questions/32726587/programmatically-trigger-an-inotify-event-on-linux only way to do what you want is to roll your own watcher that triggers inotify manually. 1 Link to comment Share on other sites More sharing options...
nuentes 33 Posted September 10, 2019 Author Share Posted September 10, 2019 So basically are you saying I should just need to fire that command any time a new file is added? And I'm a bit unclear on that command. sed '' -i filename is "filename" a variable? I should pretty easily be able to add this as a post script for my downloading application. Link to comment Share on other sites More sharing options...
Luke 37253 Posted September 10, 2019 Share Posted September 10, 2019 So basically are you saying I should just need to fire that command any time a new file is added? And I'm a bit unclear on that command. sed '' -i filename is "filename" a variable? I should pretty easily be able to add this as a post script for my downloading application. In theory, yes, but we haven't tested this ourselves. Link to comment Share on other sites More sharing options...
nuentes 33 Posted September 10, 2019 Author Share Posted September 10, 2019 Yeah, of course, and that's absolutely fine. Ok, no problem. I'm surprised I can't find an existing post-script for my downloading app, but I'll play around with this after my vacation. Thanks so much for the guidance! 1 Link to comment Share on other sites More sharing options...
nuentes 33 Posted April 3, 2020 Author Share Posted April 3, 2020 Sorry to resurrect an old and dead topic, but I'm looking to migrate to a new server, and I want to be sure that Emby is able to scan in real time. As you can recall from above, the issue here was inotify. I'll still be using VMs. I am running two VMs inside XCP-ng, one VM will be Ubuntu MATE or Linux Mint (both v19.10). The other is Ubuntu server which is hosting mostly just my docker containers. Would I have better luck running Emby inside a docker container, or should I try it in Mate/Mint? Link to comment Share on other sites More sharing options...
Luke 37253 Posted April 3, 2020 Share Posted April 3, 2020 Sorry to resurrect an old and dead topic, but I'm looking to migrate to a new server, and I want to be sure that Emby is able to scan in real time. As you can recall from above, the issue here was inotify. I'll still be using VMs. I am running two VMs inside XCP-ng, one VM will be Ubuntu MATE or Linux Mint (both v19.10). The other is Ubuntu server which is hosting mostly just my docker containers. Would I have better luck running Emby inside a docker container, or should I try it in Mate/Mint? You'll most likely have better luck in the native OS rather than a container, but I think you'll just have to try it out because it's hard to say. Link to comment Share on other sites More sharing options...
mastrmind11 717 Posted April 3, 2020 Share Posted April 3, 2020 Sorry to resurrect an old and dead topic, but I'm looking to migrate to a new server, and I want to be sure that Emby is able to scan in real time. As you can recall from above, the issue here was inotify. I'll still be using VMs. I am running two VMs inside XCP-ng, one VM will be Ubuntu MATE or Linux Mint (both v19.10). The other is Ubuntu server which is hosting mostly just my docker containers. Would I have better luck running Emby inside a docker container, or should I try it in Mate/Mint? Generally speaking you should be fine w/ any form of native kernel since inotify is party of any recent distro on a standard file system, as long as your drives are local to the server. Where people are running into issues is when drives are remote mounted since smb and nfs don't support inotify, or when there's some exotic filesystem involved. Link to comment Share on other sites More sharing options...
nuentes 33 Posted April 3, 2020 Author Share Posted April 3, 2020 Oh, I get it - it was less an issue of the VM, and more an issue of how I shared the drives/folders from the Host OS to the VM. I think the new system will work better. Thanks a bunch for your help, guys. Link to comment Share on other sites More sharing options...
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