Operating System - Linux
1752766 Members
5275 Online
108789 Solutions
New Discussion юеВ

Re: Could not bind UDP socket to 0.0.0.0:2049: Address already in use

 
SOLVED
Go to solution
'chris'
Super Advisor

Could not bind UDP socket to 0.0.0.0:2049: Address already in use

hi

I've installed nfs server on my powerpc:

Package: nfs-server
Version: 2.2beta47-4
Depends: portmap
Status: install user installed
Architecture: powerpc

and nfs-utils:

Package: nfs-utils
Version: 1.0.7-5
Depends: portmap
Status: install user installed
Architecture: powerpc


# ps aux | grep nfs
600 root SW [nfsd]
819 root 224 S grep nfs


it seems to work, but I don't know why I'm still getting this message in the log:
-------------------------------------------------------------------------------------------------------------
Jun 7 00:45:53 nfsd[677]: Could not bind UDP socket to 0.0.0.0:2049: Address already in use
-------------------------------------------------------------------------------------------------------------

my second question is howto chmod /etc/exports ?

kind regards
chris
9 REPLIES 9
Tony Berry
Valued Contributor
Solution

Re: Could not bind UDP socket to 0.0.0.0:2049: Address already in use

Hello Chris.

What version of the OS are you running?

When you say you want to "chmod" /etc/exports, do you mean to strengthen permissions? We run our systems with 'chmod 644 /etc/exports' and 'chown root:sys /etc/exports'... that allows read/write access for root, read access for the sys group and all other users. Visit the man page for exports and chmod for more info.
Unix is boss.
Stuart Browne
Honored Contributor

Re: Could not bind UDP socket to 0.0.0.0:2049: Address already in use

use 'netstat -nulp' to find out what is listening to UDP 2049.

If it's not 'nfsd', then stop it.

If it is, clear the log file, and restart 'nfsd'.
One long-haired git at your service...
'chris'
Super Advisor

Re: Could not bind UDP socket to 0.0.0.0:2049: Address already in use

thanks, but I still don't know what is listening to UDP 2049


storage> uname -a
Linux storage 2.4.22-uc0 #458 Tue Apr 3 01:09:49 CST 2007 ppc unknown


storage> netstat -nulp
netstat: invalid option -- p
BusyBox v1.1.0 (2007.04.02-17:14+0000) multi-call binary

Usage: netstat [-laenrtuwx]

storage> netstat ap | grep LISTEN
storage> netstat -pl
netstat: invalid option -- p
BusyBox v1.1.0 (2007.04.02-17:14+0000) multi-call binary

Usage: netstat [-laenrtuwx]

storage> netstat -tnlp
netstat: invalid option -- p
BusyBox v1.1.0 (2007.04.02-17:14+0000) multi-call binary

Usage: netstat [-laenrtuwx]

storage> netstat -anp | grep LISTEN
netstat: invalid option -- p
BusyBox v1.1.0 (2007.04.02-17:14+0000) multi-call binary

Usage: netstat [-laenrtuwx]

storage> netstat -a | grep nfs
tcp 0 0 *:nfs *:* LISTEN
udp 0 0 *:nfs *:*

storage> netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 storage:ssh 192.168.200.10:4139 ESTABLISHED
tcp 0 126 storage:telnet 192.168.200.10:4153 ESTABLISHED
tcp 0 0 localhost:postgres localhost:1024 ESTABLISHED
tcp 0 0 localhost:1024 localhost:postgres ESTABLISHED
tcp 0 0 localhost:postgres localhost:1026 ESTABLISHED
tcp 0 0 localhost:1026 localhost:postgres ESTABLISHED
udp 0 0 localhost:1024 localhost:1024 ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags Type State I-Node Path
unix 5 [ ] DGRAM 207 /var/run/log
unix 3 [ ] STREAM CONNECTED 2298
unix 3 [ ] STREAM CONNECTED 2297
unix 3 [ ] STREAM CONNECTED 2296
unix 3 [ ] STREAM CONNECTED 2295
unix 3 [ ] STREAM CONNECTED 1867 /dev/log
unix 3 [ ] STREAM CONNECTED 1864
unix 3 [ ] STREAM CONNECTED 1780 /dev/log
unix 3 [ ] STREAM CONNECTED 1777
unix 3 [ ] STREAM CONNECTED 1389 /dev/log
unix 3 [ ] STREAM CONNECTED 1388
unix 2 [ ] DGRAM 513
unix 2 [ ] DGRAM 382
unix 2 [ ] DGRAM 201
'chris'
Super Advisor

Re: Could not bind UDP socket to 0.0.0.0:2049: Address already in use

in /etc/services I found the following active entries:


nfs 2049/tcp nfsd
nfs 2049/udp nfsd


perhaps should be disabled ?
Stuart Browne
Honored Contributor

Re: Could not bind UDP socket to 0.0.0.0:2049: Address already in use

What distribution are you using ?!
One long-haired git at your service...
skt_skt
Honored Contributor

Re: Could not bind UDP socket to 0.0.0.0:2049: Address already in use

restart nfs service :Later Restart xinetd service if required.
watch /var/log/messages while restarting those service to check e if any error reported.
'chris'
Super Advisor

Re: Could not bind UDP socket to 0.0.0.0:2049: Address already in use

I'm using:

http://www.nslu2-linux.org/wiki/DS101/HomePage


storage> uname -a
Linux storage 2.4.22-uc0 #458 Tue Apr 3 01:09:49 CST 2007 ppc unknown


to deactivate nfs entries from /etc/services it doesn't help.

if I try to restart nfs service, I'm getting the same error.
Stuart Browne
Honored Contributor

Re: Could not bind UDP socket to 0.0.0.0:2049: Address already in use

The '/etc/services' has no assication with started services. Alterting won't do anything you're after. It is literally just a lookup-file for ports-to-services. Removing things from it will cause you more grief than you want.

Now..

That UDP port is not in use (as shown by your 'netstat').

This means that either the startup routine for the 'nfs' service is flawed and trying to start 'nfsd' twice (thus why you're getting the unable-to-bind error), or there's some other security model involved (selinux perhaps) which hasn't got sufficient privileges to bind to that UDP socket.

Looking into that package closer, it appears not to be either of these points however.

That being said, the 'ps' you were doing earlier showed '[nfsd]' which looks like the kernel-nfs stuff, which conflicts with 'nfs-server' (which should show as 'rpc.nfsd'). You haven't got both installed do you?
One long-haired git at your service...
'chris'
Super Advisor

Re: Could not bind UDP socket to 0.0.0.0:2049: Address already in use

yep, you're completely right !

I have removed nfs-server:

# ipkg remove nfs-server

and let only nfs-utils installed.

now it seems to work without any errors.

greetings
chris