Ambari为集群新增扩容过程中,有一个节点安装多个client报错
Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/hook.py", line 37, in <module>
AfterInstallHook().execute()
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 219, in execute
method(env)
File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/hook.py", line 31, in hook
setup_hdp_symlinks()
File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py", line 49, in setup_hdp_symlinks
hdp_select.select_all(version)
File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/hdp_select.py", line 122, in select_all
Execute(command, only_if = only_if_command)
File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 154, in __init__
self.env.run()
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run
self.run_action(resource, action)
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action
provider_action()
File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 238, in action_run
tries=self.resource.tries, try_sleep=self.resource.try_sleep)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 70, in inner
result = function(command, **kwargs)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 92, in checked_call
tries=tries, try_sleep=try_sleep)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 140, in _call_wrapper
result = _call(command, **kwargs_copy)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 291, in _call
raise Fail(err_msg)
resource_management.core.exceptions.Fail: Execution of 'ambari-sudo.sh /usr/bin/hdp-select set all `ambari-python-wrap /usr/bin/hdp-select versions | grep ^2.3.4.7-4 | tail -1`' returned 1. Traceback (most recent call last):
File "/usr/bin/hdp-select", line 374, in <module>
setPackages(pkgs, args[2], options.rpm_mode)
File "/usr/bin/hdp-select", line 273, in setPackages
os.symlink(target + "/" + dir, linkname)
OSError: [Errno 17] File exists
经查发现
/usr/hdp 下有两个目录 2.3.4.7 和 current,其中current下都是2.3.4.7下对应Jar包或文件的软连接,而我在安装clients过程中遇到缺少client报错直接将文件拷贝到了 current下,导致从2.3.4.7目录建立软连接是current目录下已经存在,解决方法,删除相应的目录,重建软连接。
期间还多次报错permission denied 无法创建Log文件,pid文件,手动创建并修改权限后问题解决。