mount.nfs: requested NFS version or transport protocol is not supported

错误信息说明需求的nfs版本或传输协议不支持,意思是服务器端的nfs版本和客户端的nfs版本不同,百度发现网上都说该错误是内核配置有问题引发的,说是内核配置没有启用nfs导致。但是始终没有找到网上所说的修改内核配置的方法。

服务端

[root@nfs01 ~]# nfsstat -s   查看版本信息
Server rpc stats:
calls      badcalls   badclnt    badauth    xdrcall
8          48         0          48         0       

Server nfs v4:
null         compound     
8       100% 0         0% 

Server nfs v4 operations:
op0-unused   op1-unused   op2-future   access       close        commit       
0         0% 0         0% 0         0% 0         0% 0         0% 0         0% 
create       delegpurge   delegreturn  getattr      getfh        link         
0         0% 0         0% 0         0% 0         0% 0         0% 0         0% 
lock         lockt        locku        lookup       lookup_root  nverify      
0         0% 0         0% 0         0% 0         0% 0         0% 0         0% 
open         openattr     open_conf    open_dgrd    putfh        putpubfh     
0         0% 0         0% 0         0% 0         0% 0         0% 0         0% 
putrootfh    read         readdir      readlink     remove       rename       
0         0% 0         0% 0         0% 0         0% 0         0% 0         0% 
renew        restorefh    savefh       secinfo      setattr      setcltid     
0         0% 0         0% 0         0% 0         0% 0         0% 0         0% 
setcltidconf verify       write        rellockowner bc_ctl       bind_conn    
0         0% 0         0% 0         0% 0         0% 0         0% 0         0% 
exchange_id  create_ses   destroy_ses  free_stateid getdirdeleg  getdevinfo   
0         0% 0         0% 0         0% 0         0% 0         0% 0         0% 
getdevlist   layoutcommit layoutget    layoutreturn secinfononam sequence     
0         0% 0         0% 0         0% 0         0% 0         0% 0         0% 
set_ssv      test_stateid want_deleg   destroy_clid reclaim_comp 
0         0% 0         0% 0         0% 0         0% 0         0% 

[root@nfs01 ~]# 
[root@nfs01 ~]# 
[root@nfs01 ~]# cat /etc/exports
/data  172.16.1.8(rw)
[root@nfs01 ~]# ll -d /data/
drwxr-xr-x 2 nfsnobody nobody 6 Jan 10 04:00 /data/
[root@nfs01 ~]# id nfsnobody
uid=65534(nfsnobody) gid=65534(nfsnobody) groups=65534(nfsnobody)
[root@nfs01 ~]# rpm -qa nfs-utils
nfs-utils-1.3.0-0.65.el7.x86_64

客户端

[root@localhost ~]# mount -t nfs 172.16.1.31:/data  /mnt
mount.nfs: requested NFS version or transport protocol is not supported
[root@localhost ~]# df -Th
Filesystem              Type      Size  Used Avail Use% Mounted on
/dev/mapper/centos-root xfs        47G  1.4G   46G   3% /
devtmpfs                devtmpfs  475M     0  475M   0% /dev
tmpfs                   tmpfs     487M     0  487M   0% /dev/shm
tmpfs                   tmpfs     487M  7.6M  479M   2% /run
tmpfs                   tmpfs     487M     0  487M   0% /sys/fs/cgroup
/dev/sda1               xfs      1014M  133M  882M  14% /boot
tmpfs                   tmpfs      98M     0   98M   0% /run/user/0
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# nfsstat -s   查看版本信息
Error: No Server Stats (/proc/net/rpc/nfsd: No such file or directory). 
[root@localhost ~]# nfsstat -c
Client rpc stats:
calls      retrans    authrefrsh
24         32         24      

Client nfs v4:
null         read         write        commit       open         open_conf    
0         0% 0         0% 0         0% 0         0% 0         0% 0         0% 
open_noat    open_dgrd    close        setattr      fsinfo       renew        
0         0% 0         0% 0         0% 0         0% 0         0% 0         0% 
setclntid    confirm      lock         lockt        locku        access       
12       75% 0         0% 0         0% 0         0% 0         0% 0         0% 
getattr      lookup       lookup_root  remove       rename       link         
0         0% 0         0% 0         0% 0         0% 0         0% 0         0% 
symlink      create       pathconf     statfs       readlink     readdir      
0         0% 0         0% 0         0% 0         0% 0         0% 0         0% 
server_caps  delegreturn  getacl       setacl       fs_locations rel_lkowner  
0         0% 0         0% 0         0% 0         0% 0         0% 0         0% 
secinfo      exchange_id  create_ses   destroy_ses  sequence     get_lease_t  
0         0% 0         0% 4        25% 0         0% 0         0% 0         0% 
reclaim_comp layoutget    getdevinfo   layoutcommit layoutreturn getdevlist   
0         0% 0         0% 0         0% 0         0% 0         0% 0         0% 
(null)       
0         0% 

[root@localhost ~]# mount -t nfs 172.16.1.31:/data  /mnt
mount.nfs: requested NFS version or transport protocol is not supported

[root@localhost ~]# rpm -qa nfs-utils
nfs-utils-1.3.0-0.65.el7.x86_64

最后对比软件包都是一样的,报错还是说传输协议版本不对应。

  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured是一个常见的错误。这个错误提示表明在访问设置之前,需要配置Django的设置。 解决这个问题的方法有两种: 1. 定义环境变量DJANGO_SETTINGS_MODULE: 在项目的根目录中,可以通过在终端中使用export命令来定义环境变量DJANGO_SETTINGS_MODULE,例如: export DJANGO_SETTINGS_MODULE=<项目名称>.settings 然后再次运行项目,应该就不会再报错了。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [django调试问题django.core.exceptions.ImproperlyConfigured](https://blog.csdn.net/weixin_44602651/article/details/120456631)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* [Django报错:django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS解决办法](https://blog.csdn.net/jyr2014/article/details/126753776)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值