标签:unbound method execute_cleanup() ambari registering failed
卡在registering失败,查看日志发现registering前有报错:
INFO 2016-08-19 15:42:58,149 hostname.py:89 - Read public hostname \‘hdp-data1\‘ using socket.getfqdn() ERROR 2016-08-19 15:42:58,156 main.py:309 - Fatal exception occurred: Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 306, in <module> main(heartbeat_stop_callback) File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 297, in main ExitHelper.execute_cleanup() TypeError: unbound method execute_cleanup() must be called with ExitHelper instance as first argument (got nothing instead) ‘, None)
这是因为ambari他吗是国外的,默认用的ascii编码,如果你用的中文版操作系统,可以在/usr/lib/python2.6/site-packages/ambari_agent/main.py 文件开头添加
import sys
reload(sys)
sys.setdefaultencoding(‘utf-8‘)
然后再retry failed就可以了
哈哈,相比别人重装系统,我还是比较机智的。
本文出自 “DanielQu” 博客,请务必保留此出处http://qujunorz.blog.51cto.com/6378776/1840323
标签:unbound method execute_cleanup() ambari registering failed
原文地址:http://qujunorz.blog.51cto.com/6378776/1840323