启动rpcbind的问题
我正面临着rpcbind
的问题。 即使在启用服务后,重新启动后服务也无法启动。
当我在重启后运行systemctl status rpcbind
时,我得到以下输出。
root@ubuntu:~# systemctl status rpcbind ● rpcbind.service - RPC bind portmap service Loaded: loaded (/lib/systemd/system/rpcbind.service; indirect; vendor preset: enabled) Drop-In: /run/systemd/generator/rpcbind.service.d └─50-rpcbind-$portmap.conf Active: inactive (dead) root@ubuntu:~#
如果我启动服务systemctl start rpcbind
,服务将启动。
当我使用systemctl enable rpcbind
命令启用服务时,我得到以下输出。
root@ubuntu:~# systemctl enable rpcbind Synchronizing state of rpcbind.service with SysV init with /lib/systemd/systemd-sysv-install... Executing /lib/systemd/systemd-sysv-install enable rpcbind
输出cat /lib/systemd/system/rpcbind.service
root@ubuntu:~# cat /lib/systemd/system/rpcbind.service [Unit] Description=RPC bind portmap service After=systemd-tmpfiles-setup.service Wants=remote-fs-pre.target Before=remote-fs-pre.target Requires=rpcbind.socket DefaultDependencies=no [Service] Environment="OPTIONS=-w" ExecStart=/sbin/rpcbind -f $OPTIONS EnvironmentFile=-/etc/rpcbind.conf EnvironmentFile=-/etc/default/rpcbind Type=notify KillMode=process Restart=on-failure [Install] Also=rpcbind.socket
但重启后服务仍无法启用。
有人可以帮忙吗?
管理以解决问题。
在/etc/systemd/system/multi-user.target.wants/
目录中创建rpcbind.service
的符号链接修复了该问题。
ln -s '/lib/systemd/system/rpcbind.service' '/etc/systemd/system/multi-user.target.wants/rpcbind.service'
即使在启用服务后,重新启动后服务也无法启动。
它不应该。 它是一个套接字激活的服务。 你必须启用rpcbind.service
,而不是rpcbind.service
。