手动起 ambari-agent 遇到如下错误
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)
主要是编码错误引起的
可以在/usr/lib/python2.6/site-packages/ambari_agent/main.py 文件开头添加
import sys
reload(sys)
sys.setdefaultencoding('utf-8')