一次MFS下的报错分析(14年遇到的)

简介:

MooseFS


一、错误日志信息:

 Master 上自带有 Mfscgiserv , 那个服务我也起来了 . 但是访问 MasterIP:9425 , 页面会自动跳转至 mfs.cig 这个页面 . 且显示如下内容 :

1
2
3
4
5
6
7
8
9
  ----------------------------------------------------------------------》
Traceback (most recent call last):
     File  "/usr/sbin/mfscgiserv" , line 300,  in  run_cgi
     execfile(self.file_name)
File  "/usr/share/mfscgi/mfs.cgi" , line 129
     return  "%s%.1f%s"  % (( "~"  if  n != rn  else  "" ),rn,s)
                             ^
SyntaxError: invalid syntax
  ----------------------------------------------------------------------》

我百度很多资料 , 都说重启就 OK 的 . 于是我就 KILL 掉服务 , 又重启 , 无效 .

然后我又将 4 台虚拟机全部重启 , 还是无效 . 但正常挂在数据写入什么的都正常 .


二、分析原因:

Python版本过低导致,需要升级Python版本

MFS master需要2.5版本后的


三、解决方法:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
a、查看python的版本信息:
[root@a2 ~] # python -V
Python 2.4.3
b、升级部署
[root@a2 tmp] # tar zxvf Python-2.7.3.tgz 
[root@a2 Python-2.7.3] # ./configure && make && make install 
[root@a2 Python-2.7.3] # which python
/usr/local/bin/python
[root@a2 Python-2.7.3] # ln -sf /usr/local/bin/python /usr/bin/python
[root@a2 Python-2.7.3] # python -V
Python 2.7.3
c、处理升级后,yum的情况
由于Python升级后,看下原有yum是否还能正常使用
[root@a2 Python-2.7.3] # yum clean all
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
    No module named yum
Please  install  a package  which  provides this module, or
verify that the module is installed correctly.
It 's possible that the above module doesn' t match the
current version of Python,  which  is:
2.7.3 (default, Dec 17 2013, 17:33:06) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)]
If you cannot solve this problem yourself, please go to 
the yum faq at:
   http: //wiki .linux.duke.edu /YumFaq
   
[root@a2 Python-2.7.3] # vim /usr/bin/yum 
将“ #!/usr/bin/python”改为“#!/usr/bin/python2.4”
[root@a2 Python-2.7.3] # yum clean all
Loaded plugins: product- id , security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Cleaning up Everything
d、登录访问测试
http: //10 .0.0.13:9425 /mfs .cgi
可爱的画面终于出来了
e、加入开机脚本
[root@a2 tmp] # echo "/usr/sbin/mfsmaster start" >>/etc/rc.local 
[root@a2 tmp] # which mfscgiserv
/usr/sbin/mfscgiserv
[root@a2 tmp] # echo "/usr/sbin/mfscgiserv" >>/etc/rc.local









本文转自 冰冻vs西瓜 51CTO博客,原文链接:http://blog.51cto.com/molewan/1891384,如需转载请自行联系原作者
目录
相关文章
|
3月前
|
存储 运维 监控
MFS详解(三)——MFS应用
MFS详解(三)——MFS应用
42 2
|
3月前
|
存储 运维 负载均衡
MFS详解(二)——MFS原理和架构
MFS详解(二)——MFS原理和架构
174 0
|
3月前
|
存储 运维 Unix
MFS详解(一)——MFS介绍
MFS详解(一)——MFS介绍
208 0
|
监控 Shell API
使用inotify-tools与rsync构建实时备份系统
使用inotifywait监控文件变动 inotifywait是 inotify-tools 包中提供的一个工具,它使用 inotify API 来监控文件/目录中的变动情况。
826 0
|
存储 监控