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

Activity Explorer Installation failed (Ambari 2.5/ HDP 2.6 )

Explorer
I am getting Installation failure (HDP 2.6/ Ambari 2.5 ) for Activity Explorer.
Retrying doesn't help.

Log :

Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.1/services/SMARTSENSE/package/scripts/activity_explorer.py", line 13, in <module>
    Activity('explorer').execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 314, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.1/services/SMARTSENSE/package/scripts/activity.py", line 54, in install
    self.deploy_component_specific_config(env)
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.1/services/SMARTSENSE/package/scripts/activity.py", line 219, in deploy_component_specific_config
    self.configure_activity_explorer(env)
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.1/services/SMARTSENSE/package/scripts/activity.py", line 332, in configure_activity_explorer
    self.deploy_ini_config(params.activity_conf_dir + "/shiro.ini", shiro_configs)
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.1/services/SMARTSENSE/package/scripts/activity.py", line 386, in deploy_ini_config
    if (str(v).lower() == "null") and config.has_option(key[0], key[1]):
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-5: ordinal not in range(128)
3 REPLIES 3

Contributor

Do you have any special characters (probably in explorer password) ? You may want to give it a try without them.

Explorer

Nope. No special characters.

New Contributor

We got similar issue and I'd like to share how we were troubleshooting this. Hope it could be helpful for somebody.

The root cause in our case was pretty trivial, we used password in local language. Those characters were unreadable by Python. Below you can find steps that helped us to understand the problem:
1. Add logging to activity.py file

# add "print v.encode('utf-8')" to line 386 of /var/lib/ambari-agent/cache/stacks/HDP/2.1/services/SMARTSENSE/package/scripts/activity.py file<br>

39829-screenshot-20171016184143-809x117.png

2. Remove corresponding pyc file to let Python catch up the changes

sudo rm /var/lib/ambari-agent/cache/stacks/HDP/2.1/services/SMARTSENSE/package/scripts/activity.pyc

3. Retry installation process, in logs you should see the string which causes the problem

4. Rollback custom changes in the script and remove pyc file

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.