<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Ambari cluster deploy in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-cluster-deploy/m-p/190996#M78246</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/46197/marcelosaied.html" nodeid="46197"&gt;@Marcelo Natalio Saied&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The problem seems to be because of the following error (other errors seems it's side effect)&lt;/P&gt;&lt;PRE&gt;resource_management.core.exceptions.ExecutionFailed: Execution of 'usermod -G hdfs -g hadoop hdfs' returned 6. usermod: user 'hdfs' does not exist in /etc/passwd&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Cause:&lt;/STRONG&gt; The above error indicates that you might be running the Ambari Agent as "Non Root" user and the privileges are not setup correctly for this user. As this user does not have some privileges like creating/modifying user "hdfs" thats why it is failing to run the "usermod" / "useradd" command.&lt;BR /&gt;&lt;BR /&gt;So please check the following:&lt;/P&gt;&lt;P&gt;1. Are you running ambari agent as Non Root user?&lt;/P&gt;&lt;PRE&gt;# grep 'run_as_user' /etc/ambari-agent/conf/ambari-agent.ini&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;2. If running ambari agent as non root uset then please make sure that you have customized the "/etc/sudoers" file as described in &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_security/content/_sudoer_configuration.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_security/content/_sudoer_configuration.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;3. Have you configured the "su" commands and corresponding Hadoop service accounts as mentioned in &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_security/content/_customizable_users.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_security/content/_customizable_users.html&lt;/A&gt;  And the Sudoer's default :  &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_security/content/_sudo_defaults.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_security/content/_sudo_defaults.html&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;# Ambari Customizable Users
ambari ALL=(ALL) NOPASSWD:SETENV: /bin/su hdfs *,/bin/su ambari-qa *,/bin/su ranger *,/bin/su zookeeper *,/bin/su knox *,/bin/su falcon *,/bin/su ams *, /bin/su flume *,/bin/su hbase *,/bin/su spark *,/bin/su accumulo *,/bin/su hive *,/bin/su hcat *,/bin/su kafka *,/bin/su mapred *,/bin/su oozie *,/bin/su sqoop *,/bin/su storm *,/bin/su tez *,/bin/su atlas *,/bin/su yarn *,/bin/su kms *,/bin/su activity_analyzer *,/bin/su livy *,/bin/su zeppelin *,/bin/su infra-solr *,/bin/su logsearch *&amp;lt;br&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;4. The &lt;STRONG&gt;Most important thing is the following Doc &lt;/STRONG&gt;which shows what all commands agent needs access: &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_security/content/_commands.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_security/content/_commands.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
    <pubDate>Tue, 15 May 2018 04:51:41 GMT</pubDate>
    <dc:creator>jsensharma</dc:creator>
    <dc:date>2018-05-15T04:51:41Z</dc:date>
    <item>
      <title>Ambari cluster deploy</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-cluster-deploy/m-p/190995#M78245</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;Im deploying hdp 2..6.1 in rhel 7&lt;/P&gt;&lt;P&gt;i have installed ambari. and when deploying the cluster, i get the following error , at the first step of the deploy&lt;/P&gt;&lt;P&gt;----&lt;/P&gt;&lt;P&gt;Traceback
(most recent call last):&lt;/P&gt;&lt;P&gt;File
"/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py",
line 35, in &amp;lt;module&amp;gt;&lt;/P&gt;&lt;P&gt;BeforeAnyHook().execute()&lt;/P&gt;&lt;P&gt;File
"/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
line 375, in execute&lt;/P&gt;&lt;P&gt;method(env)&lt;/P&gt;&lt;P&gt;File
"/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py",
line 29, in hook&lt;/P&gt;&lt;P&gt;setup_users()&lt;/P&gt;&lt;P&gt;File
"/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py",
line 51, in setup_users&lt;/P&gt;&lt;P&gt;fetch_nonlocal_groups =
params.fetch_nonlocal_groups,&lt;/P&gt;&lt;P&gt;File "/usr/lib/python2.6/site-packages/resource_management/core/base.py",
line 166, in __init__&lt;/P&gt;&lt;P&gt;self.env.run()&lt;/P&gt;&lt;P&gt;File
"/usr/lib/python2.6/site-packages/resource_management/core/environment.py",
line 160, in run&lt;/P&gt;&lt;P&gt;self.run_action(resource, action)&lt;/P&gt;&lt;P&gt;File
"/usr/lib/python2.6/site-packages/resource_management/core/environment.py",
line 124, in run_action&lt;/P&gt;&lt;P&gt;provider_action()&lt;/P&gt;&lt;P&gt;File
"/usr/lib/python2.6/site-packages/resource_management/core/providers/accounts.py",
line 84, in action_create&lt;/P&gt;&lt;P&gt;shell.checked_call(command, sudo=True)&lt;/P&gt;&lt;P&gt;File
"/usr/lib/python2.6/site-packages/resource_management/core/shell.py",
line 72, in inner&lt;/P&gt;&lt;P&gt;result = function(command, **kwargs)&lt;/P&gt;&lt;P&gt;File
"/usr/lib/python2.6/site-packages/resource_management/core/shell.py",
line 102, in checked_call&lt;/P&gt;&lt;P&gt;tries=tries, try_sleep=try_sleep,
timeout_kill_strategy=timeout_kill_strategy)&lt;/P&gt;&lt;P&gt;File
"/usr/lib/python2.6/site-packages/resource_management/core/shell.py",
line 150, in _call_wrapper&lt;/P&gt;&lt;P&gt;result = _call(command, **kwargs_copy)&lt;/P&gt;&lt;P&gt;File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py",
line 303, in _call&lt;/P&gt;&lt;P&gt;raise ExecutionFailed(err_msg, code, out,
err)&lt;/P&gt;&lt;P&gt;resource_management.core.exceptions.ExecutionFailed:
Execution of 'usermod -G hdfs -g hadoop hdfs' returned 6. usermod: user 'hdfs'
does not exist in /etc/passwd&lt;/P&gt;&lt;P&gt;Error:
Error: Unable to run the custom hook script ['/usr/bin/python',
'/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py',
'ANY', '/var/lib/ambari-agent/data/command-3626.json', '/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY',
'/var/lib/ambari-agent/data/structured-out-3626.json', 'INFO',
'/var/lib/ambari-agent/tmp', 'PROTOCOL_TLSv1', '']Traceback (most recent call
last):&lt;/P&gt;&lt;P&gt;File
"/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/hook.py",
line 37, in &amp;lt;module&amp;gt;&lt;/P&gt;&lt;P&gt;BeforeInstallHook().execute()&lt;/P&gt;&lt;P&gt;File
"/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
line 382, in execute&lt;/P&gt;&lt;P&gt;self.save_component_version_to_structured_out(self.command_name)&lt;/P&gt;&lt;P&gt;File
"/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
line 244, in save_component_version_to_structured_out&lt;/P&gt;&lt;P&gt;stack_select_package_name =
stack_select.get_package_name()&lt;/P&gt;&lt;P&gt;File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/stack_select.py",
line 110, in get_package_name&lt;/P&gt;&lt;P&gt;package =
get_packages(PACKAGE_SCOPE_STACK_SELECT, service_name, component_name)&lt;/P&gt;&lt;P&gt;File
"/usr/lib/python2.6/site-packages/resource_management/libraries/functions/stack_select.py",
line 224, in get_packages&lt;/P&gt;&lt;P&gt;supported_packages =
get_supported_packages()&lt;/P&gt;&lt;P&gt;File
"/usr/lib/python2.6/site-packages/resource_management/libraries/functions/stack_select.py",
line 148, in get_supported_packages&lt;/P&gt;&lt;P&gt;raise Fail("Unable to query for
supported packages using {0}".format(stack_selector_path))&lt;/P&gt;&lt;P&gt;resource_management.core.exceptions.Fail:
Unable to query for supported packages using /usr/bin/hdp-select&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;stdout:   /var/lib/ambari-agent/data/output-3626.txt &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2018-05-14
14:54:16,835 - Stack Feature Version Info: Cluster Stack=2.6, Command
Stack=None, Command Version=None -&amp;gt; 2.6&lt;/P&gt;&lt;P&gt;2018-05-14
14:54:16,841 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf&lt;/P&gt;&lt;P&gt;2018-05-14
14:54:16,843 - Group['livy'] {}&lt;/P&gt;&lt;P&gt;2018-05-14
14:54:16,844 - Group['spark'] {}&lt;/P&gt;&lt;P&gt;2018-05-14
14:54:16,844 - Group['hdfs'] {}&lt;/P&gt;&lt;P&gt;2018-05-14
14:54:16,844 - Group['hadoop'] {}&lt;/P&gt;&lt;P&gt;2018-05-14
14:54:16,844 - Group['users'] {}&lt;/P&gt;&lt;P&gt;2018-05-14
14:54:16,845 - User['hive'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True,
'groups': [u'hadoop'], 'uid': None}&lt;/P&gt;&lt;P&gt;2018-05-14
14:54:16,853 - User['zookeeper'] {'gid': 'hadoop', 'fetch_nonlocal_groups':
True, 'groups': [u'hadoop'], 'uid': None}&lt;/P&gt;&lt;P&gt;2018-05-14
14:54:16,860 - User['oozie'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups':
[u'users'], 'uid': None}&lt;/P&gt;&lt;P&gt;2018-05-14
14:54:16,866 - User['ams'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True,
'groups': [u'hadoop'], 'uid': None}&lt;/P&gt;&lt;P&gt;2018-05-14
14:54:16,872 - User['tez'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True,
'groups': [u'users'], 'uid': None}&lt;/P&gt;&lt;P&gt;2018-05-14
14:54:16,879 - User['livy'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True,
'groups': [u'hadoop'], 'uid': None}&lt;/P&gt;&lt;P&gt;2018-05-14
14:54:16,885 - User['spark'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True,
'groups': [u'hadoop'], 'uid': None}&lt;/P&gt;&lt;P&gt;2018-05-14
14:54:16,891 - User['ambari-qa'] {'gid': 'hadoop', 'fetch_nonlocal_groups':
True, 'groups': [u'users'], 'uid': None}&lt;/P&gt;&lt;P&gt;2018-05-14
14:54:16,898 - User['hdfs'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True,
'groups': ['hdfs'], 'uid': None}&lt;/P&gt;&lt;P&gt;2018-05-14
14:54:16,904 - Modifying user hdfs&lt;/P&gt;&lt;P&gt;Error:
Error: Unable to run the custom hook script ['/usr/bin/python',
'/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py',
'ANY', '/var/lib/ambari-agent/data/command-3626.json',
'/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY',
'/var/lib/ambari-agent/data/structured-out-3626.json', 'INFO',
'/var/lib/ambari-agent/tmp', 'PROTOCOL_TLSv1', '']&lt;/P&gt;&lt;P&gt;Command
failed after 1 &lt;/P&gt;&lt;P&gt;---------------------------------------------&lt;/P&gt;&lt;P&gt;all the users exist but not the hdfs user.&lt;/P&gt;&lt;P&gt;eny ideas?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 02:28:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-cluster-deploy/m-p/190995#M78245</guid>
      <dc:creator>MarceloSaiedOK</dc:creator>
      <dc:date>2018-05-15T02:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari cluster deploy</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-cluster-deploy/m-p/190996#M78246</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/46197/marcelosaied.html" nodeid="46197"&gt;@Marcelo Natalio Saied&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The problem seems to be because of the following error (other errors seems it's side effect)&lt;/P&gt;&lt;PRE&gt;resource_management.core.exceptions.ExecutionFailed: Execution of 'usermod -G hdfs -g hadoop hdfs' returned 6. usermod: user 'hdfs' does not exist in /etc/passwd&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Cause:&lt;/STRONG&gt; The above error indicates that you might be running the Ambari Agent as "Non Root" user and the privileges are not setup correctly for this user. As this user does not have some privileges like creating/modifying user "hdfs" thats why it is failing to run the "usermod" / "useradd" command.&lt;BR /&gt;&lt;BR /&gt;So please check the following:&lt;/P&gt;&lt;P&gt;1. Are you running ambari agent as Non Root user?&lt;/P&gt;&lt;PRE&gt;# grep 'run_as_user' /etc/ambari-agent/conf/ambari-agent.ini&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;2. If running ambari agent as non root uset then please make sure that you have customized the "/etc/sudoers" file as described in &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_security/content/_sudoer_configuration.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_security/content/_sudoer_configuration.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;3. Have you configured the "su" commands and corresponding Hadoop service accounts as mentioned in &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_security/content/_customizable_users.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_security/content/_customizable_users.html&lt;/A&gt;  And the Sudoer's default :  &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_security/content/_sudo_defaults.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_security/content/_sudo_defaults.html&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;# Ambari Customizable Users
ambari ALL=(ALL) NOPASSWD:SETENV: /bin/su hdfs *,/bin/su ambari-qa *,/bin/su ranger *,/bin/su zookeeper *,/bin/su knox *,/bin/su falcon *,/bin/su ams *, /bin/su flume *,/bin/su hbase *,/bin/su spark *,/bin/su accumulo *,/bin/su hive *,/bin/su hcat *,/bin/su kafka *,/bin/su mapred *,/bin/su oozie *,/bin/su sqoop *,/bin/su storm *,/bin/su tez *,/bin/su atlas *,/bin/su yarn *,/bin/su kms *,/bin/su activity_analyzer *,/bin/su livy *,/bin/su zeppelin *,/bin/su infra-solr *,/bin/su logsearch *&amp;lt;br&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;4. The &lt;STRONG&gt;Most important thing is the following Doc &lt;/STRONG&gt;which shows what all commands agent needs access: &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_security/content/_commands.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_security/content/_commands.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 04:51:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-cluster-deploy/m-p/190996#M78246</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-05-15T04:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari cluster deploy</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-cluster-deploy/m-p/326138#M78247</link>
      <description>&lt;P&gt;I was facing the similar error and got it resolved by&amp;nbsp;added Hadoop users to passwd file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;resource_management.core.exceptions.ExecutionFailed: Execution of 'usermod -G hadoop -g hadoop hive' returned 6. usermod: user 'hive' does not exist in /etc/passwd
Error: Error: Unable to run the custom hook script ['/usr/bin/python', '/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py', 'ANY', '/var/lib/ambari-agent/data/command-59009.json', '/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY', '/var/lib/ambari-agent/data/structured-out-59009.json', 'INFO', '/var/lib/ambari-agent/tmp', 'PROTOCOL_TLSv1_2', '']&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;gt;&amp;gt; File location /etc/passwd&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; Adduser hadoop&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Oct 2021 08:13:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Ambari-cluster-deploy/m-p/326138#M78247</guid>
      <dc:creator>Kartik_Agarwal</dc:creator>
      <dc:date>2021-10-03T08:13:17Z</dc:date>
    </item>
  </channel>
</rss>

