Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Error with Amabari Install at conf-select.py. It is expecting an int but receiving 'html'. Possible symlink issue.

avatar

Failure in Ambari Install. Note that /usr/hdp is a symlink to another location (/p01/app/had). Will that symlink break things?

Ambari cluster service deployment is failing.

As an Example, the traceback from RegionServer install is:

Traceback (most recent call last): 
<br>File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py", line 35, in <module> 
BeforeAnyHook().execute() 
<br>File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 219, in execute 
method(env) 
<br>File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py", line 26, in hook 
import params 
<br>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.3.0.0-2557 --conf-version 0' returned 1. Traceback (most recent call last): 
File "/usr/bin/conf-select", line 182, in <module> 


setConfDir(options.pname, options.sver, options.cver) 

File "/usr/bin/conf-select", line 138, in setConfDir 
check(sver, pname, cver, "set") 

File "/usr/bin/conf-select", line 100, in check 
chksVer(sver) 

File "/usr/bin/conf-select", line 78, in chksVer 
result[tuple(map(int, versionRegex.split(f)))] = f 


ValueError: invalid literal for int() with base 10: 'html' 


Error: Error: Unable to run the custom hook script ['/usr/bin/python2', '/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py', 'ANY', '/var/lib/ambari-agent/data/command-1718.json', '/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY', '/var/lib/ambari-agent/data/structured-out-1718.json', 'INFO', '/var/lib/ambari-agent/tm

Note that on this host, /usr/hdp is a symlink to another location (/p01/app/had). Will that symlink break things in this case?

1 ACCEPTED SOLUTION

avatar

From researching on HCC I found out that

  1. Ambari may not handle custom symlinks. So when you installed it via Ambari, if you created different symlinks I think things would break. See this article on the Hortonworks Community Site: https://community.hortonworks.com/questions/8776/customized-hdp-installation.html

  2. Someone mentioned that perhaps it is a permission issue on the symlink, based on the rwx settings on the symlink which could cause it to fail to execute. Related to umask issue.
  3. Umask is very important. Have it at 0022 during install at setup. When it is done change it to 0027. See https://community.hortonworks.com/questions/8614/zookeeper-service-fails-to-start.html

  4. Maybe we can add something to the hdp-select script for custom symlinks to work. This is the script that manages the symlinks. Maybe I can add "html" to a list of options somewhere in conf_select.py: Inspired from https://community.hortonworks.com/questions/5811/install-of-hdp-fails-with-valueerror-invalid-liter....

  5. Maybe it’s a case where we need to clear the repos, and folders from an old or failed install: https://community.hortonworks.com/questions/1848/python-errors-or-script-does-not-exist-while-insta....

I am still interested in thoughts or if anyone has done this successfully, having custom symlinks since Ops folks don't like using /usr mount

View solution in original post

3 REPLIES 3

avatar

From researching on HCC I found out that

  1. Ambari may not handle custom symlinks. So when you installed it via Ambari, if you created different symlinks I think things would break. See this article on the Hortonworks Community Site: https://community.hortonworks.com/questions/8776/customized-hdp-installation.html

  2. Someone mentioned that perhaps it is a permission issue on the symlink, based on the rwx settings on the symlink which could cause it to fail to execute. Related to umask issue.
  3. Umask is very important. Have it at 0022 during install at setup. When it is done change it to 0027. See https://community.hortonworks.com/questions/8614/zookeeper-service-fails-to-start.html

  4. Maybe we can add something to the hdp-select script for custom symlinks to work. This is the script that manages the symlinks. Maybe I can add "html" to a list of options somewhere in conf_select.py: Inspired from https://community.hortonworks.com/questions/5811/install-of-hdp-fails-with-valueerror-invalid-liter....

  5. Maybe it’s a case where we need to clear the repos, and folders from an old or failed install: https://community.hortonworks.com/questions/1848/python-errors-or-script-does-not-exist-while-insta....

I am still interested in thoughts or if anyone has done this successfully, having custom symlinks since Ops folks don't like using /usr mount

avatar
Master Mentor

@Ancil McBarnett it's a long shot but I had issues with directories mounted with noexec. Check the mount options in /etc/fstab.

avatar

Instead of using a symlink, could you try doing a mount bind as it won't impact the folder permissions. For eg,

mount -o bind /p01/app/had /usr/hdp

If it works, you will need to add it to /etc/fstab