Support Questions

Find answers, ask questions, and share your expertise

Activity Explorer Installation failed (Ambari 2.5/ HDP 2.6 )

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/", line 13, in <module>
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/", line 314, in execute
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.1/services/SMARTSENSE/package/scripts/", line 54, in install
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.1/services/SMARTSENSE/package/scripts/", line 219, in deploy_component_specific_config
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.1/services/SMARTSENSE/package/scripts/", 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/", 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)


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


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 file

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


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.