doonze 30 Posted August 28, 2018 Share Posted August 28, 2018 ext4 on a WD mybook. Mounted with: # NFS mount from main server 192.168.0.111:/mnt/mybook/ /mnt/mybook/ nfs rw,hard,intr 0 0 Exported by: /mnt/mybook/ 192.168.0.112(rw,sync,no_root_squash,no_subtree_check) Input? Ideas? Link to comment Share on other sites More sharing options...
mastrmind11 717 Posted August 28, 2018 Share Posted August 28, 2018 (edited) ext4 on a WD mybook. Mounted with: # NFS mount from main server 192.168.0.111:/mnt/mybook/ /mnt/mybook/ nfs rw,hard,intr 0 0 Exported by: /mnt/mybook/ 192.168.0.112(rw,sync,no_root_squash,no_subtree_check) Input? Ideas? Any reason you're using the 'sync' command when you mount? Not only is it pretty uncommon, it's also off by default in the latest NFS client implementation (and really limits performance). It might be causing an issue w/ the monitor since the io has to wait for the write to complete before returning to userland. Since both of you in this thread have it enabled, and I don't (and the monitor works for me), I'd wager that the sync wait is the culprit. Edited August 28, 2018 by mastrmind11 Link to comment Share on other sites More sharing options...
chudak 23 Posted August 29, 2018 Share Posted August 29, 2018 (edited) @@Luke So for example: http://myipaddress:8096/library/refresh?api_key=xxxxxxxxx Says: Unable to find the specified file Can you give me the full URL to the file? What was the answer to this question? I am having the same issue: http://EMBY:8096/emby/library/refresh&api_key=KEY/ emby:8096/emby/library/refresh&api_key=KEY/ Unable to find the specified file. Edited August 29, 2018 by chudak Link to comment Share on other sites More sharing options...
Luke 37095 Posted August 29, 2018 Share Posted August 29, 2018 if you click the api link at the bottom of the server dashboard, you can then view all of the supported api urls and even test them out right there. this will allow you to compare what you are doing to what is supported. thanks. 1 Link to comment Share on other sites More sharing options...
PenkethBoy 2063 Posted August 29, 2018 Share Posted August 29, 2018 @@chudak change your url to... emby:8096/emby/library/refresh?api_key=key i.e. ? instead of & and no trailing / 1 Link to comment Share on other sites More sharing options...
chudak 23 Posted August 29, 2018 Share Posted August 29, 2018 if you click the api link at the bottom of the server dashboard, you can then view all of the supported api urls and even test them out right there. this will allow you to compare what you are doing to what is supported. thanks. Ok Thx I found the URL with API key via link on the bottom When I run it via curl I see <h1>Length Required</h1> In the browser I still get "Unable to find the specified file." When I use Try it Out via swagger.emby.medi it seems to work. What's wrong??? Link to comment Share on other sites More sharing options...
Luke 37095 Posted August 29, 2018 Share Posted August 29, 2018 You can easily discover this on your own by comparing the requests you are sending to the requests that swagger is sending. Link to comment Share on other sites More sharing options...
chudak 23 Posted August 29, 2018 Share Posted August 29, 2018 it looks like swagger also returns: 204 Undocumented Link to comment Share on other sites More sharing options...
PenkethBoy 2063 Posted August 29, 2018 Share Posted August 29, 2018 204 is a standard browser response - nothing specific to swagger https://www.restapitutorial.com/httpstatuscodes.html Link to comment Share on other sites More sharing options...
PenkethBoy 2063 Posted August 29, 2018 Share Posted August 29, 2018 Ok Thx I found the URL with API key via link on the bottom When I run it via curl I see <h1>Length Required</h1> In the browser I still get "Unable to find the specified file." When I use Try it Out via swagger.emby.medi it seems to work. What's wrong??? Post the full url you are trying Link to comment Share on other sites More sharing options...
chudak 23 Posted August 29, 2018 Share Posted August 29, 2018 Post the full url you are trying curl -X POST "http://192.168.90.5:8096/emby/Library/Refresh?api_key=59be7XXXXX23be6"-H "accept: */*" Link to comment Share on other sites More sharing options...
PenkethBoy 2063 Posted August 29, 2018 Share Posted August 29, 2018 (edited) I dont use Curl - but i suspect you have the options incorrect I just did it via Powershell to one of my servers and it works correctly with no error returning a statuscode of 204 $embyServerUrl = "http://192.168.1.56:8096" $MediaUrl = $embyServerUrl + "/emby/Library/Refresh" + "?api_key=8f0d1250d8f64ca0b2d766d75002ddb5" $TestResult = Invoke-WebRequest -Uri $MediaUrl -Method Post $TestResult Edited August 29, 2018 by PenkethBoy Link to comment Share on other sites More sharing options...
chudak 23 Posted August 29, 2018 Share Posted August 29, 2018 I dont use Curl - but i suspect you have the options incorrect I just did it via Powershell to one of my servers and it works correctly with no error returning a statuscode of 204 $embyServerUrl = "http://192.168.1.56:8096" $MediaUrl = $embyServerUrl + "/emby/Library/Refresh" + "?api_key=8f0d1250d8f64ca0b2d766d75002ddb5" $TestResult = Invoke-WebRequest -Uri $MediaUrl -Method Post $TestResult Tried that on Windows/powershell and it does work. No love via curl/ubuntu Link to comment Share on other sites More sharing options...
PenkethBoy 2063 Posted August 29, 2018 Share Posted August 29, 2018 then use PowerShell Core as it works on ubuntu 1 Link to comment Share on other sites More sharing options...
Happy2Play 8296 Posted August 29, 2018 Share Posted August 29, 2018 Google foo gave me this curl -X POST "http://localhost:8096/emby/Library/Refresh?api_key=YOUR KEY" -H "Content-Length: 0" Link to comment Share on other sites More sharing options...
chudak 23 Posted August 29, 2018 Share Posted August 29, 2018 Google foo gave me this curl -X POST "http://localhost:8096/emby/Library/Refresh?api_key=YOUR KEY" -H "Content-Length: 0" That worked, thx! Typo in api help ? Link to comment Share on other sites More sharing options...
doonze 30 Posted September 1, 2018 Share Posted September 1, 2018 Any reason you're using the 'sync' command when you mount? Not only is it pretty uncommon, it's also off by default in the latest NFS client implementation (and really limits performance). It might be causing an issue w/ the monitor since the io has to wait for the write to complete before returning to userland. Since both of you in this thread have it enabled, and I don't (and the monitor works for me), I'd wager that the sync wait is the culprit. Yeah, cause without sync if the server reboots (or you lose power) while writing a file, you'll have silent data corruption. async was the default until the latest version, but now sync is the default. Without sync on, when writing a huge file like video, if you lose power the client will THINK the file is ok and complete. I'd rather be safe than sorry since the performance hit is on writes, and with a media drive I'm more worried about reads anyway. I did try async, but real time monitoring still didn't work. But I forgot to remount on the clients, I just did a exportfs -ra on the server. I'm not sure it would have picked up the change without a remount on the client as well. But I changed them all back so sync anyway. I'll live with not having real time monitoring to have sync. Link to comment Share on other sites More sharing options...
doonze 30 Posted September 2, 2018 Share Posted September 2, 2018 (edited) So I do have a "sorta" work around for this issue. It doesn't address the core issue, but mimics the desired behavior in my use case. 99.9% of my media comes from either couchpotato or Sonarr. Both have built in communication with Emby if you use the api keys. I did have this setup on my old server, but just last night got it all setup after the move to the new server. I now have all 3 running on the same server, so I should almost never have a situation where new media is added without Emby knowing as soon as it's added. In the .01% of outlying cases, I'll just ran a manual scan. Just in case, I have a full library scan running every 24 hours. I did have it running every 15 mins, but the additional wear and tear on my spinner drive did nag at me. It's not the solution I want, but it's the solution I have and it works in my setup. I only mention it so if others are facing similar issues, and are not aware of the api access emby allows in these apps (and others of course), they can look into this as a solution/workaround. I'm planning in the next few weeks of swapping back to a true raid/NAS solution as I'm running out of storage. I'll report if my issues persist for trouble shooting reasons. Maybe someone will come along with and idea or solution. Edited September 2, 2018 by doonze Link to comment Share on other sites More sharing options...
horizonbrave 1 Posted September 15, 2018 Share Posted September 15, 2018 Is there a list of supported filesystems somewhere? I'm also interested in this. I guess it would be nice to have additional info displayed on emby UI but it that adds too much "noise" why not adding documentation/help links in the UI.. that for sure will save the forum from some noise (and admin work) ad help those keen in getting into official docs PS this is a recurring question and a very useful and popular feature! PPS I just realised that it's not that straight forward for a user to understand if the feature works or not... is it possible to create a script so that the UI tells the user if it's available or not? Cheers! Link to comment Share on other sites More sharing options...
Luke 37095 Posted September 15, 2018 Share Posted September 15, 2018 On linux the .NET core runtime uses INotify, so it will come down to whatever that supports: https://www.linuxjournal.com/content/linux-filesystem-events-inotify 1 Link to comment Share on other sites More sharing options...
mastrmind11 717 Posted September 15, 2018 Share Posted September 15, 2018 One thing I just thought of on this topic for those of you using ZFS w/ a non-working real time monitor... how are you initiating the nfs share? Are you using the inbuilt zfs nfs sharing option? Someone posted here that NFS doesn't support inotify. That might be true in the stand alone implementation, but ZFS _does_ support inotify natively, so perhaps the inbuilt nfs implementation exposes the implementation? 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