Skip to content

Instantly share code, notes, and snippets.

@M2shad0w
Last active February 16, 2017 10:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save M2shad0w/1a7b194a506066a782e633e4e9fe119e to your computer and use it in GitHub Desktop.
Save M2shad0w/1a7b194a506066a782e633e4e9fe119e to your computer and use it in GitHub Desktop.
ambari-agent-start-error.md

error

手动起 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')

参考链接

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment