Solved: Unit rpcbind.service has failed.

Suppose you are trying to start the rpcbind service on a system and its getting failed below error.

I. Error Message

### Check status of the service
[root@ngelinux001 ~]# service rpcbind status
Redirecting to /bin/systemctl status rpcbind.service
● rpcbind.service - RPC bind service
   Loaded: loaded (/usr/lib/systemd/system/rpcbind.service; enabled; vendor preset: enabled)
   Active: inactive (dead)

Sep 24 20:10:51 ngelinux001 systemd[1]: Dependency failed for RPC bind service.
Sep 24 20:10:51 ngelinux001 systemd[1]: Job rpcbind.service/start failed with result 'dependency'.
Sep 24 20:11:07 ngelinux001 systemd[1]: Dependency failed for RPC bind service.
Sep 24 20:11:07 ngelinux001 systemd[1]: Job rpcbind.service/start failed with result 'dependency'.
Sep 24 20:11:19 ngelinux001 systemd[1]: Dependency failed for RPC bind service.
Sep 24 20:11:19 ngelinux001 systemd[1]: Job rpcbind.service/start failed with result 'dependency'.

### Try to restart the service.
[root@ngelinux001 ~]# service rpcbind restart
Redirecting to /bin/systemctl restart rpcbind.service
A dependency job for rpcbind.service failed. See 'journalctl -xe' for details.

### Check out the error messages
[root@ngelinux001 ~]# journalctl -xe
Sep 24 20:13:01 ngelinux001 dbus[20895]: [system] Successfully activated service 'org.freedesktop.PolicyKit1'
Sep 24 20:13:01 ngelinux001 systemd[1]: Started Authorization Manager.
-- Subject: Unit polkit.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit polkit.service has finished starting up.
--
-- The start-up result is done.
Sep 24 20:13:01 ngelinux001 polkitd[22258]: Acquired the name org.freedesktop.PolicyKit1 on the system bus
Sep 24 20:13:01 ngelinux001 polkitd[22258]: Registered Authentication Agent for unix-process:22243:14583 (system bus name :1.
Sep 24 20:13:01 ngelinux001 systemd[1]: rpcbind.socket failed to listen on sockets: Address family not supported by protocol
Sep 24 20:13:01 ngelinux001 systemd[1]: Failed to listen on RPCbind Server Activation Socket.
-- Subject: Unit rpcbind.socket has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit rpcbind.socket has failed.
--
-- The result is failed.
Sep 24 20:13:01 ngelinux001 systemd[1]: Dependency failed for RPC bind service.
-- Subject: Unit rpcbind.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit rpcbind.service has failed.
--
-- The result is dependency.
Sep 24 20:13:01 ngelinux001 systemd[1]: Job rpcbind.service/start failed with result 'dependency'.
Sep 24 20:13:01 ngelinux001 polkitd[22258]: Unregistered Authentication Agent for unix-process:22243:14583 (system bus name :

 

II. Solution

[root@ngelinux001 ~]# systemctl restart rpcbind.service
A dependency job for rpcbind.service failed. See 'journalctl -xe' for details.

This happens because rpcbind service has rpcbind socket service mentioned as dependency.

To workaround this issue, we need to remove this dependency.

### Take backup and Edit the file rpcbind.service
[root@ngelinux001 ~]# cp /usr/lib/systemd/system/rpcbind.service /root/
[root@ngelinux001 ~]# vi /usr/lib/systemd/system/rpcbind.service

### Just check the line "Requires=rpcbind.socket" and comment it out.
[root@ngelinux001 saketj]# cat  /usr/lib/systemd/system/rpcbind.service
[Unit]
Description=RPC bind service
DefaultDependencies=no

# Make sure we use the IP addresses listed for
# rpcbind.socket, no matter how this unit is started.
#Requires=rpcbind.socket
Wants=rpcbind.target
After=systemd-tmpfiles-setup.service

[Service]
Type=forking
EnvironmentFile=/etc/sysconfig/rpcbind
ExecStart=/sbin/rpcbind -w $RPCBIND_ARGS

[Install]
WantedBy=multi-user.target
[root@ngelinux001 saketj]#

### Restart the service
[root@ngelinux001 ~]# systemctl restart rpcbind.service
[root@ngelinux001 ~]#

[root@ngelinux001 ~]# systemctl status rpcbind.service
● rpcbind.service - RPC bind service
   Loaded: loaded (/usr/lib/systemd/system/rpcbind.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2022-09-24 20:16:13 IST; 9s ago
  Process: 22759 ExecStart=/sbin/rpcbind -w $RPCBIND_ARGS (code=exited, status=0/SUCCESS)
 Main PID: 22760 (rpcbind)
   CGroup: /system.slice/rpcbind.service
           └─22760 /sbin/rpcbind -w

Sep 24 20:16:13 ngelinux001 systemd[1]: Starting RPC bind service...
Sep 24 20:16:13 ngelinux001 systemd[1]: Started RPC bind service.
[root@ngelinux001 ~]#
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments