forked from docs/doc-exports
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>
24 lines
5.5 KiB
HTML
24 lines
5.5 KiB
HTML
<a name="mrs_01_24460"></a><a name="mrs_01_24460"></a>
|
|
|
|
<h1 class="topictitle1">How Do I Do If PostgreSQL or GaussDB Fails to Connect?</h1>
|
|
<div id="body0000001172160004"><ul id="mrs_01_24460__ul1313371314495"><li id="mrs_01_24460__li171331613164915">Scenario 1: (<strong id="mrs_01_24460__b13386181625714">import</strong> scenarios) Run the <strong id="mrs_01_24460__b19419721115715">sqoop import</strong> command to extract the open source PostgreSQL to MRS HDFS or Hive.<ul id="mrs_01_24460__ul1624011111509"><li id="mrs_01_24460__li1272864316512">Symptom<p id="mrs_01_24460__p1651485517317"><a name="mrs_01_24460__li1272864316512"></a><a name="li1272864316512"></a>The <strong id="mrs_01_24460__b4650985089511">sqoop</strong> command can be executed to query PostgreSQL tables, but an error is reported when the <strong id="mrs_01_24460__b13630808189511">sqoop import</strong> command is executed.</p>
|
|
<ul id="mrs_01_24460__ul19571574415"><li id="mrs_01_24460__li15711573411">The authentication type 12 is not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or subnet, and that it</li><li id="mrs_01_24460__li18392181112419">The authentication type 5 is not supported. Check that you have configured the pg_hba.conf file to include the client's IP address or subnet, and that it</li></ul>
|
|
</li><li id="mrs_01_24460__li126030470518">Root cause:<ul id="mrs_01_24460__ul155021716121415"><li id="mrs_01_24460__li1050231615146">If the authentication type is 5, the root cause is as follows: When the <strong id="mrs_01_24460__b17609048469511">sqoop import</strong> command is executed, a MapReduce job is started. The PostgreSQL driver package <strong id="mrs_01_24460__b13378746779511">gsjdbc4-*.jar</strong> exists in the MRS Hadoop installation directory <strong id="mrs_01_24460__b20111642389511">/opt/Bigdata/FusionInsight_HD_*/1_*_DataNode/install/hadoop/share/hadoop/common/lib</strong>, which is incompatible with the open source PostgreSQL service. As a result, an error is reported.</li><li id="mrs_01_24460__li995013194146">If the authentication type is 5, the root cause is as follows: The <strong id="mrs_01_24460__b174446211616">pg_hba.conf</strong> file of the database is incorrectly configured.</li></ul>
|
|
</li><li id="mrs_01_24460__li1534220505517">Solution:<ul id="mrs_01_24460__ul132613915148"><li id="mrs_01_24460__li4569195515174">If the authentication type is 5, the solution is as follows: Move the driver package <strong id="mrs_01_24460__b348941599">gsjdbc4-*.jar</strong> to the <strong id="mrs_01_24460__b1565074615916">tmp</strong> directory on each MRS core node.<p id="mrs_01_24460__p1920420011816"><b><span class="cmdname" id="mrs_01_24460__cmdname15437416121820">mv /opt/Bigdata/FusionInsight_HD_*/1_*_DataNode/install/hadoop/share/hadoop/common/lib/gsjdbc4-*.jar /tmp</span></b></p>
|
|
</li><li id="mrs_01_24460__li1852054571716">If the authentication type is 12, the solution is as follows: Modify the <strong id="mrs_01_24460__b5764520249511">pg_hba.conf</strong> file of the database by changing the value of <strong id="mrs_01_24460__b19892059539511">ADDRESS</strong> to the IP address of the node where Sqoop resides.</li></ul>
|
|
</li></ul>
|
|
</li><li id="mrs_01_24460__li685331813491">Scenario 2: (<strong id="mrs_01_24460__b13602104155717">export</strong> scenarios) Run the <strong id="mrs_01_24460__b18651646105718">sqoop export</strong> command to extract the open source PostgreSQL to MRS HDFS or Hive.<ul id="mrs_01_24460__ul1253554745013"><li id="mrs_01_24460__li165358515313">Symptom<p id="mrs_01_24460__p17591640361"><a name="mrs_01_24460__li165358515313"></a><a name="li165358515313"></a>The <strong id="mrs_01_24460__b16441529144612">sqoop</strong> command can be executed to query PostgreSQL tables, but the error message "The authentication type 5 is not supported." is displayed when the <strong id="mrs_01_24460__b188630219462">sqoop export</strong> command is executed. Check that you have configured the pg_hba.conf file to include the client's IP address or subnet, and that it</p>
|
|
</li><li id="mrs_01_24460__li58141096533">Root cause:<p id="mrs_01_24460__p573817107538"><a name="mrs_01_24460__li58141096533"></a><a name="li58141096533"></a>When the <strong id="mrs_01_24460__b6517907949511">sqoop export</strong> command is executed, a MapReduce job is started. The PostgreSQL driver package <strong id="mrs_01_24460__b2782154489511">gsjdbc4-*.jar</strong> exists in the MRS Hadoop installation directory <strong id="mrs_01_24460__b20856103169511">/opt/Bigdata/FusionInsight_HD_*/1_*_DataNode/install/hadoop/share/hadoop/common/lib</strong>, which is incompatible with the open-source PostgreSQL service. As a result, an error is reported.</p>
|
|
</li><li id="mrs_01_24460__li101421836105118">Solution:<p id="mrs_01_24460__p20142163610517"><a name="mrs_01_24460__li101421836105118"></a><a name="li101421836105118"></a>1. Move the driver package <strong id="mrs_01_24460__b5244133295112">gsjdbc4-*.jar</strong> to the <strong id="mrs_01_24460__b12531838165120">tmp</strong> directory on each MRS core node.</p>
|
|
<p id="mrs_01_24460__p4142153635112"><b><span class="cmdname" id="mrs_01_24460__cmdname4644730121910">mv /opt/Bigdata/FusionInsight_HD_*/1_*_DataNode/install/hadoop/share/hadoop/common/lib/gsjdbc4-*.jar /tmp</span></b></p>
|
|
<p id="mrs_01_24460__p10142636145117">2. Delete <strong id="mrs_01_24460__b88366425113">/opt/Bigdata/client/Hive/Beeline/lib/gsjdbc4-*.jars</strong>.</p>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_24457.html">Common Issues About Sqoop</a></div>
|
|
</div>
|
|
</div>
|
|
|