# NFS mount not working

## manu_leo

Hi Experts, I am trying to mount a drive from a Gentoo server to a Gentoo Client , however getting Access Denied error .

Setting on NFS Server - 192.168.11.49

 *Quote:*   

> # cat /etc/exports
> 
> # /etc/exports: NFS file systems being exported.  See exports(5).
> 
> /home/internal-4tb-himalaya-8 192.168.11.0/24(root_squash,ro,sync,no_subtree_check)
> ...

 

On the Client - 192.168.101.39

 *Quote:*   

> # mount 192.168.11.49:/home/internal-4tb-himalaya-8 /home/internal-4tb-himalaya-8
> 
> mount.nfs: access denied by server while mounting 192.168.11.49:/home/internal-4tb-himalaya-8
> 
>  # /etc/init.d/nfsclient status
> ...

 

TCPDump on NFS Server - 

 *Quote:*   

> # tcpdump -i enp68s0 host 192.168.101.39
> 
> dropped privs to pcap
> 
> tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
> ...

 

There is no Firewall involved, its all in the same LAN. I am able to ssh from NFS Server to Client and vice versa, just that NFS shows Access Denied.

I am out of ideas, appreciate all the help in advance.

----------

## mike155

What's the output of

```
showmount -e 192.168.11.49
```

on the client?

----------

## manu.rhel

Getting this -

 *Quote:*   

> # showmount -e 192.168.11.49
> 
> rpc mount export: RPC: Unable to receive; errno = Connection refused

 

----------

## mike155

Google:

```
nfs showmount "connection refused"
```

returns, amongst others: https://unix.stackexchange.com/questions/61329/mounting-directory-connection-refused

What does 

```
rpcinfo -p 192.168.11.49 
```

show?

----------

## manu.rhel

Thanks Mike155, here is what the o/p shows -

 *Quote:*   

> # rpcinfo -p 192.168.11.49
> 
>    program vers proto   port  service
> 
>     100000    4   tcp    111  portmapper
> ...

 

----------

## mike155

The output of "rpcinfo -p 192.168.11.49" looks good. You ran this command on the client, right?

The output of "showmount -e 192.168.11.49" on the client is not okay. You won't be able to mount NFS shares on the client as long as this command doesn't show the NFS shares. Therefore, it is necessary to make this command work!

Are you sure that there isn't a firewall on the server or on the client?

Please show us the output of  "showmount -e 192.168.11.49" on the server.

----------

## manu.rhel

yes, its from the NFS Client . Sharing few more o/ps from client to server -

 *Quote:*   

> # rpcinfo -p 192.168.11.49
> 
>    program vers proto   port  service
> 
>     100000    4   tcp    111  portmapper
> ...

 

 *Quote:*   

> # showmount -e 192.168.11.49
> 
> rpc mount export: RPC: Unable to receive; errno = Connection refused
> 
> 

 [/quote]

 *Quote:*   

> # telnet 192.168.11.49 111
> 
> Trying 192.168.11.49...
> 
> Connected to 192.168.11.49.
> ...

 

 *Quote:*   

>  # tcptraceroute 192.168.11.49
> 
> Selected device eno1, address 192.168.101.20, port 40261 for outgoing packets
> 
> Tracing the path to 192.168.11.49 on TCP port 80 (http), 30 hops max
> ...

 

----------

## mike155

Please show us the output of "showmount -e 192.168.11.49" on the server.

----------

## manu.rhel

This is on the server -

 # showmount -e 192.168.11.49

rpc mount export: RPC: Unable to receive; errno = Connection refused

----------

## mike155

"showmount -e 192.168.11.49" should work on your server. If it doesn't work, something is wrong on your server. You must fix it before you can continue. You don't need to check your client or your network before this command shows the exported volumes.

Please double-check the configuration on the server.

Which NFS version do you want to use? NFSv3 NFSv4? NFSv4.1?

Have you done every step on this page: https://wiki.gentoo.org/wiki/Nfs-utils?

Have you run exportfs?

Are there any messages in the system log files?

Have your tried a shorter directory/volume name ("internal" instead of "internal-4tb-himalaya-8"). NFS has its own - and sometimes strange - pecularities.

----------

## cboldt

Downgrade to net-fs/nfs-utils-2.5.3

There is probably nothing wrong with your setup.

An alternative to downgrade nfs-utils is to upgrade kernel to (IIRC) 5.10 or newer.

https://bugs.gentoo.org/808183

----------

## figueroa

nfs-utils-2.5.3-r2 on the x86 server works well here with kernel 4.9.281. I was bit in the upgrade to nfs-utils-2.5.4. On the older x86 server, I'm sticking with the 4.9 kernel series as long as it's supportable as I use it. EOL is January 2023: https://www.kernel.org/category/releases.html

----------

## manu.rhel

Thanks everyone for extending support and taking this to closure. Solution suggested by cboldt  fixed the issue - kernel upgrade to 5.10.x fixed the issue. Appreciate all the help .

----------

