NFS啟動時報錯Linux NFS:could not open connection for tcp6


1.1 啟動時出現的錯誤

[root@znix ~]#/etc/init.d/nfs start
Shutting down NFS daemon:                                 [  OK  ]
Shutting down NFS mountd:                                  [  OK  ]
Shutting down NFS services:                                 [  OK  ]
Shutting down RPC idmapd:                                  [  OK  ]
Starting NFS services:                                           [  OK  ]
Starting NFS mountd: rpc.mountd: svc_tli_create: could not open connection for udp6
rpc.mountd: svc_tli_create: could not open connection for tcp6
rpc.mountd: svc_tli_create: could not open connection for udp6
rpc.mountd: svc_tli_create: could not open connection for tcp6
rpc.mountd: svc_tli_create: could not open connection for udp6
rpc.mountd: svc_tli_create: could not open connection for tcp6
                                                                          [  OK  ]
Starting NFS daemon: rpc.nfsd: address family inet6 not supported by protocol TCP
                                                                 [  OK  ]
Starting RPC idmapd:                                         [  OK  ]

根據啟動提示可以獲知,inet6地址族不被支持,原因是當前主機沒有加載ipv6的模塊,可以重新加載一遍ipv6模塊解決這個問題。

由於我的系統不需要ipv6的支持,所以還可以通過下面的操作,取消NFS的ipv6調用。

1.2 解決辦法】編輯netconfig配置文件,注釋相關TCP/UDP6的信息條目

[root@znix ~]#vim /etc/netconfig
 
#
# Entries consist of:
#
#       <network_id> <semantics> <flags> <protofamily> <protoname> \
#               <device> <nametoaddr_libs>
#
# The <device> and <nametoaddr_libs> fields are always empty in this
# implementation.
#
udp        tpi_clts      v     inet     udp     -       -
tcp        tpi_cots_ord  v     inet     tcp     -       -
#udp6       tpi_clts      v     inet6    udp     -       -
#tcp6       tpi_cots_ord  v     inet6    tcp     -       -
rawip      tpi_raw       -     inet      -      -       -
"/etc/netconfig" 19L, 769C written

1.3 重啟服務驗證

[root@znix ~]#/etc/init.d/nfs restart 
Shutting down NFS daemon:                                  [  OK  ]
Shutting down NFS mountd:                                  [  OK  ]
Shutting down NFS services:                                 [  OK  ]
Shutting down RPC idmapd:                                   [  OK  ]
Starting NFS services:                                           [  OK  ]
Starting NFS mountd:                                           [  OK  ]
Starting NFS daemon:                                          [  OK  ]
Starting RPC idmapd:                                           [  OK  ]


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM