1
0
forked from docs/doc-exports
doc-exports/docs/dds/umn/dds_02_0100.html
Ru, Li Yi 8322f976ef dds_umn
Reviewed-by: Székely, Ond <ond.szekely@t-systems.com>
Co-authored-by: Ru, Li Yi <liyiru7@huawei.com>
Co-committed-by: Ru, Li Yi <liyiru7@huawei.com>
2024-09-24 14:54:24 +00:00

39 lines
10 KiB
HTML

<a name="dds_02_0100"></a><a name="dds_02_0100"></a>
<h1 class="topictitle1">Enabling IP Addresses of shard and config Nodes</h1>
<div id="body1585039985339"><div class="section" id="dds_02_0100__section45891259194718"><h4 class="sectiontitle">Scenarios</h4><p id="dds_02_0100__p197615192220">A cluster instance of Community Edition consists of dds mongos, shard, and config nodes. When your services need to read and write data from and into databases, connect to the dds mongos node. In certain scenarios, you need to read data from the shard or config node. Therefore, obtaining the IP address of the corresponding node is necessary.</p>
<p id="dds_02_0100__p8060118">This section describes how to obtain the IP addresses of the shard and config nodes.</p>
</div>
<div class="section" id="dds_02_0100__section12401231171410"><h4 class="sectiontitle">Before You Start</h4>
<ul id="dds_02_0100__ul4988173651419"><li id="dds_02_0100__li1998863631415">DDS supports cluster instances of Community Edition 3.4, 4.0, 4.2, and 4.4.</li><li id="dds_02_0100__li1592812169159">DDS creates two connection addresses for the primary node and secondary node in a shard respectively.</li><li id="dds_02_0100__li185401621134812">Once the connection addresses are assigned to your nodes, they cannot be modified or deleted.</li><li id="dds_02_0100__li2029351134917">The connection address is accessible from private networks only.</li></ul>
</div>
<div class="section" id="dds_02_0100__section1748562461319"><h4 class="sectiontitle">Enabling shard IP Address</h4><ol id="dds_02_0100__ol1398481335019"><li id="dds_02_0100__li312682313217"><span><a href="dds_02_0043.html">Log in to the DDS console.</a></span></li><li id="dds_02_0100__li131998252507"><span>In the left navigation pane, choose <strong id="dds_02_0100__b861910318543">Instance Management</strong>. In the DB instance list, click the target cluster instance to go to the <strong id="dds_02_0100__b125916259573">Basic Information</strong> page.</span><p><p id="dds_02_0100__p8381616162115">Alternatively, on the <strong id="dds_02_0100__b1143415103214">Basic Information</strong> page, in the navigation pane on the left, click <strong id="dds_02_0100__b1143441019216">Connections</strong>.</p>
</p></li><li id="dds_02_0100__li43511328145214"><span>In the <strong id="dds_02_0100__b1229016301215">Node Information</strong> area, click the <strong id="dds_02_0100__b8501189584">shard</strong> tab.</span></li><li id="dds_02_0100__li49993266574"><span>Click <strong id="dds_02_0100__b595113381837">Show shard IP Address</strong>. In the displayed dialog box, enter and confirm the password for connecting to the node.</span><p><div class="note" id="dds_02_0100__note208751820518"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dds_02_0100__ul12635132165"><li id="dds_02_0100__li069911215337">After the shard IP address is enabled, you need to restart the corresponding shard nodes for the configuration to take effect.</li><li id="dds_02_0100__li1635135162">The shard IP address cannot be modified or disabled after being enabled, and the password cannot be modified.</li><li id="dds_02_0100__li18623131513167">After the shard IP address is enabled and new shard nodes are added, you need to manually locate the newly added shard node and choose <strong id="dds_02_0100__b15262232682">More</strong> &gt; <strong id="dds_02_0100__b1740319356814">Show shard IP Address</strong> in the <strong id="dds_02_0100__b20216638885">Operation</strong> column to show the shard IP address.</li><li id="dds_02_0100__li94923381716">After the shard IP address is enabled, all shard nodes in the current instance apply for connection addresses.</li></ul>
</div></div>
</p></li><li id="dds_02_0100__li79582518253"><a name="dds_02_0100__li79582518253"></a><a name="li79582518253"></a><span>Obtain the private IP address of the shard node.</span><p><p id="dds_02_0100__p117132312513">After the shard IP address is enabled, you can click <strong id="dds_02_0100__b10321163711128">Connections</strong> in the navigation pane on the left or on the current page to expand the node drop-down list and obtain the private IP address.</p>
</p></li><li id="dds_02_0100__li8115164017177"><span>Obtain the connection address of a shard node.</span><p><p id="dds_02_0100__p054125031515">Example:</p>
<p id="dds_02_0100__p1703246122719">Based on the private IP address obtained in <a href="#dds_02_0100__li79582518253">5</a>, the connection address of the current shard node is as follows:</p>
<p id="dds_02_0100__p175475021518">mongodb://<em id="dds_02_0100__i15574123516511"><strong id="dds_02_0100__b651661517527">sharduser:&lt;password&gt;@192.168.237</strong><strong id="dds_02_0100__b1051471555217">.15:8637,192.168.255.217:8637</strong></em>/test?authSource=admin&amp;replicaSet=shard_?</p>
<div class="note" id="dds_02_0100__note514684820464"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dds_02_0100__ul0319020174714"><li id="dds_02_0100__li1429152105720"><strong id="dds_02_0100__b19430192135719">sharduser</strong> is the default user when setting up "show shard IP address" function.</li><li id="dds_02_0100__li11990122584719"><span class="uicontrol" id="dds_02_0100__uicontrol453210315488"><b>&lt;password&gt;</b></span>indicates the password of the sharduser.</li><li id="dds_02_0100__li1628417455914"><span class="uicontrol" id="dds_02_0100__uicontrol828419410591"><b>192.168.237.15</b></span> and <span class="uicontrol" id="dds_02_0100__uicontrol728474115912"><b>192.168.255.217</b></span> are the private IP addresses of the shard's primary and secondary nodes.</li><li id="dds_02_0100__li61141149104820"><strong id="dds_02_0100__b109949318596">8637</strong> is the port of the shard node and cannot be changed.</li><li id="dds_02_0100__li136633514474"><span class="uicontrol" id="dds_02_0100__uicontrol14818112014489"><b>shard_?</b></span> indicates the name of the shard node to be connected, for example, shard_1.</li></ul>
</div></div>
</p></li></ol>
</div>
<div class="section" id="dds_02_0100__section88951332134016"><h4 class="sectiontitle">Enabling config IP Address</h4><ol id="dds_02_0100__ol22395812422"><li id="dds_02_0100__li15239581425"><span><a href="dds_02_0043.html">Log in to the DDS console.</a></span></li><li id="dds_02_0100__li13231158174217"><span>In the left navigation pane, choose <strong id="dds_02_0100__b1489910053212">Instance Management</strong>. In the DB instance list, click the target cluster instance to go to the <strong id="dds_02_0100__b159002033211">Basic Information</strong> page.</span><p><p id="dds_02_0100__p174551917202218">Alternatively, on the <strong id="dds_02_0100__b1618291313226">Basic Information</strong> page, in the navigation pane on the left, click <strong id="dds_02_0100__b3182313172212">Connections</strong>.</p>
</p></li><li id="dds_02_0100__li9231158114215"><span>In the <strong id="dds_02_0100__b1920174173214">Node Information</strong> area, click the <strong id="dds_02_0100__b12020483213">config</strong> tab.</span></li><li id="dds_02_0100__li52495813420"><span>Click <strong id="dds_02_0100__b21442814326">Show config IP Address</strong>. In the displayed dialog box, enter and confirm the password for connecting to the node.</span><p><div class="note" id="dds_02_0100__note32465819421"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dds_02_0100__ul1124658174219"><li id="dds_02_0100__li15389182614547">After the config IP address is enabled, you need to restart the corresponding config node for the configuration to take effect.</li><li id="dds_02_0100__li938902615414">The config IP address cannot be modified or disabled after being enabled, and the password cannot be modified.</li></ul>
</div></div>
</p></li><li id="dds_02_0100__li1225175894219"><a name="dds_02_0100__li1225175894219"></a><a name="li1225175894219"></a><span>Obtain the private IP address of the config node.</span><p><p id="dds_02_0100__p789411343314">After the config IP address is enabled, you can click <strong id="dds_02_0100__b1722114633410">Connections</strong> in the navigation pane on the left or on the current page to expand the node drop-down list and obtain the private IP address.</p>
</p></li><li id="dds_02_0100__li42336919349"><span>Obtain the connection address of a config node.</span><p><p id="dds_02_0100__p18362430122011">Example:</p>
<p id="dds_02_0100__p1362530172017">Based on the private IP address obtained in <a href="#dds_02_0100__li1225175894219">5</a>, the connection address of the current config node is as follows:</p>
<p id="dds_02_0100__p20363133011204">mongodb://<em id="dds_02_0100__i103631430182014"><strong id="dds_02_0100__b16363830162011">csuser:&lt;password&gt;@192.168.154</strong><strong id="dds_02_0100__b5363143010205">.71:8636,192.168.143.227:8636</strong></em>/test?authSource=admin&amp;replicaSet=config</p>
<div class="note" id="dds_02_0100__note51982048135211"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dds_02_0100__ul206825581528"><li id="dds_02_0100__li118914145315"><strong id="dds_02_0100__b149021484350">csuser</strong> indicates the username of the current config node.</li><li id="dds_02_0100__li1928715412536"><span class="uicontrol" id="dds_02_0100__uicontrol16999185314357"><b>&lt;password&gt;</b></span>indicates the password of the csuser.</li><li id="dds_02_0100__li745919745314"><span class="uicontrol" id="dds_02_0100__uicontrol197021726125312"><b>192.168.154.71</b></span> and <span class="uicontrol" id="dds_02_0100__uicontrol78331230165312"><b>192.168.143.227</b></span> are the private IP addresses of the current node.</li><li id="dds_02_0100__li146821658155219"><strong id="dds_02_0100__b6903226910">8636</strong> is the port of the config node and cannot be changed.</li></ul>
</div></div>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_03_0019.html">Connection Management</a></div>
</div>
</div>