HDP的ambari集成安装工具真的是比ClouderaManager差上那么一点儿,不说安装的时候就麻烦,即使软件安装包已成功安装,也不意味着可以正常使用了,启动HDP集群过程中还会有不少的错误!
一、启动服务时,出现若干循环符号链接错误,比如下面是启动ranger时发生的其中一个错误信息:
setup_tagsync(upgrade_type=upgrade_type)
File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/RANGER/package/scripts/setup_ranger_xml.py", line , in setup_tagsync
create_parents = True
File "/usr/lib/ambari-agent/lib/resource_management/core/base.py", line , in __init__
self.env.run()
File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line , in run
self.run_action(resource, action)
File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line , in run_action
provider_action()
File "/usr/lib/ambari-agent/lib/resource_management/core/providers/system.py", line , in action_create
raise Fail("Applying %s failed, looped symbolic links found while resolving %s" % (self.resource, path))
resource_management.core.exceptions.Fail: Applying Directory['/usr/hdp/current/ranger-tagsync/conf'] failed, looped symbolic links found while resolving /usr/hdp/current/ranger-tagsync/conf
解决办法,删掉错误的符号链接,建立正确的链接:
cd /usr/hdp/current/ranger-tagsync
unlink conf
ln -s /etc/ranger-tagsync/3.0.0.0-/ conf
二、权限错误: Permission denied,详见下面log信息
stderr: /var/lib/ambari-agent/data/errors-.txt Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/RANGER/package/scripts/ranger_admin.py", line , in <module>
RangerAdmin().execute()
File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line , in execute
method(env)
File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line , in restart
self.stop(env, upgrade_type=upgrade_type)
File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/RANGER/package/scripts/ranger_admin.py", line , in stop
Execute(format('{params.ranger_stop}'), environment={'JAVA_HOME': params.java_home}, user=params.unix_user)
File "/usr/lib/ambari-agent/lib/resource_management/core/base.py", line , in __init__
self.env.run()
File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line , in run
self.run_action(resource, action)
File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line , in run_action
provider_action()
File "/usr/lib/ambari-agent/lib/resource_management/core/providers/system.py", line , in action_run
returns=self.resource.returns)
File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line , in inner
result = function(command, **kwargs)
File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line , in checked_call
tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy, returns=returns)
File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line , in _call_wrapper
result = _call(command, **kwargs_copy)
File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line , in _call
raise ExecutionFailed(err_msg, code, out, err)
resource_management.core.exceptions.ExecutionFailed: Execution of '/usr/hdp/current/ranger-admin/ews/ranger-admin-services.sh stop' returned 126. -bash: /usr/hdp/current/ranger-admin/ews/ranger-admin-services.sh: Permission denied
解决办法,添加执行权限:
chmod a+x ranger-admin-services.sh