Created on 06-24-2016 07:45 AM - edited 09-16-2022 03:27 AM
I created a local repo, and i also updated the version/stack to make my ambari connect to my local repo, but when i try to add a new host and deploy on it, the installation always got failed.
Here is the output from ambari:
stderr: /var/lib/ambari-agent/data/errors-884.txtTraceback (most recent call last): File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py", line 35, in <module> BeforeAnyHook().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/before-ANY/scripts/hook.py", line 26, in hook import params File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py", line 187, in <module> hadoop_conf_dir = conf_select.get_hadoop_conf_dir(force_latest_on_upgrade=True) File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/conf_select.py", line 374, in get_hadoop_conf_dir select(stack_name, "hadoop", version) File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/conf_select.py", line 252, in select shell.checked_call(get_cmd("set-conf-dir", package, version), logoutput=False, quiet=False, sudo=True) 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 'conf-select set-conf-dir --package hadoop --stack-version 2.4.2.0-258 --conf-version 0' returned 1. 2.4.2.0-258 Incorrect stack version Error: Error: Unable to run the custom hook script ['/usr/bin/python', '/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py', 'ANY', '/var/lib/ambari-agent/data/command-884.json', '/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY', '/var/lib/ambari-agent/data/structured-out-884.json', 'INFO', '/var/lib/ambari-agent/tmp']stdout: /var/lib/ambari-agent/data/output-884.txt
2016-06-24 15:38:55,956 - The hadoop conf dir /usr/hdp/current/hadoop-client/conf exists, will call conf-select on it for version 2.4.2.0-258 2016-06-24 15:38:55,956 - Checking if need to create versioned conf dir /etc/hadoop/2.4.2.0-258/0 2016-06-24 15:38:55,956 - call['conf-select create-conf-dir --package hadoop --stack-version 2.4.2.0-258 --conf-version 0'] {'logoutput': False, 'sudo': True, 'quiet': False, 'stderr': -1} 2016-06-24 15:38:55,988 - call returned (1, '2.4.2.0-258 Incorrect stack version', '') 2016-06-24 15:38:55,988 - checked_call['conf-select set-conf-dir --package hadoop --stack-version 2.4.2.0-258 --conf-version 0'] {'logoutput': False, 'sudo': True, 'quiet': False} Error: Error: Unable to run the custom hook script ['/usr/bin/python', '/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py', 'ANY', '/var/lib/ambari-agent/data/command-884.json', '/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY', '/var/lib/ambari-agent/data/structured-out-884.json', 'INFO', '/var/lib/ambari-agent/tmp']
Created 06-24-2016 05:47 PM
Hi @Yibing Liu
When you created your local repo, did you follow the instructions at http://docs.hortonworks.com/HDPDocuments/Ambari-2.2.2.0/bk_Installing_HDP_AMB/content/_using_a_local... ?
I don't really understand your statement "i also updated the version/stack to make my ambari connect to my local repo". Adjusting the .repo baseurls should be all that is needed.
Is this a fresh install, or are you adding a new host to an existing cluster?
Just to eliminate another common source of error, what version of python to you have installed on the server, and is it in the PATH for the userid performing the install?
Created 06-24-2016 08:00 AM
I saw it show me it is incorrect stack version 2.4.2.0-258, but from my ambari page in the version/stack, it show the version is HDP-2.4.2.0-258..not sure why.
Created 06-24-2016 05:47 PM
Hi @Yibing Liu
When you created your local repo, did you follow the instructions at http://docs.hortonworks.com/HDPDocuments/Ambari-2.2.2.0/bk_Installing_HDP_AMB/content/_using_a_local... ?
I don't really understand your statement "i also updated the version/stack to make my ambari connect to my local repo". Adjusting the .repo baseurls should be all that is needed.
Is this a fresh install, or are you adding a new host to an existing cluster?
Just to eliminate another common source of error, what version of python to you have installed on the server, and is it in the PATH for the userid performing the install?
Created 06-26-2016 04:21 AM
Hi @Matt Foley:
Thanks very much for your response.
actually i have followed this article and both 3 points were yes for me.
since i am not a fresh installation, after i checked my cluster again i found that the version is different between my master and the new host, not sure why it happened, i just upgraded my Ambari-server and ambari-agent, and re-deployed to the new host server, it works.
Thanks very much.