安装完集群之后,启动NFS Gateway角色的时候,发现启动不了。
查看日志文件Stderr发现如下报错:
+ connect_to_port 111
+ PORT=111
+ python -c 'import socket; import sys; s = socket.socket(socket.AF_INET); s.settimeout(5.0); s.connect((sys.argv[1], int(sys.argv[2]))); s.close();' localhost 111
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<string>", line 1, in connect
socket.error: [Errno 111] Connection refused
+ '[' 1 -ne 0 ']'
+ echo 'Cannot connect to port 111.'
+ return 1
+ '[' 1 -eq 1 ']'
+ echo 'No portmap or rpcbind service is running on this host. Please start portmap or rpcbind service before attempting to start the NFS Gateway role on this host.'
+ exit 1
重点是这句话:No portmap or rpcbind service is running on this host
发现是没有安装rpcbind,安装
yum -y install rpcbind.x86_64
启动rpcbind服务:
service rpcbind start
然后重新启动NFS Gateway发现启动成功!