我目前正在玩Hortonworks新的HDP 2.2预览版,并看到风暴的一些奇怪行为。许多教程建议您将 supervisord 安装为看门狗进程,因为 storm 是一个快速故障的应用程序。当暴风雨降临时,你需要一些东西来重新启动它。我用easy_install来设置它,因为 yum 给你旧的 2.1 版本。我目前安装了版本 3。
我打开沙盒,启动各种风暴零碎,它工作正常。然后我安装了 supervisord,将 supervisord.conf 文件设置为在底部包含以下内容:
[program:storm-nimbus]
command=storm nimbus
directory=/usr/lib/storm
autorestart=true
user=storm
[program:storm-supervisor]
command=storm supervisor
directory=/usr/lib/storm
autorestart=true
user=storm
[program:storm-ui]
command=storm ui
directory=/usr/lib/storm
autorestart=true
user=storm
然后我使用以下命令启动主管:supervisord -c/etc/supervisord.conf如果我尝试通过安巴里重新启动风暴,我会得到:
Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/stacks/HDP/2.1/services/STORM/package/scripts/drpc_server.py", line 58, in <module>
DrpcServer().execute()
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 122, in execute
method(env)
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 231, in restart
self.stop(env)
File "/var/lib/ambari-agent/cache/stacks/HDP/2.1/services/STORM/package/scripts/drpc_server.py", line 50, in stop
service("drpc", action="stop")
File "/var/lib/ambari-agent/cache/stacks/HDP/2.1/services/STORM/package/scripts/service.py", line 75, in service
Execute(format("kill {pid}"),
NameError: global name 'Execute' is not defined
如果我在风暴关闭时安装管理引擎,也会发生类似的事情。它无法重新启动。我在想你可以让看门狗(主管(或安巴里照顾风暴,但不能两者兼而有之?这是对的吗?如果是这样,为什么 hortonworks 教程告诉您安装主管?
如果有人能帮助解释整个过程,我将不胜感激。
很抱歉迟到了将近 3 年才来参加聚会,我不知道答案与 HDP 2.2 有多相关。 但是,在HDP 2.4及更高版本上,要使其正常工作,您必须告诉Ambari,Storm组件是通过更改启动脚本来监视的。 有关详细信息,请参阅 https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.1/bk_storm-component-guide/content/config-storm-supv.html