Public bug reported:

Under certain conditions, a restart of rpcbind can prevent it from
listening on the ports it's supposed to listen on.

If there are open connections to rpcbind when it shuts down, those
connections will end up in TIME_WAIT.  Because rpcbind doesn't use the
SO_REUSEADDR socket option, those TIME_WAIT connections prevent it from
binding to the same port before those connections have timed out.

To reproduce:

root@satwelltest1:~# nc localhost sunrpc &
[1] 12244
root@satwelltest1:~# stop portmap
portmap stop/waiting
[1]+  Done                    nc localhost sunrpc
root@satwelltest1:~# start portmap
portmap start/running, process 12252
root@satwelltest1:~# rpcinfo -p localhost
rpcinfo: can't contact portmapper: RPC: Remote system error - Connection refused

/var/log/daemon.log contains:

Jan 31 16:03:53 satwelltest1 rpcbind: cannot bind tcp: Address already
in use

And notice that rpcbind is actually running, but is only bound to the
TCP sunrpc port on IPv6, not IPv4:

root@satwelltest1:~# lsof -p 12252 | grep :sunrpc
rpcbind 12252 root    6u  IPv4              32182      0t0     UDP *:sunrpc 
rpcbind 12252 root   10u  IPv6              32190      0t0     UDP *:sunrpc 
rpcbind 12252 root   12u  IPv6              32194      0t0     TCP *:sunrpc 
(LISTEN)

This is on Precise with rpcbind 0.2.0-7ubuntu1.

** Affects: rpcbind (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/924593

Title:
  rpcbind silently breaks when restarted

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rpcbind/+bug/924593/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to