Bug 1290601

Summary: rpcbind.socket doesn't listen on UDP or TCP socket
Product: Red Hat Enterprise Linux 7 Reporter: Orion Poplawski <orion>
Component: rpcbindAssignee: Steve Dickson <steved>
Status: CLOSED DUPLICATE QA Contact: Filesystem QE <fs-qe>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.2   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-25 16:28:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Orion Poplawski 2015-12-10 23:12:13 UTC
Description of problem:

As it currently stands, rpcbind is only activated by connection via /var/run/rpcbind.sock, but not by attempts to connect to the sunrpc UDP or TCP port.  So svc_register(..., IPROTO_TCP) fails with:

Cannot register service: RPC: Unable to receive; errno = Connection refused 

Version-Release number of selected component (if applicable):
rpcbind-0.2.0-26.el7.x86_64

Now, we probably don't want to have a network facing socket enabled by default, but we could have a separate disabled by default socket:

/usr/lib/systemd/system/rpcbind-network.socket:

[Unit]
Description=RPCbind Server Network Activation Socket

[Socket]
ListenDatagram=111
ListenStream=111
Service=rpcbind.service

[Install]
WantedBy=sockets.target


Interestingly enough, once rpcbind is started by the local /var/run/rpcbind.sock it listens on the UDP and TCP ports anyway.   But I suppose that is always necessary?

Comment 1 Orion Poplawski 2015-12-10 23:45:20 UTC
Except for the fact that just doesn't work.  Perhaps what is just needed is to be able to enable and start rpcbind.service directly by having:

[Install]
WantedBy=multi-user.target

in rpcbind.service.

Comment 2 Orion Poplawski 2015-12-11 20:20:26 UTC
Well, that would be:

[Install]
WantedBy=multi-user.target
Also=rpcbind.socket

to keep the socket activation as well.  Workaround is just to do:

ln -s /usr/lib/systemd/system/rpcbind.service /etc/systemd/system/sockets.target.wants/rpcbind.service

manually instead of systemctl enable rpcbind.service.

Comment 3 Orion Poplawski 2015-12-17 17:40:48 UTC
Sorry, that workaround should be:

ln -s /usr/lib/systemd/system/rpcbind.service /etc/systemd/system/multi-user.target.wants/rpcbind.service

Comment 4 Steve Dickson 2016-01-25 16:28:16 UTC

*** This bug has been marked as a duplicate of bug 1293430 ***