<?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: Add custom service via Ambari ERROR in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Add-custom-service-via-Ambari-ERROR/m-p/224841#M82470</link>
    <description>&lt;P&gt;	Hi &lt;A nodeid="81188" rel="user" href="#" data-hasqtip="0"&gt;@Henry Luo&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;	I see as per the code : &lt;A href="https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py" target="_blank"&gt;https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py&lt;/A&gt;&lt;/P&gt;&lt;P&gt;	You script is failing at "&lt;EM&gt;Creates users before cluster installation&lt;/EM&gt;&lt;STRONG&gt;"&lt;/STRONG&gt; step .&lt;/P&gt;&lt;P&gt;	I would suggest you &lt;STRONG&gt;skip creating group users&lt;/STRONG&gt; via the below REST API : You can refer to this document to perform it via rest API : &lt;A href="https://community.hortonworks.com/articles/63557/how-to-edit-the-cluster-envxml-entries-using-ambar.html" style="background-color: initial;"&gt;https://community.hortonworks.com/articles/63557/how-to-edit-the-cluster-envxml-entries-using-ambar.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;	or else can perform the same via :&lt;/P&gt;
&lt;PRE&gt;[root@asnaik1 scripts]# pwd /var/lib/ambari-server/resources/scripts
[root@asnaik1 scripts]# python configs.py -u admin -p admin -n asnaik -l asnaik1.openstacklocal -t 8080 -a get -c cluster-env |grep -i ignore_groupsusers_create
    "ignore_groupsusers_create": "false",
[root@asnaik1 scripts]# python configs.py -u admin -p admin -n asnaik -l asnaik1.openstacklocal -t 8080 -a set -c cluster-env -k  ignore_groupsusers_create -v true
2018-08-09 04:12:14,914 INFO ### Performing "set":
2018-08-09 04:12:14,914 INFO ### new property - "ignore_groupsusers_create":"true"
2018-08-09 04:12:14,940 INFO ### on (Site:cluster-env, Tag:version1527268503510)
2018-08-09 04:12:14,953 INFO ### PUTting json into: doSet_version1533787934953155.json
2018-08-09 04:12:15,059 INFO ### NEW Site:cluster-env, Tag:version1533787934953155
[root@asnaik1 scripts]# python configs.py -u admin -p admin -n asnaik -l asnaik1.openstacklocal -t 8080 -a get -c cluster-env |grep -i ignore_groupsusers_create
    "ignore_groupsusers_create": "true",
&lt;/PRE&gt;&lt;P&gt;	you can get the help from&lt;/P&gt;
&lt;PRE&gt;[root@asnaik1 scripts]# python configs.py --help
&lt;/PRE&gt;&lt;P&gt;and retry the operation. this time ambari wont be creating a elasticsearch user.&lt;/P&gt;&lt;P&gt;	Hope this helps.&lt;/P&gt;&lt;P style="color:green"&gt;	Please accept the answer if this helped you.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Aug 2018 17:26:18 GMT</pubDate>
    <dc:creator>akhilsnaik</dc:creator>
    <dc:date>2018-08-21T17:26:18Z</dc:date>
    <item>
      <title>Add custom service via Ambari ERROR</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Add-custom-service-via-Ambari-ERROR/m-p/224840#M82469</link>
      <description>&lt;P&gt;Hi all:&lt;/P&gt;&lt;P&gt;I got HDP3.0 installed with Ambari 2.7 on my test_cluster, and my old cluster has HDP2.6.1.0 running for several months.&lt;/P&gt;&lt;P&gt;I add a custom service 'ELASTICSEARCH' in my old cluster running very well , however when I copy config to /var/lib/ambari-server/resources/stacks/HDP/3.0/services/ELASTICSEARCH and restart ambari-server ,I cannot install ELASTICSEARCH with this ERROR:&lt;/P&gt;&lt;PRE&gt;Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/stack-hooks/before-ANY/scripts/hook.py", line 35, in &amp;lt;module&amp;gt;
    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'elasticsearch'
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-452.json', '/var/lib/ambari-agent/cache/stack-hooks/before-ANY', '/var/lib/ambari-agent/data/structured-out-452.json', 'INFO', '/var/lib/ambari-agent/tmp', 'PROTOCOL_TLSv1_2', '']&lt;/PRE&gt;&lt;P&gt;I thought it related to my user&amp;amp;group configuration ,but I have no templates and I have no idea how it works.&lt;/P&gt;&lt;P&gt;Any suggestions would be very thankful !!!&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 16:40:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Add-custom-service-via-Ambari-ERROR/m-p/224840#M82469</guid>
      <dc:creator>lsh1995</dc:creator>
      <dc:date>2018-08-21T16:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Add custom service via Ambari ERROR</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Add-custom-service-via-Ambari-ERROR/m-p/224841#M82470</link>
      <description>&lt;P&gt;	Hi &lt;A nodeid="81188" rel="user" href="#" data-hasqtip="0"&gt;@Henry Luo&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;	I see as per the code : &lt;A href="https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py" target="_blank"&gt;https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stack-hooks/before-ANY/scripts/shared_initialization.py&lt;/A&gt;&lt;/P&gt;&lt;P&gt;	You script is failing at "&lt;EM&gt;Creates users before cluster installation&lt;/EM&gt;&lt;STRONG&gt;"&lt;/STRONG&gt; step .&lt;/P&gt;&lt;P&gt;	I would suggest you &lt;STRONG&gt;skip creating group users&lt;/STRONG&gt; via the below REST API : You can refer to this document to perform it via rest API : &lt;A href="https://community.hortonworks.com/articles/63557/how-to-edit-the-cluster-envxml-entries-using-ambar.html" style="background-color: initial;"&gt;https://community.hortonworks.com/articles/63557/how-to-edit-the-cluster-envxml-entries-using-ambar.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;	or else can perform the same via :&lt;/P&gt;
&lt;PRE&gt;[root@asnaik1 scripts]# pwd /var/lib/ambari-server/resources/scripts
[root@asnaik1 scripts]# python configs.py -u admin -p admin -n asnaik -l asnaik1.openstacklocal -t 8080 -a get -c cluster-env |grep -i ignore_groupsusers_create
    "ignore_groupsusers_create": "false",
[root@asnaik1 scripts]# python configs.py -u admin -p admin -n asnaik -l asnaik1.openstacklocal -t 8080 -a set -c cluster-env -k  ignore_groupsusers_create -v true
2018-08-09 04:12:14,914 INFO ### Performing "set":
2018-08-09 04:12:14,914 INFO ### new property - "ignore_groupsusers_create":"true"
2018-08-09 04:12:14,940 INFO ### on (Site:cluster-env, Tag:version1527268503510)
2018-08-09 04:12:14,953 INFO ### PUTting json into: doSet_version1533787934953155.json
2018-08-09 04:12:15,059 INFO ### NEW Site:cluster-env, Tag:version1533787934953155
[root@asnaik1 scripts]# python configs.py -u admin -p admin -n asnaik -l asnaik1.openstacklocal -t 8080 -a get -c cluster-env |grep -i ignore_groupsusers_create
    "ignore_groupsusers_create": "true",
&lt;/PRE&gt;&lt;P&gt;	you can get the help from&lt;/P&gt;
&lt;PRE&gt;[root@asnaik1 scripts]# python configs.py --help
&lt;/PRE&gt;&lt;P&gt;and retry the operation. this time ambari wont be creating a elasticsearch user.&lt;/P&gt;&lt;P&gt;	Hope this helps.&lt;/P&gt;&lt;P style="color:green"&gt;	Please accept the answer if this helped you.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 17:26:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Add-custom-service-via-Ambari-ERROR/m-p/224841#M82470</guid>
      <dc:creator>akhilsnaik</dc:creator>
      <dc:date>2018-08-21T17:26:18Z</dc:date>
    </item>
  </channel>
</rss>

