iNotify doesn't appear to be working in my DS1819+

Currently reading
iNotify doesn't appear to be working in my DS1819+

I'm running an Emby server from my NAS, and the real-time monitoring of my media libraries isn't working; it doesn't pick up when I add or remove files and I have to manually run a scan from the Emby app.


It doesn't appear to be an Emby-specific issue, as iNotify doesn't seem to notice that I've made the changes and therefore Emby is never alerted. Someone on the Emby forum had me run inotifywait -rm on the folder my media is stored in, and when I add or remove files while I can see some changes to the output, there's nothing specific to a file. Just lots of opening and closing folders.
 
Last edited:
Do you happen to have a large library? The default value for inotify file watches is 8196 files, which if you have plenty of mp3 files in a folder or many tv shows is quickly exhausted.

I had the same "problem" with plex.

You need to modify the file /etc/sysctl.conf (as root) and change the value for fs.inotify.max_user_watches to a higher value than 8196. I have a rather large library and my setting is fs.inotify.max_user_watches=256000.
Once the configuration is changed, run sudo sysctl -p to apply the change.
 
Upvote 0
Increased previously. It was one of the first troubleshooting steps proposed over on the Emby forums. Emby isn't throwing any "you have too many inotify things" errors, it's just not doing anything at all. inotifywait shows nothing file-specific when files are added.
 
Upvote 0
Plex at least indicates in the logs that it fails to register further inotifywatches - though it doesn't tell you the reason either.

Inotify only works localy, the notification is not propated to remote shares. For instance if you add a file to a folder on your nas, but emby is on a different computer (baremetal, vm or container on a different host) that uses a remote share to access the nas folder, the inotify event will not be propagate to the other computer.
 
Upvote 0
inotify itself is unrelated to Emby or Plex, they simply leverage the inotify notifcation system.

If Emby is directly on the NAS: it should be able to fetch the events - plex does!
If Emby is on a remote maschine: how should it be able to fetc events that are not propagated over remote share protocols?

You can actualy install a synyocommuity package and test inotify functionality yourself.
 
Upvote 0
Replace the source folder with what you need, paste the script into a shell and add a file to the folder.
Code:
source=/volume1/docker
inotifywait -m /${source} |
    while read path action file; do
        echo "New file '$file' in directory '$path' via action: '$action'"
    done
You should see the notifications on the screen then.
 
Upvote 0
"Paste the script into a shell"? You mean run it with something like PuTTY?

Do I need that to reference the exact folder, or will a parent folder do?

Where on the screen should I see notifications?

Isn't that just doing the same thing running inotifywait -rm on the folder and manually looking at the output?
-- post merged: --

Here's a post from the Emby forums where I go over what the inotifywait output is when I add a file: https://emby.media/community/index....s-broken/page/13/&tab=comments#comment-941921
 
Upvote 0
I have no permission to see the emby forum.

Any ssh client will do, putty will be job just fine.
You can run it with any folder - just make sure you have a way to add/modify a file on that location, because the snippet will loop thru the registered watch, it will be blocked until an event is triggered - you will need to quit it with ctrl+c once you are done.

Your command with -r will act recursivly, which will take longer to register the inotifywatches for all folders and files in the folder and all its subfolders.
 
Upvote 0
Well that's weird, I don't know why you'd need permission to read a thread. I've attached the screenshot, anyhow.

I'm unable to run your script as the file path has a space in it: /volume1/Emby Libriaries/Stubs/

If I try "/volume1/Emby Libraries/Stubs/" it gives me an error saying that Libraries/Stubs/ doesn't exist. If I try /volume1/Emby\ Libraries/Stubs/ it gives me the same error.
 

Attachments

  • Screenshot 2020-10-28 11.51.53.png
    Screenshot 2020-10-28 11.51.53.png
    33 KB · Views: 51
Upvote 0
Code:
crusher11@MBEMBY:/$ source=/volume1/Emby\ Libraries/Stubs/
crusher11@MBEMBY:/$ inotifywait -m /${source} |
>     while read path action file; do
>         echo "New file '$file' in directory '$path' via action: '$action'"
>     done
Setting up watches.
Couldn't watch Libraries/Stubs/: No such file or directory
 
Upvote 0

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

I think I'm trying to ask how is the Drive desktop agent 'safe'. I know how VPN works and why to use it. I...
Replies
8
Views
892
There is no problem seeing photo thumbnails. There is a issue to see thumbnails in android browser dialog...
Replies
3
Views
618
Removing one of the SIMM-modules and trying again and the percentage-counter actually works. With two 16GB...
Replies
1
Views
1,008
you know, I can use some dutch words as regular guest of Hart van Breda or Texel dune pubs, ofc after 10pm
Replies
17
Views
3,092

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top