Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Getting exception while installing HDFS client through Ambari


Getting exception while installing HDFS client through Ambari

Super Collaborator

I am installing Hadoop on my Amazon EC2 instances of Ubuntu 16.04.2 LTS. This is a fresh install, getting the following exception while installing HDFS client. This is stderr message

Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/HDFS/", line 78, in <module>
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/", line 329, in execute
  File "/var/lib/ambari-agent/cache/common-services/HDFS/", line 38, in install
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/", line 693, in install_packages
  File "/usr/lib/python2.6/site-packages/resource_management/core/", line 155, in __init__
  File "/usr/lib/python2.6/site-packages/resource_management/core/", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/", line 124, in run_action
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/", line 54, in action_install
    self.install_package(package_name, self.resource.use_repos, self.resource.skip_repos)
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/", line 53, in wrapper
    return function_to_decorate(self, name, *args[2:])
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/", line 81, in install_package
    self.checked_call_with_retries(cmd, sudo=True, env=INSTALL_CMD_ENV, logoutput=self.get_logoutput())
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/", line 86, in checked_call_with_retries
    return self._call_with_retries(cmd, is_checked=True, **kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/", line 100, in _call_with_retries
    should_stop_retries = self._handle_retries(cmd, ex.code, ex.out, is_first_time, is_last_time)
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/", line 115, in _handle_retries
    self._update_repo_metadata_after_bad_try(cmd, code, out)
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/", line 134, in _update_repo_metadata_after_bad_try"Execution of '%s' returned %d. %s" % (shell.string_cmd_from_args_list(cmd), code, out))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 2600: ordinal not in range(128)

Re: Getting exception while installing HDFS client through Ambari

Super Mentor

@Mushtaq Rizvi

Can you try clearing the ambari agent cache on the host where HDFS client installation is not working then restart the agent and try again.


cd /var/lib/ambari-agent/cache  
rm -r  *


Or to be safe just take a backup of the "cache" directory instead of deleting it then restart ambari agent.

ambari-agent restart


Don't have an account?
Coming from Hortonworks? Activate your account here