Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NFS mount not working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
manu_leo
Guru
Guru


Joined: 20 Jan 2014
Posts: 513
Location: India

PostPosted: Fri Sep 24, 2021 6:24 am    Post subject: NFS mount not working Reply with quote

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)
/home/internal-4tb-himalaya-8 192.168.101.0/24(root_squash,ro,sync,no_subtree_check)

/home/internal-4tb-himalaya-9 192.168.11.0/24(root_squash,ro,sync,no_subtree_check)
/home/internal-4tb-himalaya-9 192.168.101.0/24(root_squash,ro,sync,no_subtree_check)

/home/internal-4tb-himalaya-10 192.168.11.0/24(root_squash,ro,sync,no_subtree_check)
/home/internal-4tb-himalaya-10 192.168.101.0/24(root_squash,ro,sync,no_subtree_check)

/home/internal-4tb-himalaya-11 192.168.11.0/24(root_squash,ro,sync,no_subtree_check)
/home/internal-4tb-himalaya-11 192.168.101.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
* status: started


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
listening on enp68s0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
10:13:03.212245 IP 192.168.101.39.swat > 192.168.11.49.nfs: Flags [S], seq 1397454514, win 64240, options [mss 1460,sackOK,TS val 1312969790 ecr 0,nop,wscale 7], length 0
10:13:03.212311 IP 192.168.11.49.nfs > 192.168.101.39.swat: Flags [S.], seq 3151709560, ack 1397454515, win 65160, options [mss 1460,sackOK,TS val 4106184489 ecr 1312969790,nop,wscale 7], length 0
10:13:03.212522 IP 192.168.101.39.swat > 192.168.11.49.nfs: Flags [.], ack 1, win 502, options [nop,nop,TS val 1312969790 ecr 4106184489], length 0
10:13:03.212573 IP 192.168.101.39.swat > 192.168.11.49.nfs: Flags [P.], seq 1:45, ack 1, win 502, options [nop,nop,TS val 1312969790 ecr 4106184489], length 44: NFS request xid 2272407064 40 null
10:13:03.212593 IP 192.168.11.49.nfs > 192.168.101.39.swat: Flags [.], ack 45, win 509, options [nop,nop,TS val 4106184490 ecr 1312969790], length 0
10:13:03.212687 IP 192.168.11.49.nfs > 192.168.101.39.swat: Flags [P.], seq 1:29, ack 45, win 509, options [nop,nop,TS val 4106184490 ecr 1312969790], length 28: NFS reply xid 2272407064 reply ok 24 null
10:13:03.212866 IP 192.168.101.39.swat > 192.168.11.49.nfs: Flags [.], ack 29, win 502, options [nop,nop,TS val 1312969790 ecr 4106184490], length 0
10:13:03.213005 IP 192.168.101.39.swat > 192.168.11.49.nfs: Flags [P.], seq 45:285, ack 29, win 502, options [nop,nop,TS val 1312969791 ecr 4106184490], length 240: NFS request xid 2289184280 236 getattr fh 0,1/42
10:13:03.213131 IP 192.168.11.49.nfs > 192.168.101.39.swat: Flags [P.], seq 29:53, ack 285, win 508, options [nop,nop,TS val 4106184490 ecr 1312969791], length 24: NFS reply xid 2289184280 reply ERR 20: Auth Bogus Credentials (seal broken)


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.
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Fri Sep 24, 2021 9:43 am    Post subject: Reply with quote

What's the output of
Code:
showmount -e 192.168.11.49

on the client?
Back to top
View user's profile Send private message
manu.rhel
n00b
n00b


Joined: 11 Apr 2014
Posts: 25

PostPosted: Fri Sep 24, 2021 9:57 am    Post subject: Reply with quote

Getting this -

Quote:
# showmount -e 192.168.11.49
rpc mount export: RPC: Unable to receive; errno = Connection refused
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Fri Sep 24, 2021 10:43 am    Post subject: Reply with quote

Google:
Code:
nfs showmount "connection refused"

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

What does
Code:
rpcinfo -p 192.168.11.49

show?
Back to top
View user's profile Send private message
manu.rhel
n00b
n00b


Joined: 11 Apr 2014
Posts: 25

PostPosted: Fri Sep 24, 2021 11:24 am    Post subject: Reply with quote

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
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 52486 status
100024 1 tcp 60399 status
100005 1 udp 46453 mountd
100005 1 tcp 57661 mountd
100005 2 udp 33240 mountd
100005 2 tcp 46351 mountd
100005 3 udp 50387 mountd
100005 3 tcp 33073 mountd
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100227 3 tcp 2049 nfs_acl
100021 1 udp 41978 nlockmgr
100021 3 udp 41978 nlockmgr
100021 4 udp 41978 nlockmgr
100021 1 tcp 33691 nlockmgr
100021 3 tcp 33691 nlockmgr
100021 4 tcp 33691 nlockmgr
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Fri Sep 24, 2021 12:21 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
manu.rhel
n00b
n00b


Joined: 11 Apr 2014
Posts: 25

PostPosted: Fri Sep 24, 2021 12:58 pm    Post subject: Reply with quote

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
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 57460 status
100024 1 tcp 43435 status
100005 1 udp 40517 mountd
100005 1 tcp 44397 mountd
100005 2 udp 44945 mountd
100005 2 tcp 33761 mountd
100005 3 udp 52352 mountd
100005 3 tcp 34759 mountd
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100227 3 tcp 2049 nfs_acl
100021 1 udp 50645 nlockmgr
100021 3 udp 50645 nlockmgr
100021 4 udp 50645 nlockmgr
100021 1 tcp 35709 nlockmgr
100021 3 tcp 35709 nlockmgr
100021 4 tcp 35709 nlockmgr


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.
Escape character is '^]'.


Connection closed by foreign host.


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
1 192.168.101.2 2.840 ms 2.554 ms 2.392 ms
2 192.168.11.49 [closed] 0.299 ms 0.315 ms 0.193 ms
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Fri Sep 24, 2021 2:01 pm    Post subject: Reply with quote

Please show us the output of "showmount -e 192.168.11.49" on the server.
Back to top
View user's profile Send private message
manu.rhel
n00b
n00b


Joined: 11 Apr 2014
Posts: 25

PostPosted: Fri Sep 24, 2021 2:06 pm    Post subject: Reply with quote

This is on the server -

# showmount -e 192.168.11.49
rpc mount export: RPC: Unable to receive; errno = Connection refused
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Fri Sep 24, 2021 2:23 pm    Post subject: Reply with quote

"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.
Back to top
View user's profile Send private message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Fri Sep 24, 2021 2:32 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2963
Location: Edge of marsh USA

PostPosted: Sat Sep 25, 2021 12:53 am    Post subject: Reply with quote

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
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
manu.rhel
n00b
n00b


Joined: 11 Apr 2014
Posts: 25

PostPosted: Sat Sep 25, 2021 4:24 pm    Post subject: Reply with quote

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 .
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum