Kodi Community Forum

Full Version: Ubuntu NFS server problems
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have a Ubuntu 20.04 media server. Firewall disabled.
$ cat /etc/exports
/MOVIES *(ro,insecure,no_subtree_check,no_root_squash)

When I browse for NFS servers in Videos -> Files -> Add Video Source it does not appear.
I have a CentOS 7 pc. Same exports file, the Add Video Source NFS browser sees the CentOS NFS share.
The CentOS pc can mount the Ubuntu share with default options.
From a RPi running OSMC I can mount the Ubuntu share from the command line, just default options.
Ive tried this on 4 kodi clients; Windows 10 PC, Coreelec device, RPi 3 running OSMC and LibreElec.

None can see the Ubuntu NFS server in the Videos -> Files-> Add Video Source browser.

Im stumped.

Thanks for your help.
(2020-08-06, 05:41)meadrocks Wrote: [ -> ]When I browse for NFS servers in Videos -> Files -> Add Video Source it does not appear.

I used 16.04 just fine with NFS for years, but I have the same problem with 20.04 as you, so I'm thinking of going to try & use 18.04 for now.
Today, 20.04.1 will be released, so maybe something is fixed there, but I'm not that hopeful yet.

One option is to enter the NFS connection details manually into your sources.xml file, as it is only the browsing part that is unwilling to cooperate.
Creating system NFS client connections would be another solution.
(2020-08-06, 07:36)Klojum Wrote: [ -> ]
(2020-08-06, 05:41)meadrocks Wrote: [ -> ]When I browse for NFS servers in Videos -> Files -> Add Video Source it does not appear.

I used 16.04 just fine with NFS for years, but I have the same problem with 20.04 as you, so I'm thinking of going to try & use 18.04 for now.
Today, 20.04.1 will be released, so maybe something is fixed there, but I'm not that hopeful yet.

One option is to enter the NFS connection details manually into your sources.xml file, as it is only the browsing part that is unwilling to cooperate.
Creating system NFS client connections would be another solution.

Where is sources.xml? I searched all thru /storage/.config, couldnt find it.
(2020-08-06, 07:48)meadrocks Wrote: [ -> ]
(2020-08-06, 07:36)Klojum Wrote: [ -> ]
(2020-08-06, 05:41)meadrocks Wrote: [ -> ]When I browse for NFS servers in Videos -> Files -> Add Video Source it does not appear.

I used 16.04 just fine with NFS for years, but I have the same problem with 20.04 as you, so I'm thinking of going to try & use 18.04 for now.
Today, 20.04.1 will be released, so maybe something is fixed there, but I'm not that hopeful yet.

One option is to enter the NFS connection details manually into your sources.xml file, as it is only the browsing part that is unwilling to cooperate.
Creating system NFS client connections would be another solution.

Where is sources.xml? I searched all thru /storage/.config, couldnt find it.
Found it.
/storage/.kodi/userdata/sources.xml
(2020-08-06, 07:36)Klojum Wrote: [ -> ]One option is to enter the NFS connection details manually into your sources.xml file, as it is only the browsing part that is unwilling to cooperate.

So is there any chance on getting the browsing part fixed? I assume there are many Ubuntu / Debian / Linux Mint based dists that are all not working with the browsing parts.
(2020-08-06, 08:21)meadrocks Wrote: [ -> ]So is there any chance on getting the browsing part fixed?

There is always "a" chance. But the problematic part will need to be identified first. Since I'm not a developer myself, other people will have to do that digging.
(2020-08-06, 11:15)Klojum Wrote: [ -> ]
(2020-08-06, 08:21)meadrocks Wrote: [ -> ]So is there any chance on getting the browsing part fixed?

There is always "a" chance. But the problematic part will need to be identified first. Since I'm not a developer myself, other people will have to do that digging.
I've reported the problem, you have verified it is a problem, maybe the devs will allocate some time & debug & fix it. Thanks for your help.
How do the developers find out that this is a problem? Does someone have to fill out a bug report? Do the devs search the forum for problems? What is the procedure? Just wondering.
(2020-08-06, 11:15)Klojum Wrote: [ -> ]But the problematic part will need to be identified first.

I identified it long ago ... https://forum.kodi.tv/showthread.php?tid...pid2903629
Too bad no one paid attention.

Long story short - it's a security option in latest rpcbind which prevents seeing shares available on a NFS server.
Sadly it's a configure-time option which needs to be enabled when building the package (--enable-rmtcalls , it's OFF by default), thus it can't be enabled via config file or commandline switch if the package was not built with --enable-rmtcalls.
Those affected by the lack of this feature should raise a bug with the maintainer of rpcbind package on their distro bug tracker.
There is nothing Kodi or libnfs developers can do about it.
(2020-08-06, 18:52)asavah Wrote: [ -> ]
(2020-08-06, 11:15)Klojum Wrote: [ -> ]But the problematic part will need to be identified first.

I identified it long ago ... https://forum.kodi.tv/showthread.php?tid...pid2903629
Too bad no one paid attention.

Long story short - it's a security option in latest rpcbind which prevents seeing shares available on a NFS server.
Sadly it's a configure-time option which needs to be enabled when building the package (--enable-rmtcalls , it's OFF by default), thus it can't be enabled via config file or commandline switch if the package was not built with --enable-rmtcalls.
Those affected by the lack of this feature should raise a bug with the maintainer of rpcbind package on their distro bug tracker.
There is nothing Kodi or libnfs developers can do about it.
the linux command showmounts -e <server> works when I run it on a CentOS pc pointing to the Ubuntu server.

ampl@centos7:~$ showmount -e ubuntu-server
Export list for ubuntu-server:
/MOVIES          *

So there must be a way to extract export list from a Ubuntu server wo/ Ubuntu enabling some option on rpcbind.
(2020-08-07, 00:42)meadrocks Wrote: [ -> ]So there must be a way to extract export list from a Ubuntu server wo/ Ubuntu enabling some option on rpcbind.
Indeed there is, but that is not what browsing for all available NFS shares does.
showmount is targeted towards a known server while "Hey are there any nfs shares available on this network?" makes a broadcast request to which recent enough rpcbind won't respond at all unless it was built with --enable-rmtcalls, hence the problem.
EDIT: AFAIK this was made with the same behavior as windows' "network neighborhood" in mind, which allowed seeing all available servers and shares in a given subnet,
however even in windows such behavior is no longer available by default (SMB1 issues and deprecation).
Maybe it's time to remove "browse for shares" functionality from Kodi given it does not work unless unsafe options are enabled in windoze or rpcbind was built to allow such broadcast requests, both being non-default and potentially unsafe features.
(2020-08-07, 03:37)asavah Wrote: [ -> ]
(2020-08-07, 00:42)meadrocks Wrote: [ -> ]So there must be a way to extract export list from a Ubuntu server wo/ Ubuntu enabling some option on rpcbind.
Indeed there is, but that is not what browsing for all available NFS shares does.
showmount is targeted towards a known server while "Hey are there any nfs shares available on this network?" makes a broadcast request to which recent enough rpcbind won't respond at all unless it was built with --enable-rmtcalls, hence the problem.
EDIT: AFAIK this was made with the same behavior as windows' "network neighborhood" in mind, which allowed seeing all available servers and shares in a given subnet,
however even in windows such behavior is no longer available by default (SMB1 issues and deprecation).
Maybe it's time to remove "browse for shares" functionality from Kodi given it does not work unless unsafe options are enabled in windoze or rpcbind was built to allow such broadcast requests, both being non-default and potentially unsafe features.

I had no idea a broadcast existed. I assumed it walked thru every available IP on the subnet & did a request on that IP and waited for a response. Excuse my ignorance.
The "Browse for Shares" is really a nice feature... Since both rpcbind & Windoze both discourage broadcast behavior now because of security, maybe its time to update the code to walk thru every IP on the subnet and do a query. Or it should prompt for the IP  of the NFS/SMB server IP?  Just my $.02.
(2020-08-07, 06:56)meadrocks Wrote: [ -> ]maybe its time to update the code to walk thru every IP on the subnet and do a query

Don't think this is ok, Kodi is a media center not a network scanner, it could a long time depending on subnet size, network speed and could raise questions " Why TF your software is scanning my network?"
 
(2020-08-07, 06:56)meadrocks Wrote: [ -> ]Or it should prompt for the IP  of the NFS/SMB server IP?

This sounds plausible, eg. you type in your server hostname/ip and Kodi shows available shares, but someone would need to code that, sadly I don't have the necessary skills to add this to Kodi and I'm not interested in this feature - I'm a linux guy, I know where my shares are and I use fstab mounts.
Not quite the same, but if you use the "Add network location..." option at the bottom of the add new sources list, then you can enter all such information (IP address, username, password etc) to create an SMB share manually.

I know it's not a prompt and hand-held walkthrough on setting an SMB share up, but it's not too difficult to do if you don't get derailed first by the more protocol-specific options above it in the list.
(2020-08-07, 12:59)DarrenHill Wrote: [ -> ]Not quite the same, but if you use the "Add network location..." option at the bottom of the add new sources list, then you can enter all such information (IP address, username, password etc) to create an SMB share manually.

I know it's not a prompt and hand-held walkthrough on setting an SMB share up, but it's not too difficult to do if you don't get derailed first by the more protocol-specific options above it in the list.

Thanks for all the info & help, maybe its time to remove the browsing options since they dont work reliably anymore for either NFS & SMB. This way it wont frustrate users thinking Kodi is broken.
Not sure right now if it will help in Kodi's case, but I'm pretty sure NFSv4 on Ubuntu 20.04 is completely broken and that is causing freezings. So I disabled it: https://unix.stackexchange.com/questions...llow-nfsv3

Now I can connect normally to my shares (had that problem to with v4 along with freezing), I doubt I will see freezings again.
Pages: 1 2