Support Questions

Find answers, ask questions, and share your expertise

HDP Upgrade failed 2.5 to 2.6

stderr: 
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/stack-hooks/before-ANY/scripts/hook.py", line 35, in <module>
    BeforeAnyHook().execute()
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 353, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/stack-hooks/before-ANY/scripts/hook.py", line 29, in hook
    setup_users()
  File "/var/lib/ambari-agent/cache/stack-hooks/before-ANY/scripts/shared_initialization.py", line 50, in setup_users
    groups = params.user_to_groups_dict[user],
KeyError: u'solr'
Error: Error: Unable to run the custom hook script ['/usr/bin/python', '/var/lib/ambari-agent/cache/stack-hooks/before-ANY/scripts/hook.py', 'ANY', '/var/lib/ambari-agent/data/command-21877.json', '/var/lib/ambari-agent/cache/stack-hooks/before-ANY', '/var/lib/ambari-agent/data/structured-out-21877.json', 'INFO', '/var/lib/ambari-agent/tmp', 'PROTOCOL_TLSv1_2', '']Error: Error: Unable to run the custom hook script ['/usr/bin/python', '/var/lib/ambari-agent/cache/stack-hooks/before-START/scripts/hook.py', 'START', '/var/lib/ambari-agent/data/command-21877.json', '/var/lib/ambari-agent/cache/stack-hooks/before-START', '/var/lib/ambari-agent/data/structured-out-21877.json', 'INFO', '/var/lib/ambari-agent/tmp', 'PROTOCOL_TLSv1_2', '']
 stdout:
2018-08-07 11:10:11,384 - Stack Feature Version Info: Cluster Stack=2.5, Command Stack=None, Command Version=2.5.6.0 -> 2.5.6.0
2018-08-07 11:10:11,401 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf
2018-08-07 11:10:11,589 - Stack Feature Version Info: Cluster Stack=2.5, Command Stack=None, Command Version=2.5.6.0 -> 2.5.6.0
2018-08-07 11:10:11,593 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf
2018-08-07 11:10:11,595 - Group['livy'] {}
2018-08-07 11:10:11,596 - Group['spark'] {}
2018-08-07 11:10:11,596 - Group['solr'] {}
2018-08-07 11:10:11,596 - Group['ranger'] {}
2018-08-07 11:10:11,596 - Group['hdfs'] {}
2018-08-07 11:10:11,597 - Group['zeppelin'] {}
2018-08-07 11:10:11,597 - Group['hadoop'] {}
2018-08-07 11:10:11,597 - Group['users'] {}
2018-08-07 11:10:11,597 - Group['knox'] {}
2018-08-07 11:10:11,598 - User['hive'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}
2018-08-07 11:10:11,599 - User['infra-solr'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}
2018-08-07 11:10:11,600 - User['atlas'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}
2018-08-07 11:10:11,601 - User['ams'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}
2018-08-07 11:10:11,602 - User['falcon'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}
2018-08-07 11:10:11,603 - User['ranger'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['ranger', 'hadoop'], 'uid': None}
2018-08-07 11:10:11,604 - User['accumulo'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}
2018-08-07 11:10:11,605 - User['spark'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['spark', 'hadoop'], 'uid': None}
Error: Error: Unable to run the custom hook script ['/usr/bin/python', '/var/lib/ambari-agent/cache/stack-hooks/before-ANY/scripts/hook.py', 'ANY', '/var/lib/ambari-agent/data/command-21877.json', '/var/lib/ambari-agent/cache/stack-hooks/before-ANY', '/var/lib/ambari-agent/data/structured-out-21877.json', 'INFO', '/var/lib/ambari-agent/tmp', 'PROTOCOL_TLSv1_2', '']
Error: Error: Unable to run the custom hook script ['/usr/bin/python', '/var/lib/ambari-agent/cache/stack-hooks/before-START/scripts/hook.py', 'START', '/var/lib/ambari-agent/data/command-21877.json', '/var/lib/ambari-agent/cache/stack-hooks/before-START', '/var/lib/ambari-agent/data/structured-out-21877.json', 'INFO', '/var/lib/ambari-agent/tmp', 'PROTOCOL_TLSv1_2', '']
Command failed after 1 tries
3 REPLIES 3

@Sam Red

Can you add above error message in code block - it is not clear what the error is

@amarnath reddy pappuUpdated now to html page. Can you please take a look

Contributor

I got this exact issue upgrading from ambari 2.6 to ambari 2.7.

The critical error seems to be caused by:

    in setup_users    groups =params.user_to_groups_dict[user],KeyError: u'solr'

    I had to reverse the upgrade, since when this is happening I cannot use ambari to start ANY services.

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