<?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: cant start kafka broker from ambari in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242940#M204739</link>
    <description>&lt;P&gt;&lt;EM&gt;&lt;A href="@Michael Bronson"&gt;@Michael Bronson&lt;/A&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Do you have a working cluster of same HDP version? Is it a kerberized environment? &lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Jan 2019 05:17:06 GMT</pubDate>
    <dc:creator>Shelton</dc:creator>
    <dc:date>2019-01-28T05:17:06Z</dc:date>
    <item>
      <title>cant start kafka broker from ambari</title>
      <link>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242939#M204738</link>
      <description>&lt;P&gt;hi all&lt;/P&gt;&lt;P&gt;we have 3 kafka brokers ( HDP version - 2.6.0.1 and ambari verdion - 2.6.0 ) &lt;/P&gt;&lt;P&gt;we cant start them from ambari , and we saw the following errors on ambari-agent logs&lt;/P&gt;&lt;P&gt;the error about - &lt;STRONG&gt;Fail: Configuration parameter 'kafka-env' was not found in configurations dictionary!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;what chould be the problem here ?&lt;/P&gt;&lt;PRE&gt;Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/ambari_agent/PythonReflectiveExecutor.py", line 59, in run_file
    imp.load_source('__main__', script)
  File "/var/lib/ambari-agent/cache/common-services/KAFKA/0.8.1/package/scripts/kafka_broker.py", line 141, in &amp;lt;module&amp;gt;
    KafkaBroker().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 314, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/common-services/KAFKA/0.8.1/package/scripts/kafka_broker.py", line 128, in status
    import status_params
  File "/var/lib/ambari-agent/cache/common-services/KAFKA/0.8.1/package/scripts/status_params.py", line 26, in &amp;lt;module&amp;gt;
    kafka_pid_file = format("{kafka_pid_dir}/kafka.pid")
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/format.py", line 95, in format
    return ConfigurationFormatter().format(format_string, args, **result)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/format.py", line 59, in format
    result_protected = self.vformat(format_string, args, all_params)
  File "/usr/lib64/python2.7/string.py", line 549, in vformat
    result = self._vformat(format_string, args, kwargs, used_args, 2)
  File "/usr/lib64/python2.7/string.py", line 582, in _vformat
    result.append(self.format_field(obj, format_spec))
  File "/usr/lib64/python2.7/string.py", line 599, in format_field
    return format(value, format_spec)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/config_dictionary.py", line 73, in __getattr__
    raise Fail("Configuration parameter '" + self.name + "' was not found in configurations dictionary!")
Fail: Configuration parameter 'kafka-env' was not found in configurations dictionary!
&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Jan 2019 04:30:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242939#M204738</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2019-01-28T04:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: cant start kafka broker from ambari</title>
      <link>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242940#M204739</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;A href="@Michael Bronson"&gt;@Michael Bronson&lt;/A&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Do you have a working cluster of same HDP version? Is it a kerberized environment? &lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 05:17:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242940#M204739</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2019-01-28T05:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: cant start kafka broker from ambari</title>
      <link>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242941#M204740</link>
      <description>&lt;P&gt;yes we have other cluster with the same HDP , do you want to check something ?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 05:34:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242941#M204740</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2019-01-28T05:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: cant start kafka broker from ambari</title>
      <link>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242942#M204741</link>
      <description>&lt;P&gt;by trhe way , we can start the kafka broker from cli , and also stop it , but from ambari we get  -  &lt;STRONG&gt;Fail: Configuration parameter 'kafka-env' was not found in configurations dictionary!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 05:46:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242942#M204741</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2019-01-28T05:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: cant start kafka broker from ambari</title>
      <link>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242943#M204742</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;A href="https://community.hortonworks.com/questions/234895/@Michael%20Bronson"&gt;@Michael Bronson&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Then what you could do using the config.py copy the kafka.env to the /tmp on the working cluster see below  &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;# /var/lib/ambari-server/resources/scripts/configs.py --user=admin --password=admin --port=8080 --action=get --host=localhost --cluster={your_clustername} --config-type=kafka-env --file=/tmp/kafka-env.json &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Sample output &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;2019-01-27 22:27:09,474 INFO ### Performing "get" content:
2019-01-27 22:27:09,474 INFO ### to file "/tmp/kafka.env.json"
2019-01-27 22:27:09,600 INFO ### on (Site:kafka.env, Tag:version1) &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Validate the contents of the .json in the "&lt;STRONG&gt;/tmp/kafka-env.json&lt;/STRONG&gt;" &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Sample output&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;{
  "properties": {
    "kafka_user_nproc_limit": "65536",
    "content": "\n#!/bin/bash\n\n# Set KAFKA specific environment variables here.\n\n# The java implementation to use.\nexport JAVA_HOME={{java64_home}}\nexport PATH=$PATH:$JAVA_HOME/bin\nexport PID_DIR={{kafka_pid_dir}}\nexport LOG_DIR={{kafka_log_dir}}\n{% if kerberos_security_enabled or kafka_other_sasl_enabled %}\nexport KAFKA_KERBEROS_PARAMS=\"-Djavax.security.auth.useSubjectCredsOnly=false {{kafka_kerberos_params}}\"\n{% else %}\nexport KAFKA_KERBEROS_PARAMS={{kafka_kerberos_params}}\n{% endif %}\n# Add kafka sink to classpath and related depenencies\nif [ -e \"/usr/lib/ambari-metrics-kafka-sink/ambari-metrics-kafka-sink.jar\" ]; then\n  export CLASSPATH=$CLASSPATH:/usr/lib/ambari-metrics-kafka-sink/ambari-metrics-kafka-sink.jar\n  export CLASSPATH=$CLASSPATH:/usr/lib/ambari-metrics-kafka-sink/lib/*\nfi\nif [ -f /etc/kafka/conf/kafka-ranger-env.sh ]; then\n. /etc/kafka/conf/kafka-ranger-env.sh\nfi",
    "kafka_log_dir": "/var/log/kafka",
    "kafka_pid_dir": "/var/run/kafka",
    "kafka_user_nofile_limit": "128000",
    "is_supported_kafka_ranger": "true",
    "kafka_user": "kafka"
  }&lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Copy the file using scp or whatever it over to your cluster and run the below command &lt;STRONG&gt;--action=set&lt;/STRONG&gt; to update your problematic cluster. Before you start the kafka check the properties in the kafka.env.json  to match you ie memory to match you cluster config. &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;# /var/lib/ambari-server/resources/scripts/configs.py --user=admin --password=admin --port=8080 --action=set --host=localhost --cluster={your_clustername} --config-type=kafka-env --file=/tmp/kafka-env.json &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Sample output &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;2019-01-27 22:29:38,568 INFO ### Performing "set":
2019-01-27 22:29:38,568 INFO ### from file /tmp/kafka.env.json
2019-01-27 22:29:38,569 INFO ### PUTting file: "/tmp/kafka.env.json"
2019-01-27 22:29:38,569 INFO ### PUTting json into: doSet_version1.json
2019-01-27 22:29:38,719 INFO ### NEW Site:kafka.env, Tag:version2 &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Start you Kafka from Ambari this should work. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Please let me know &lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 06:07:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242943#M204742</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2019-01-28T06:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: cant start kafka broker from ambari</title>
      <link>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242944#M204743</link>
      <description>&lt;P&gt;&lt;EM&gt;@&lt;/EM&gt;&lt;A href="https://community.hortonworks.com/users/1271/sheltong.html" rel="nofollow noopener noreferrer" target="_blank"&gt;Geoffrey Shelton Okot&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;before I will do the procedure , I see that from ambari - kafka-env is already set with the relevant parameters , so I not understand why need to reconfigure this ? , &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="99435-capture.png" style="width: 1062px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/13538iC53AFC15EC1E6B3E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="99435-capture.png" alt="99435-capture.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://community.cloudera.com/t5/image/serverpage/image-id/6861i1223124665B8CB22/image-size/large?v=1.0&amp;amp;px=999" border="0" alt="capture.png" title="capture.png" /&gt;</description>
      <pubDate>Sat, 17 Aug 2019 21:52:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242944#M204743</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2019-08-17T21:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: cant start kafka broker from ambari</title>
      <link>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242945#M204744</link>
      <description>&lt;P&gt;&lt;EM&gt; &lt;A href="https://community.hortonworks.com/questions/234895/@Michael%20Bronson" rel="nofollow noopener noreferrer" target="_blank"&gt;@Michael Bronson&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;If you can start your brokers from the CLI then that means your env is not set properly as Ambari depends on that &lt;STRONG&gt;env &lt;/STRONG&gt;to successfully start or stop a component.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;What you could do is export the &lt;STRONG&gt;env&lt;/STRONG&gt; from the problematic cluster and compare it meticulously against the &lt;STRONG&gt;env&lt;/STRONG&gt; from the working cluster using the procedures I sent above.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;You should be able to see the difference &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Can you also validate that the symlinks are okay&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="99436-bronson.png" style="width: 695px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/13537i57EB2CF1E83A5998/image-size/medium?v=v2&amp;amp;px=400" role="button" title="99436-bronson.png" alt="99436-bronson.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Aug 2019 21:52:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242945#M204744</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2019-08-17T21:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: cant start kafka broker from ambari</title>
      <link>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242946#M204745</link>
      <description>&lt;P&gt;just for your info&lt;/P&gt;&lt;P&gt;we also see that ( from /var/log/messages )&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;python: detected unhandled python exception in
val/lob/ambari-agent/cache/common-services/KAFKA/0.8.1/package/scripts/kafka_broker.py&lt;/PRE&gt;&lt;P&gt;and&lt;/P&gt;&lt;PRE&gt;package ambari-agent
isn't signed with proper key&lt;BR /&gt;post-create on
/var/spool/abrt/python-2019-01-28-08:34:49-107750 exited with 1&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Jan 2019 17:19:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242946#M204745</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2019-01-28T17:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: cant start kafka broker from ambari</title>
      <link>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242947#M204746</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/1271/sheltong.html"&gt;Geoffrey Shelton Okot&lt;/A&gt; , do you recomended to reinstall the ambari agent on the kafka machines ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 17:53:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242947#M204746</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2019-01-28T17:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: cant start kafka broker from ambari</title>
      <link>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242948#M204747</link>
      <description>&lt;P&gt;yes about the &lt;EM&gt;symlinks , they are ok&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 18:03:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242948#M204747</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2019-01-28T18:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: cant start kafka broker from ambari</title>
      <link>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242949#M204748</link>
      <description>&lt;P&gt;&lt;EM&gt; &lt;A href="https://community.hortonworks.com/questions/234895/@Michael%20Bronson"&gt;@Michael Bronson&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;If you have exhausted all other avenues YES,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Step 1&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;I&gt;&lt;/I&gt;&lt;I&gt;&lt;UL&gt;&lt;LI&gt;&lt;I&gt;Check and compare the &lt;STRONG&gt;/usr/hdp/current/kafka-broker&lt;/STRONG&gt; symlinks&lt;/I&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/I&gt;&lt;I&gt;&lt;/I&gt;&lt;I&gt;&lt;P&gt;&lt;I&gt;&lt;STRONG&gt;Step 2&lt;/STRONG&gt;&lt;/I&gt;&lt;/P&gt;&lt;/I&gt;&lt;I&gt;&lt;UL&gt;&lt;LI&gt;&lt;I&gt;Download both &lt;B&gt;env&lt;/B&gt;'es as backup from the problematic and functioning cluster&lt;/I&gt;&lt;/LI&gt;&lt;LI&gt;&lt;I&gt;Upload the functioning cluster  &lt;STRONG&gt;env &lt;/STRONG&gt;to the problematic one, since you have a backup&lt;/I&gt;&lt;/LI&gt;&lt;LI&gt;&lt;I&gt;Start kafka through ambari&lt;/I&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/I&gt;&lt;I&gt;&lt;P&gt;&lt;I&gt;&lt;EM&gt;&lt;STRONG&gt;Step 3&lt;/STRONG&gt;&lt;/EM&gt;&lt;/I&gt;&lt;/P&gt;&lt;/I&gt;&lt;P&gt;&lt;/P&gt;&lt;I&gt;&lt;/I&gt;&lt;I&gt;&lt;/I&gt;&lt;PRE&gt;&lt;I&gt;sed -i 's/verify=platform_default/verify=disable/'/etc/python/cert-verification.cfg&lt;/I&gt;&lt;/PRE&gt;&lt;I&gt;&lt;/I&gt;&lt;I&gt;&lt;P&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;&lt;/I&gt;&lt;I&gt;&lt;P style="display: inline !important;"&gt;&lt;I&gt;&lt;STRONG&gt;Step 4&lt;/STRONG&gt;&lt;/I&gt;&lt;/P&gt;&lt;/I&gt;&lt;P&gt;&lt;EM&gt;Lastly, if the above steps don't remedy the issue, then remove and -re-install the &lt;STRONG&gt;ambari-agent &lt;/STRONG&gt;and remember to manually point to the correct ambari server in the&lt;STRONG&gt; ambari-agent.ini&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 19:57:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/cant-start-kafka-broker-from-ambari/m-p/242949#M204748</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2019-01-28T19:57:22Z</dc:date>
    </item>
  </channel>
</rss>

