Yang, Tong 48706b7552 MRS COMP-LTS 320-lts.1 version
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2024-04-12 12:51:10 +00:00

79 lines
14 KiB
HTML

<a name="mrs_01_24576"></a><a name="mrs_01_24576"></a>
<h1 class="topictitle1">Configuring Intranet and Extranet Access for Kafka</h1>
<div id="body0000001583465809"><p id="mrs_01_24576__p522713935516">This section applies to MRS 3.2.0 or later.</p>
<div class="section" id="mrs_01_24576__section3106125805312"><h4 class="sectiontitle">Scenario</h4><p id="mrs_01_24576__p1397172719013">To access Kafka Broker deployed on a private network from the Kafka client via the Internet, enable the Kafka private and public network traffic distribution function.</p>
</div>
<div class="section" id="mrs_01_24576__section1526183519545"><h4 class="sectiontitle">Prerequisites</h4><ul id="mrs_01_24576__ul556961116291"><li id="mrs_01_24576__li1875475112526">The node where Broker resides has both private and public IP addresses. Broker is bound to the private IP address and cannot be accessed via the Internet. Alternatively, the node where Broker resides has only private IP addresses, and external services access the private network through gateway mapping.</li><li id="mrs_01_24576__li5569121111297">The ZooKeeper service is running properly.</li><li id="mrs_01_24576__li11694523193118">The Kafka instance status and disk status are normal.</li></ul>
</div>
<div class="section" id="mrs_01_24576__section1184910752016"><h4 class="sectiontitle">Procedure</h4><ol id="mrs_01_24576__ol82491327205517"><li id="mrs_01_24576__li1924932710556"><span>Log in to FusionInsight Manager.</span></li><li id="mrs_01_24576__li718292175116"><a name="mrs_01_24576__li718292175116"></a><a name="li718292175116"></a><span>Choose <strong id="mrs_01_24576__b18942101914586">Cluster</strong> &gt; <strong id="mrs_01_24576__b85261923185817">Services</strong> &gt; <strong id="mrs_01_24576__b122941228165812">Kafka</strong>. On the page that is displayed, click the <strong id="mrs_01_24576__b1264775515587">Instance</strong> tab. On this tab page, select the target broker instance in the instance list. On the displayed page, click the <strong id="mrs_01_24576__b1288815278414">Instance Configurations</strong> tab and then the <strong id="mrs_01_24576__b12213372047">All Configurations</strong> sub-tab. Enter <strong id="mrs_01_24576__b7245131316453">broker.id</strong> in the search box to view and record the broker ID of the current broker instance.</span></li><li id="mrs_01_24576__li1031823418278"><span>Repeat <a href="#mrs_01_24576__li718292175116">2</a> to view and record the broker ID of each broker instance.</span></li><li id="mrs_01_24576__li52492273553"><span>Choose <strong id="mrs_01_24576__b3241348104515">Cluster</strong> &gt; <strong id="mrs_01_24576__b17985219452">Services</strong> &gt; <strong id="mrs_01_24576__b17001857114510">Kafka</strong>. On the page that is displayed, click the <strong id="mrs_01_24576__b178684324611">Configurations</strong> tab then the <strong id="mrs_01_24576__b1695164854614">All Configurations</strong> sub-tab. On this sub-tab page, click <strong id="mrs_01_24576__b10190114364912">Broker(Role)</strong> and select <strong id="mrs_01_24576__b10175114516496">Server</strong>. Enter <strong id="mrs_01_24576__b68961253194913">advertised</strong> and <strong id="mrs_01_24576__b1866471910332">actual</strong> in the search box. The five configuration items shown in the following figure are displayed. Configure the parameters according to <a href="#mrs_01_24576__table25971414778">Table 1</a>.</span><p><p id="mrs_01_24576__p19720228159"><span><img id="mrs_01_24576__image716714441511" src="en-us_image_0000001583349121.png"></span></p>
<p id="mrs_01_24576__p989410311490"><span><img id="mrs_01_24576__image6634151385120" src="en-us_image_0000001532709204.png"></span></p>
<div class="tablenoborder"><a name="mrs_01_24576__table25971414778"></a><a name="table25971414778"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_24576__table25971414778" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="mrs_01_24576__row17598014575"><th align="left" class="cellrowborder" valign="top" width="19.03190319031903%" id="mcps1.3.4.2.4.2.3.2.4.1.1"><p id="mrs_01_24576__p9450175113915">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="36.62366236623662%" id="mcps1.3.4.2.4.2.3.2.4.1.2"><p id="mrs_01_24576__p154501512919">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="44.34443444344435%" id="mcps1.3.4.2.4.2.3.2.4.1.3"><p id="mrs_01_24576__p345014516918">Remarks</p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_01_24576__row16598161419710"><td class="cellrowborder" valign="top" width="19.03190319031903%" headers="mcps1.3.4.2.4.2.3.2.4.1.1 "><p id="mrs_01_24576__p1845125113913">enable.advertised.listener</p>
</td>
<td class="cellrowborder" valign="top" width="36.62366236623662%" headers="mcps1.3.4.2.4.2.3.2.4.1.2 "><p id="mrs_01_24576__p184513511495">Whether to enable the advertised.listeners configuration. The default value is <strong id="mrs_01_24576__b19862511192418">false</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="44.34443444344435%" headers="mcps1.3.4.2.4.2.3.2.4.1.3 "><p id="mrs_01_24576__p145185116914">Set <strong id="mrs_01_24576__b76661333735">enable.advertised.listener</strong> to <strong id="mrs_01_24576__b14628235736">true</strong>.</p>
<div class="note" id="mrs_01_24576__note945115516917"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="mrs_01_24576__p174521517915">When you install the Kafka service, do not set this parameter to <strong id="mrs_01_24576__b1129134619920">true</strong>. You can set this parameter to <strong id="mrs_01_24576__b66177138108">true</strong> only after broker instances and ZooKeeper are running properly.</p>
</div></div>
</td>
</tr>
<tr id="mrs_01_24576__row1759891416719"><td class="cellrowborder" valign="top" width="19.03190319031903%" headers="mcps1.3.4.2.4.2.3.2.4.1.1 "><p id="mrs_01_24576__p204521151797">advertised.broker.id.ip.map</p>
</td>
<td class="cellrowborder" valign="top" width="36.62366236623662%" headers="mcps1.3.4.2.4.2.3.2.4.1.2 "><p id="mrs_01_24576__p171731942173314">IP address released by Kafka. This parameter is left blank by default.</p>
<p id="mrs_01_24576__p19609174121612">Format: <em id="mrs_01_24576__i174536512918">Broker ID:IP</em>. Multiple brokers can use the same IP address. If multiple mappings are configured, use commas (,) to separate them.</p>
</td>
<td class="cellrowborder" valign="top" width="44.34443444344435%" headers="mcps1.3.4.2.4.2.3.2.4.1.3 "><p id="mrs_01_24576__p15471944131916">Map the broker ID of each broker instance recorded in <a href="#mrs_01_24576__li718292175116">2</a> to the IP address to which the broker instance to bound.</p>
<p id="mrs_01_24576__p34530517913">For example, if there are three broker instances and one IP address, the broker IDs are <strong id="mrs_01_24576__b1529418324268">1</strong>, <strong id="mrs_01_24576__b58653420263">2</strong>, and <strong id="mrs_01_24576__b6254173642620">3</strong>, and the IP address is <strong id="mrs_01_24576__b13750134611269">10.</strong><em id="mrs_01_24576__i1436113128130">xxx.xxx.xxx</em>, the configuration format is <strong id="mrs_01_24576__b11146169202715">1:10.</strong><em id="mrs_01_24576__i1345312519918">xxx.xxx.xxx</em><strong id="mrs_01_24576__b2085719242271">,2:10.</strong><em id="mrs_01_24576__i445385116919">xxx.xxx.xxx</em><strong id="mrs_01_24576__b13375143210276">,3:10.</strong><em id="mrs_01_24576__i545313511915">xxx.xxx.xxx</em>.</p>
</td>
</tr>
<tr id="mrs_01_24576__row55994141472"><td class="cellrowborder" valign="top" width="19.03190319031903%" headers="mcps1.3.4.2.4.2.3.2.4.1.1 "><p id="mrs_01_24576__p194539518919">advertised.broker.id.port.map</p>
</td>
<td class="cellrowborder" valign="top" width="36.62366236623662%" headers="mcps1.3.4.2.4.2.3.2.4.1.2 "><p id="mrs_01_24576__p11145212121615">Port released by Kafka. This parameter is left blank by default.</p>
<p id="mrs_01_24576__p1540852063315">Format: <em id="mrs_01_24576__i1408152020338">Broker ID:Port</em>. <strong id="mrs_01_24576__b1053152993619">Port</strong> indicates the port to be bound. This port is a custom port and must be available. If multiple mappings are configured, use commas (,) to separate them.</p>
</td>
<td class="cellrowborder" valign="top" width="44.34443444344435%" headers="mcps1.3.4.2.4.2.3.2.4.1.3 "><p id="mrs_01_24576__p26057701914">Map the broker ID of each broker instance recorded in <a href="#mrs_01_24576__li718292175116">2</a> to the port to which the broker instance to bound.</p>
<p id="mrs_01_24576__p16453135118917">For example, if there are three broker instances and three ports, the broker IDs are <strong id="mrs_01_24576__b151061323286">1</strong>, <strong id="mrs_01_24576__b1548803417287">2</strong>, and <strong id="mrs_01_24576__b136941237112813">3</strong>, and the ports are <strong id="mrs_01_24576__b314184182813">3307</strong>, <strong id="mrs_01_24576__b10756134212813">3308</strong>, and <strong id="mrs_01_24576__b10772744192817">3309</strong>, the configuration format is <strong id="mrs_01_24576__b10955352162811">1:3307,2:3308,3:3309</strong>.</p>
</td>
</tr>
<tr id="mrs_01_24576__row2174141141310"><td class="cellrowborder" valign="top" width="19.03190319031903%" headers="mcps1.3.4.2.4.2.3.2.4.1.1 "><p id="mrs_01_24576__p217521141311">actual.broker.id.ip.map</p>
</td>
<td class="cellrowborder" valign="top" width="36.62366236623662%" headers="mcps1.3.4.2.4.2.3.2.4.1.2 "><p id="mrs_01_24576__p1217581131315">IP address bound to Kafka. This parameter is left blank by default.</p>
<p id="mrs_01_24576__p17456342372">Format: <em id="mrs_01_24576__i11831638102515">Broker ID:IP</em>. If multiple mappings are configured, use commas (,) to separate them.</p>
</td>
<td class="cellrowborder" valign="top" width="44.34443444344435%" headers="mcps1.3.4.2.4.2.3.2.4.1.3 "><p id="mrs_01_24576__p1998332113389">Map the broker ID of each broker instance recorded in <a href="#mrs_01_24576__li718292175116">2</a> to the IP address to which the broker instance to bound.</p>
<p id="mrs_01_24576__p0983102183810">For example, if there are three broker instances and one IP address, the broker IDs are <strong id="mrs_01_24576__b1818551111263">1</strong>, <strong id="mrs_01_24576__b201861211112617">2</strong>, and <strong id="mrs_01_24576__b81861211162617">3</strong>, and the IP address is <strong id="mrs_01_24576__b6187171112269">10.</strong><em id="mrs_01_24576__i41871011192617">xxx.xxx.xxx</em>, the configuration format is <strong id="mrs_01_24576__b2188711152610">1:10.</strong><em id="mrs_01_24576__i41883116263">xxx.xxx.xxx</em><strong id="mrs_01_24576__b14189121113261">,2:10.</strong><em id="mrs_01_24576__i151897117269">xxx.xxx.xxx</em><strong id="mrs_01_24576__b0190101112615">,3:10.</strong><em id="mrs_01_24576__i16190111162610">xxx.xxx.xxx</em>.</p>
</td>
</tr>
<tr id="mrs_01_24576__row39984623811"><td class="cellrowborder" valign="top" width="19.03190319031903%" headers="mcps1.3.4.2.4.2.3.2.4.1.1 "><p id="mrs_01_24576__p169912462381">actual.broker.id.port.map</p>
</td>
<td class="cellrowborder" valign="top" width="36.62366236623662%" headers="mcps1.3.4.2.4.2.3.2.4.1.2 "><p id="mrs_01_24576__p770312453438">Port bound to Kafka. This parameter is left blank by default.</p>
<p id="mrs_01_24576__p1870319456437">Format: <em id="mrs_01_24576__i1443216112277">Broker ID:Port</em>. <strong id="mrs_01_24576__b396516863">Port</strong> indicates the port to be bound. This port is a custom port and must be available. If multiple mappings are configured, use commas (,) to separate them.</p>
</td>
<td class="cellrowborder" valign="top" width="44.34443444344435%" headers="mcps1.3.4.2.4.2.3.2.4.1.3 "><p id="mrs_01_24576__p186993138446">Map the broker ID of each broker instance recorded in <a href="#mrs_01_24576__li718292175116">2</a> to the port to which the broker instance to bound.</p>
<p id="mrs_01_24576__p569915137446">For example, if there are three broker instances and three ports, the broker IDs are <strong id="mrs_01_24576__b1028624520">1</strong>, <strong id="mrs_01_24576__b416714287">2</strong>, and <strong id="mrs_01_24576__b2060322341">3</strong>, and the ports are <strong id="mrs_01_24576__b1287009215">3307</strong>, <strong id="mrs_01_24576__b1877131061">3308</strong>, and <strong id="mrs_01_24576__b219669784">3309</strong>, the configuration format is <strong id="mrs_01_24576__b896248478">1:3307,2:3308,3:3309</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</p></li><li id="mrs_01_24576__li826965415581"><span>After the configuration is complete, click <strong id="mrs_01_24576__b13342194118297">Save</strong> in the upper left corner. On the <strong id="mrs_01_24576__b1554518114302">Instance</strong> tab, select the target broker instances and choose <strong id="mrs_01_24576__b86351345344">More</strong> &gt; <strong id="mrs_01_24576__b278944133516">Instance Rolling Restart</strong>. Wait until the rolling restart is complete.</span></li><li id="mrs_01_24576__li11758133010283"><span>(Optional) To disable this configuration, set <strong id="mrs_01_24576__b15507171012365">enable.advertised.listener</strong> to <strong id="mrs_01_24576__b14257213113617">false</strong> and click <strong id="mrs_01_24576__b1784613143368">Save</strong>. On the <strong id="mrs_01_24576__b186054877151532">Instance</strong> page of Kafka, select Kafka instances, choose <strong id="mrs_01_24576__b78374847151532">More</strong> &gt; <strong id="mrs_01_24576__b186752809951532">Instance Rolling Restart</strong>, and wait until the rolling restart is complete.</span></li></ol>
<div class="note" id="mrs_01_24576__note7918105217478"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="mrs_01_24576__p6918185254714">In a cluster with Kerberos authentication enabled, after <strong id="mrs_01_24576__b15822141415294">enable.advertised.listener</strong> is configured, the client supports only Kerberos authentication, but not PLAIN authentication.</p>
</div></div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_0375.html">Using Kafka</a></div>
</div>
</div>