Yang, Tong 3f5759eed2 MRS comp-lts 2.0.38.SP20 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2023-01-19 17:08:45 +00:00

17 lines
1.9 KiB
HTML

<a name="mrs_01_24077"></a><a name="mrs_01_24077"></a>
<h1 class="topictitle1">IllegalArgumentException Is Reported When Kafka Is Used to Collect Data</h1>
<div id="body32001227"><div class="section" id="mrs_01_24077__en-us_topic_0000001219029119_section186318321317"><h4 class="sectiontitle">Question</h4><p id="mrs_01_24077__en-us_topic_0000001219029119_p19447187203610">The error "org.apache.kafka.common.KafkaException: Failed to construct kafka consumer" is reported in the <strong id="mrs_01_24077__en-us_topic_0000001219029119_b13100449181914">main</strong> thread, and the following error is reported.</p>
<pre class="screen" id="mrs_01_24077__en-us_topic_0000001219029119_screen1978161213362">java.lang.IllegalArgumentException: Could not find a 'KafkaClient' entry in the JAAS configuration. System property 'java.security.auth.login.config' is not set</pre>
</div>
<div class="section" id="mrs_01_24077__en-us_topic_0000001219029119_section285121011313"><h4 class="sectiontitle">Answer</h4><p id="mrs_01_24077__en-us_topic_0000001219029119_p11288234201515">This error may occur when you try to collect data from the Kafka source with SSL enabled and the installation program cannot read the <strong id="mrs_01_24077__en-us_topic_0000001219029119_b1931414578712">jars.conf</strong> file and its properties.</p>
<p id="mrs_01_24077__en-us_topic_0000001219029119_p11288173421515">To solve this problem, pass the required property as part of the command submitted through Spark. Example: <strong id="mrs_01_24077__en-us_topic_0000001219029119_b771518511197">--files jaas.conf,failed_tables.json --conf 'spark.driver.extraJavaOptions=-Djava.security.auth.login.config=jaas.conf' --conf 'spark.executor .extraJavaOptions=-Djava.security.auth.login.config=jaas.conf'</strong></p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_24075.html">Data Collection</a></div>
</div>
</div>