LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 12-01-2007, 01:18 AM   #1
bbyoung
LQ Newbie
 
Registered: Dec 2007
Posts: 5

Rep: Reputation: 0
Trouble mounting nfs file system


When I try to do an nfs mount I always get a message that the connection is refused. See the mount command output below.

[root@hostname ~]# mount -v hostname.my.local:/backup /media/backupdir
mount: no type was given - I'll assume nfs because of the colon
mount: trying 192.168.151.20 prog 100003 vers 3 prot tcp port 2049
mount: Unable to connect to 192.168.151.20:2049, errno 111 (Connection refused)
mount: mount to NFS server 'hostname.my.local' failed: System Error: Connection refused.

I think I have the nfs server configured correctly, but cannot figure out why the mount is failing. I'm client and server on the same machine, so I'm not even leaving my own workstation on the network. A tcpdump on lo interface shows the portmapper request and returns a tcp/2049 port reply. Next I see the SYN frame to initiate the tcp/2049 connection and then a RST,ACK from the server in response to this SYN frame. I can't figure out why the server process will not accept the TCP connection. What am I missing?
 
Old 12-01-2007, 02:59 AM   #2
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
what distro are you using? any firewalls running? do you have RPC packages installed? Do you have NFS packages installed? What does /etc/exports say? showmount -e? /etc/services? There are a lot of things to check. This is like asking why won't your car start ...
 
Old 12-01-2007, 10:05 AM   #3
bbyoung
LQ Newbie
 
Registered: Dec 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Sorry about lack of info. Let me try to answer the questions you pose.
Distro=fedora 7, no firewalls, RPC and NFS packages are installed

rpcbind, rpc.statd, rpc.mountd, rpc.quotad, nfsd, and nfsd4 processes are running

nfsd, exportfs, lockd, nfs_acl, auth_rpcgss, and sunrpc kernel modules are loaded.

/etc/exports files has only the following line:
/backup # -sync *(rw) # hostname.my.local(rw) hostname.my.local(rw)
Note I've tried many different exports file options and have finally added the # to comment the remainder of the line in order to just take defaults for troubleshooting.

showmount -e is:
Export list for hostname.my.local:
/backup *

exportfs -v output:
[root@hostname ~]# exportfs -v
exportfs: No host name given with /backup (ro,sync,wdelay,hide,nocrossmnt,secure,root_squash,no_all_squash,no_subtree_check,secure_locks,acl,a nonuid=65534,anongid=65534), suggest *(ro,sync,wdelay,hide,nocrossmnt,secure,root_squash,no_all_squash,no_subtree_check,secure_locks,acl, anonuid=65534,anongid=65534) to avoid warning
/backup <world>(ro,wdelay,root_squash,no_subtree_check)

ls -ld /backup /media/backupdir
drwxrwxrwx 2 root root 4096 2007-11-30 20:46 /backup
drwxr-xr-x 2 root root 4096 2007-11-30 22:26 /media/backupdir

rpcinfo -p output:
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
100000 4 0 111 portmapper
100000 3 0 111 portmapper
100000 2 0 111 portmapper
100011 1 udp 717 rquotad
100011 2 udp 717 rquotad
100011 1 tcp 720 rquotad
100011 2 tcp 720 rquotad
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100005 1 udp 32848 mountd
100005 1 tcp 34920 mountd
100005 2 udp 32848 mountd
100005 2 tcp 34920 mountd
100005 3 udp 32848 mountd
100005 3 tcp 34920 mountd
100024 1 udp 32849 status
100024 1 tcp 45615 status

Hopefully this is more detailed info to assist in answering the question.

Thanks for your response.
 
Old 12-01-2007, 12:31 PM   #4
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
Do you happen to be using SELinux? ls -lZ /backup? What does /var/log/messages say after the connection is refused? You're trying to connect another machine, right? Not your localhost?
 
Old 12-01-2007, 07:04 PM   #5
bbyoung
LQ Newbie
 
Registered: Dec 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Not sure about SELinux, but I think I may be using it. Seem to recall it was a default selection during the install. Also there is a /selinux dir and doing ls -lZ /backup lists extra information that I'm not familiar with

I have mostly been attempting connections from/to the localhost using the fqdn (not host localhost), but have made one attempt from a separate hosts with the same results. As for name resolution, no DNS just /etc/hosts files. This question is interesting, though. NFS "should" be able to connect on the same host as well as external hosts shouldn't it? Aren't the client and server daemons separate?

Nothing interesting at all in /var/log/messages from the connection, but there is a message when nfs starts that I haven't been able to figure out either.
/var/log/messages snippet:
Dec 1 00:00:59 hostname nfsd[3934]: nfssvc: writing fds to kernel failed: errno 98 (Address already in use)
Dec 1 00:00:59 hostname nfsd[3934]: nfssvc: writing fds to kernel failed: errno 98 (Address already in use)


ls output below:
[root@hostname ~]# ls -lZ /backup
-rw-r--r-- root root testfile

[root@hostname ~]# ls -lZ /
drwxrwxrwx root root backup
drwxr-xr-x root root system_ubject_r:bin_t:s0 bin

...

rwxr-x--- root root system_ubject_r:default_t:s0 root
drwxr-xr-x root root system_ubject_r:bin_t:s0 sbin
drwxr-xr-x root root system_ubject_r:file_t:s0 selinux

...

drwxr-xr-x root root system_ubject_r:usr_t:s0 usr
drwxr-xr-x root root system_ubject_r:var_t:s0 var

Thank you again for continuing to help me with this.
 
Old 12-01-2007, 11:00 PM   #6
bbyoung
LQ Newbie
 
Registered: Dec 2007
Posts: 5

Original Poster
Rep: Reputation: 0
I did some research on SElinux. Yes it's installed, but it's disabled.

[root@hostname /]# sestatus -v
SELinux status: disabled
 
Old 12-01-2007, 11:40 PM   #7
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
I honestly have no idea what else the problem could be. So you are sure the firewall is off? What does iptables -L show? /media/backupdir is empty, right? Anything in your /etc/hosts.deny file?

I've never done a localhost NFS mount so I'm not sure if it works or not.
 
Old 12-03-2007, 09:25 PM   #8
bbyoung
LQ Newbie
 
Registered: Dec 2007
Posts: 5

Original Poster
Rep: Reputation: 0
KERNEL PROBLEM!!!!

Rebooted back to my previous kernel and everything is fine. I haven't used NFS in my job because of the real and perceived security issues. I have used NFS but it's been several years since I last used it. I knew I wasn't a complete idiot, though.

Kernel version 2.6.23.1-10 from the FC7 package kernel.x86_64.2.6.23.1-10.fc7 seems to have nfs broken. I went back to kernel version 2.6.22.9-91 and after a quick look nfs appears to be working. I'll do more testing of course. Should have known better than to update to a cutting edge kernel.

Again thanks for taking the time to converse and help.
 
  


Reply

Tags
nfs


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble mounting root file system xUbuntu/kUbuntu xGorfx Linux - Hardware 6 02-05-2007 04:44 PM
Trouble mounting files using nfs Robeasts Linux - Newbie 2 09-14-2006 01:59 AM
trouble mounting an smbfs system jbeiter Linux - Software 4 11-22-2004 04:48 PM
Mounting root file system using NFS palanisaravanan Linux - General 5 01-03-2004 06:23 AM
Mounting nfs file system (but not as root) Sylhouette Linux - Networking 4 12-24-2001 04:38 AM


All times are GMT -5. The time now is 02:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration