Support Questions

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

File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py", line 141, in ambari_db_rca_password = config['hostLevelParams']['ambari_db_rca_password'][0] TypeError: 'int' object is unsubscriptable

avatar
Contributor

When i install HDP-2.4 use ambari, i have an error

stderr: 
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py", line 39, in <module>
    BeforeStartHook().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 219, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py", line 28, in hook
    import params
  File "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py", line 141, in <module>
    ambari_db_rca_password = config['hostLevelParams']['ambari_db_rca_password'][0]
TypeError: 'int' object is unsubscriptable
 stdout:
2016-06-06 11:33:24,993 - The hadoop conf dir /usr/hdp/current/hadoop-client/conf exists, will call conf-select on it for version 2.4.0.0-169
2016-06-06 11:33:24,993 - Checking if need to create versioned conf dir /etc/hadoop/2.4.0.0-169/0
2016-06-06 11:33:24,993 - call['conf-select create-conf-dir --package hadoop --stack-version 2.4.0.0-169 --conf-version 0'] {'logoutput': False, 'sudo': True, 'quiet': False, 'stderr': -1}
2016-06-06 11:33:25,011 - call returned (1, '/etc/hadoop/2.4.0.0-169/0 exist already', '')
2016-06-06 11:33:25,011 - checked_call['conf-select set-conf-dir --package hadoop --stack-version 2.4.0.0-169 --conf-version 0'] {'logoutput': False, 'sudo': True, 'quiet': False}
2016-06-06 11:33:25,029 - checked_call returned (0, '/usr/hdp/2.4.0.0-169/hadoop/conf -> /etc/hadoop/2.4.0.0-169/0')
2016-06-06 11:33:25,029 - Ensuring that hadoop has the correct symlink structure
2016-06-06 11:33:25,029 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf

i don't know why,some body can help me?

1 ACCEPTED SOLUTION

avatar

For this command, find the correct /var/lib/ambari-agent/data/command-*.json file and find the section, e.g.,

"hostLevelParams": {
  ...,
  "ambari_db_rca_password": "mapred"
}

This was introduced by AMBARI-4149, which tries to access the element at index 0, however, it's a string instead of a list. This is controlled by the "server.jdbc.rca.user.passwd" property in the /etc/ambari-server/conf/ambari.properties file.

You should file a Jira on Apache since this is a bug.

View solution in original post

1 REPLY 1

avatar

For this command, find the correct /var/lib/ambari-agent/data/command-*.json file and find the section, e.g.,

"hostLevelParams": {
  ...,
  "ambari_db_rca_password": "mapred"
}

This was introduced by AMBARI-4149, which tries to access the element at index 0, however, it's a string instead of a list. This is controlled by the "server.jdbc.rca.user.passwd" property in the /etc/ambari-server/conf/ambari.properties file.

You should file a Jira on Apache since this is a bug.