NFS Connection Time Out Error

Issues related to applications and software problems and general support
Libra
Posts: 10
Joined: 2021/04/17 22:21:40

NFS Connection Time Out Error

Post by Libra » 2021/04/30 03:01:47

I'm trying to mount a windows drive/folder to a Linux directory and I'm getting an error "mount.nfs: Connection timed out". I ping my windows machine and I'm getting respond
PING 10.*.*.* (10.*.*.*) 56(84) bytes of data.
64 bytes from 10.*.*.*: icmp_seq=1 ttl=128 time=1.08 ms
64 bytes from 10.*.*.*: icmp_seq=2 ttl=128 time=1.08 ms
64 bytes from 10.*.*.*: icmp_seq=3 ttl=128 time=0.792 ms
64 bytes from 10.*.*.*: icmp_seq=4 ttl=128 time=0.807 ms
Here is the command I'm using.
mount -t nfs 10.*.*.*:/nfsShare /mnt/nfsshare
I tried Samba share it worked and now trying the NFS but it's not working. I'm new to Linux, started learning recently. I'm not sure if I need to install any application in my Windows 10 machine? How can I make it work? Thank you for you help.

Thank you

tunk
Posts: 1204
Joined: 2017/02/22 15:08:17

Re: NFS Connection Time Out Error

Post by tunk » 2021/04/30 09:56:44

Windows 10 cannot be a NFS server, i.e. it will not work:
https://docs.microsoft.com/en-us/window ... r-versions

Libra
Posts: 10
Joined: 2021/04/17 22:21:40

Re: NFS Connection Time Out Error

Post by Libra » 2021/05/03 03:58:36

Thank you for replying. I installed another Centos in my virtualbox and made it work with NFS share.

I have another problem now. Initially I was using samba share between windows and Linux. Now I'm trying to mount files from one centos to another centos using samba and getting an error. I created directory from Centos (2) and made it public, when I go to Centos (1) and use the command mount -t cifs -o username=admin //10.*.*.*//home/admin/Public /mnt/cifs/ however I'm getting the below error.
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
I ran showmount command "showmount -e 10.*.*.*" and got Timeout error (clnt_create: RPC: Timed out).

By the way I installed samba-client and cifs-utils in both of the machine. When I checked the status of samba from the machine 1 it is active but when I checked from the machine 2 (systemctl status smb or smb.service) got an error Unit smb.service could not be found..

I ran command "systemctl start smb" or "systemctl start smb.service" I got another error Failed to start smb.service: Unit smb.service not found.

I don't have any clue what's going on. What can be the issue? Thanks

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: NFS Connection Time Out Error

Post by jlehtone » 2021/05/03 08:11:42

Libra wrote:
2021/05/03 03:58:36
I don't have any clue what's going on. What can be the issue? Thanks
Unit smb.service not found.
File smb.service not found.

Q: Which package(s) have that file?

Code: Select all

$ sudo dnf -q provides */smb.service
samba-4.12.3-12.el8.3.x86_64 : Server and Client software to interoperate with Windows machines
Repo        : baseos
Matched from:
Filename    : /usr/lib/systemd/system/smb.service
A: Package samba

After installing package you have to configure the Samba server, and allow access to that service in firewall.
If you want to share a home directory, then SELinux boolean has to be set too.

lightman47
Posts: 1521
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: NFS Connection Time Out Error

Post by lightman47 » 2021/05/03 10:05:41

mount -t nfs 10.*.*.*:/nfsShare /mnt/nfsshare
How about
mount -t ntfs 10.*.*.*:/ntfsShare /mnt/nfsshare

Make sure you've installed the ntfs-3g package

Libra
Posts: 10
Joined: 2021/04/17 22:21:40

Re: NFS Connection Time Out Error

Post by Libra » 2021/05/07 02:06:42

This is what I tried so far.
1-I try to run the command you mentioned,
$ sudo dnf -q provides */smb.service
samba-4.12.3-12.el8.3.x86_64 : Server and Client software to interoperate with Windows machines
Repo : baseos
Matched from:
Filename : /usr/lib/systemd/system/smb.service
it didn't display anything thing other than the following response.
No such command: provide. Please use /usr/bin/dnf --help
It could be a DNF plugin command, try: "dnf install 'dnf-command(provide)'"
However I can see smb.service file in /usr/lib/systemd/system
--
2. I installed samba and I was able to start the smb service and can check the status. However I'm still unable to mount directory from one centos vm to another. This is what I'm getting now.
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
I added below commands in smb.config file
[Centos2]
path = /smbshare
read only = No
guest ok = No
Valid users = smbuser1
browsable = Yes
I'm not sharing my home directory though. I ran this command " smbclient -L 10.*.*.* -U smbuser1" I can get response I can see the below directories.

Sharename Type Comment
--------- ---- -------
print$ Disk Printer Drivers
Centos2 Disk
IPC$ IPC IPC Service (Samba 4.12.3)

This is where I'm stuck. Thank you for your help.

tunk
Posts: 1204
Joined: 2017/02/22 15:08:17

Re: NFS Connection Time Out Error

Post by tunk » 2021/05/07 09:33:53

As jlehtone said, did you open the firewall?

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: NFS Connection Time Out Error

Post by jlehtone » 2021/05/07 09:59:32

@tunk:
If one can do "smbclient -L" from another machine, then firewall is probably ok.

Can you access share with smbclient? You clearly can list shares with it.

What is the latest mount command?
One can give verbosity option '-v' for mount.

Samba server writes logs into /var/log/samba/



PS. There is less reason to obfuscate 10.*.*.* because all those addresses are in a private subnet.

Libra
Posts: 10
Joined: 2021/04/17 22:21:40

Re: NFS Connection Time Out Error

Post by Libra » 2021/05/10 01:49:01

Firewall is open.
Here is the command I use to mount a direcotry
mount -vt cifs -o username=smbuser1 //10.*.*.*/smbshare /mnt/cifs
or
mount -t cifs -o username=smbuser1 //10.*.*.*/smbshare /mnt/cifs
Here is the log from /var/log/samba/log.smbd
[2021/05/08 18:13:02.065521, 0] ../../source3/smbd/server.c:1782(main)
smbd version 4.12.3 started.
Copyright Andrew Tridgell and the Samba Team 1992-2020
[2021/05/08 18:13:02.275801, 0] ../../lib/util/become_daemon.c:136(daemon_ready)
daemon_ready: daemon 'smbd' finished starting up and ready to serve connections
[2021/05/08 18:14:16.796882, 0] ../../source3/smbd/server.c:1782(main)
smbd version 4.12.3 started.
Copyright Andrew Tridgell and the Samba Team 1992-2020
[2021/05/08 18:14:16.876895, 0] ../../lib/util/become_daemon.c:136(daemon_ready)
daemon_ready: daemon 'smbd' finished starting up and ready to serve connections
I can access that share directory from the windows machine but I'm unable to mount a directory from one centos to another. I'm lost, can't able to make it work. Thanks for your help.

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: NFS Connection Time Out Error

Post by jlehtone » 2021/05/10 06:05:01

Libra wrote:
2021/05/07 02:06:42
I added below commands in smb config file

Code: Select all

[Centos2]
...

Code: Select all

$ smbclient -L 10.*.*.* -U smbuser1
Sharename       Type      Comment
---------       ----      -------
Centos2         Disk      
Libra wrote:
2021/05/10 01:49:01
Here is the command I use to mount a direcotry

Code: Select all

$ mount -vt cifs -o username=smbuser1 //10.*.*.*/smbshare /mnt/cifs
man smb.conf wrote:Each section in the configuration file (except for the [global] section) describes a shared resource (known as a “share”). The section name is the name of the shared resource and the parameters within the section define the shares attributes.
Your config creates share "Centos2".
You attempt to mount share "smbshare".

Post Reply