<?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: Cannot add a custom service through Ambari 2.7.0 in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-add-a-custom-service-through-Ambari-2-7-0/m-p/194335#M80926</link>
    <description>&lt;P&gt;I've figured out what the problem is there.&lt;/P&gt;&lt;P&gt;In order to make it work - you need to add more fields to your user config in env.xml. Compare the above cassandra example:&lt;/P&gt;&lt;PRE&gt;  &amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;cassandra_user&amp;lt;/name&amp;gt;
    &amp;lt;value&amp;gt;cassandra&amp;lt;/value&amp;gt;
    &amp;lt;property-type&amp;gt;USER&amp;lt;/property-type&amp;gt;
    &amp;lt;description&amp;gt;&amp;lt;/description&amp;gt;
  &amp;lt;/property&amp;gt;&lt;/PRE&gt;&lt;P&gt;And working YARN example from the Ambari 2.7 server:&lt;/P&gt;&lt;PRE&gt;  &amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;yarn_ats_user&amp;lt;/name&amp;gt;
    &amp;lt;display-name&amp;gt;Yarn ATS User&amp;lt;/display-name&amp;gt;
    &amp;lt;value&amp;gt;yarn-ats&amp;lt;/value&amp;gt;
    &amp;lt;property-type&amp;gt;USER&amp;lt;/property-type&amp;gt;
    &amp;lt;description&amp;gt;YARN Client User for ATSv2 backend&amp;lt;/description&amp;gt;
    &amp;lt;value-attributes&amp;gt;
      &amp;lt;type&amp;gt;user&amp;lt;/type&amp;gt;
      &amp;lt;overridable&amp;gt;false&amp;lt;/overridable&amp;gt;
      &amp;lt;user-groups&amp;gt;
        &amp;lt;property&amp;gt;
          &amp;lt;type&amp;gt;cluster-env&amp;lt;/type&amp;gt;
          &amp;lt;name&amp;gt;user_group&amp;lt;/name&amp;gt;
        &amp;lt;/property&amp;gt;
      &amp;lt;/user-groups&amp;gt;
    &amp;lt;/value-attributes&amp;gt;
    &amp;lt;on-ambari-upgrade add="false"/&amp;gt;
  &amp;lt;/property&amp;gt;&lt;/PRE&gt;&lt;P&gt;You need to add the &lt;STRONG&gt;display-name &lt;/STRONG&gt;and &lt;STRONG&gt;value-attributes &lt;/STRONG&gt;fields to your env.xml file (https://github.com/Dominion-Digital/ambari-cassandra-service/blob/master/configuration/cassandra-env.xml, for example). Then - restart ambari server and this problem should be solved. In case of service install - you may want to remove and then add again your service.&lt;/P&gt;</description>
    <pubDate>Sat, 08 Sep 2018 17:21:28 GMT</pubDate>
    <dc:creator>baliuk91</dc:creator>
    <dc:date>2018-09-08T17:21:28Z</dc:date>
    <item>
      <title>Cannot add a custom service through Ambari 2.7.0</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-add-a-custom-service-through-Ambari-2-7-0/m-p/194331#M80922</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have been trying to add a customer service through Ambari 2.7.0 (NOTE: that works fine with the previous versions). After selecting the service from &lt;STRONG&gt;Choose Serivces&lt;/STRONG&gt;, the system tries to add a client first. But this comes back with the following 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: 'myuser'
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-3409.json', '/var/lib/ambari-agent/cache/stack-hooks/before-ANY', '/var/lib/ambari-agent/data/structured-out-3409.json', 'INFO', '/var/lib/ambari-agent/tmp', 'PROTOCOL_TLSv1_2', '']&lt;/PRE&gt;&lt;P&gt;Should &lt;STRONG&gt;myuser&lt;/STRONG&gt; be part of the &lt;STRONG&gt;Service Users and Groups &lt;/STRONG&gt;- see the below table:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/79534-screen-shot-2018-07-19-at-45504-pm.png"&gt;screen-shot-2018-07-19-at-45504-pm.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If so, how can I add one in there?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2018 23:02:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-add-a-custom-service-through-Ambari-2-7-0/m-p/194331#M80922</guid>
      <dc:creator>daniel_kozlowsk</dc:creator>
      <dc:date>2018-07-19T23:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot add a custom service through Ambari 2.7.0</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-add-a-custom-service-through-Ambari-2-7-0/m-p/194332#M80923</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1271/sheltong.html" nodeid="1271"&gt;&lt;/A&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3418/jsensharma.html" nodeid="3418"&gt;@Jay Kumar SenSharma&lt;/A&gt;, @Geoffrey Shelton Okot&lt;/P&gt;&lt;P&gt;Are you able to help on the above? Many thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 12:33:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-add-a-custom-service-through-Ambari-2-7-0/m-p/194332#M80923</guid>
      <dc:creator>daniel_kozlowsk</dc:creator>
      <dc:date>2018-07-20T12:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot add a custom service through Ambari 2.7.0</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-add-a-custom-service-through-Ambari-2-7-0/m-p/194333#M80924</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3576/rguruvannagari.html" nodeid="3576"&gt;@rguruvannagari&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Do you have an idea about that issue and how to workaround it?&lt;/P&gt;&lt;P&gt;I think it may be related to the fact there is no entry for &lt;STRONG&gt;&lt;EM&gt;myuser&lt;/EM&gt;&lt;/STRONG&gt; in &lt;STRONG&gt;&lt;EM&gt;user_groups&lt;/EM&gt;&lt;/STRONG&gt; variable defined in /var/lib/ambari-agent/data/command-3409.json. However, I am not sure how this one is built.&lt;/P&gt;&lt;P&gt;Any pointers very much appreciated. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 23:28:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-add-a-custom-service-through-Ambari-2-7-0/m-p/194333#M80924</guid>
      <dc:creator>daniel_kozlowsk</dc:creator>
      <dc:date>2018-07-20T23:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot add a custom service through Ambari 2.7.0</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-add-a-custom-service-through-Ambari-2-7-0/m-p/194334#M80925</link>
      <description>&lt;P&gt;same issue here when trying to install cassandra as per &lt;A href="https://github.com/Dominion-Digital/ambari-cassandra-service"&gt;https://github.com/Dominion-Digital/ambari-cassandra-service&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Dominion-Digital/ambari-cassandra-service"&gt;&lt;/A&gt;getting:&lt;/P&gt;&lt;PRE&gt;stderr: 
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/stack-hooks/before-ANY/scripts/hook.py", line 35, in 
    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'cassandra'
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-163.json', '/var/lib/ambari-agent/cache/stack-hooks/before-ANY', '/var/lib/ambari-agent/data/structured-out-163.json', 'INFO', '/var/lib/ambari-agent/tmp', 'PROTOCOL_TLSv1_2', '']
 stdout:
2018-09-04 05:05:23,042 - Stack Feature Version Info: Cluster Stack=3.0, Command Stack=None, Command Version=None -&amp;gt; 3.0
2018-09-04 05:05:23,048 - Group['hadoop'] {}
2018-09-04 05:05:23,050 - User['zookeeper'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['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-163.json', '/var/lib/ambari-agent/cache/stack-hooks/before-ANY', '/var/lib/ambari-agent/data/structured-out-163.json', 'INFO', '/var/lib/ambari-agent/tmp', 'PROTOCOL_TLSv1_2', '']
2018-09-04 05:05:23,074 - The repository with version 3.0.0.0-1634 for this command has been marked as resolved. It will be used to report the version of the component which was installed
2018-09-04 05:05:23,081 - Skipping stack-select on CASSANDRA because it does not exist in the stack-select package structure.

Command failed after 1 tries&lt;/PRE&gt;&lt;P&gt;any ideas?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 22:22:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-add-a-custom-service-through-Ambari-2-7-0/m-p/194334#M80925</guid>
      <dc:creator>andrey1</dc:creator>
      <dc:date>2018-09-04T22:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot add a custom service through Ambari 2.7.0</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-add-a-custom-service-through-Ambari-2-7-0/m-p/194335#M80926</link>
      <description>&lt;P&gt;I've figured out what the problem is there.&lt;/P&gt;&lt;P&gt;In order to make it work - you need to add more fields to your user config in env.xml. Compare the above cassandra example:&lt;/P&gt;&lt;PRE&gt;  &amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;cassandra_user&amp;lt;/name&amp;gt;
    &amp;lt;value&amp;gt;cassandra&amp;lt;/value&amp;gt;
    &amp;lt;property-type&amp;gt;USER&amp;lt;/property-type&amp;gt;
    &amp;lt;description&amp;gt;&amp;lt;/description&amp;gt;
  &amp;lt;/property&amp;gt;&lt;/PRE&gt;&lt;P&gt;And working YARN example from the Ambari 2.7 server:&lt;/P&gt;&lt;PRE&gt;  &amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;yarn_ats_user&amp;lt;/name&amp;gt;
    &amp;lt;display-name&amp;gt;Yarn ATS User&amp;lt;/display-name&amp;gt;
    &amp;lt;value&amp;gt;yarn-ats&amp;lt;/value&amp;gt;
    &amp;lt;property-type&amp;gt;USER&amp;lt;/property-type&amp;gt;
    &amp;lt;description&amp;gt;YARN Client User for ATSv2 backend&amp;lt;/description&amp;gt;
    &amp;lt;value-attributes&amp;gt;
      &amp;lt;type&amp;gt;user&amp;lt;/type&amp;gt;
      &amp;lt;overridable&amp;gt;false&amp;lt;/overridable&amp;gt;
      &amp;lt;user-groups&amp;gt;
        &amp;lt;property&amp;gt;
          &amp;lt;type&amp;gt;cluster-env&amp;lt;/type&amp;gt;
          &amp;lt;name&amp;gt;user_group&amp;lt;/name&amp;gt;
        &amp;lt;/property&amp;gt;
      &amp;lt;/user-groups&amp;gt;
    &amp;lt;/value-attributes&amp;gt;
    &amp;lt;on-ambari-upgrade add="false"/&amp;gt;
  &amp;lt;/property&amp;gt;&lt;/PRE&gt;&lt;P&gt;You need to add the &lt;STRONG&gt;display-name &lt;/STRONG&gt;and &lt;STRONG&gt;value-attributes &lt;/STRONG&gt;fields to your env.xml file (https://github.com/Dominion-Digital/ambari-cassandra-service/blob/master/configuration/cassandra-env.xml, for example). Then - restart ambari server and this problem should be solved. In case of service install - you may want to remove and then add again your service.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Sep 2018 17:21:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-add-a-custom-service-through-Ambari-2-7-0/m-p/194335#M80926</guid>
      <dc:creator>baliuk91</dc:creator>
      <dc:date>2018-09-08T17:21:28Z</dc:date>
    </item>
  </channel>
</rss>

