Support Questions
Find answers, ask questions, and share your expertise

Getting exception while installing HDFS client through Ambari

Getting exception while installing HDFS client through Ambari

Super Collaborator

I am installing Hadoop 2.7.3.2.6.1.0-129 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/2.1.0.2.0/package/scripts/hdfs_client.py", line 78, in <module>
    HdfsClient().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 329, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_client.py", line 38, in install
    self.install_packages(env)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 693, in install_packages
    retry_count=agent_stack_retry_count)
  File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 155, 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/package/__init__.py", 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/apt.py", line 53, in wrapper
    return function_to_decorate(self, name, *args[2:])
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/apt.py", 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/__init__.py", 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/__init__.py", 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/__init__.py", 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/__init__.py", line 134, in _update_repo_metadata_after_bad_try
    Logger.info("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)
1 REPLY 1
Highlighted

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.

Example:

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?