An Error Is Reported When sqoop import Is Executed to Import PostgreSQL Data to Hive
Background
The sqoop import command is executed to extract data from open-source PostgreSQL to MRS HDFS or Hive.
Issue
The sqoop command can be executed to query the PostgreSQL database table, but an error is reported when the sqoop import command is executed to import data.
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.
Cause Analysis
- MD5 authentication for connecting to PostgreSQL fails. A whitelist needs to be configured in the pg_hba.cnf file.
- When the sqoop import command is executed, a MapReduce job is started. The PostgreSQL driver package gsjdbc4-*.jar exists in the MRS Hadoop installation directory /opt/Bigdata/FusionInsight_HD_*/1_*_DataNode/install/hadoop/share/hadoop/common/lib, which is incompatible with the open-source PostgreSQL service. As a result, an error is reported.
Procedure
- Configure a whitelist in the pg_hba.cnf file.
- Delete the gsjdbc4-*.jar packages from all core nodes, and add the PostgreSQL JAR package to sqoop/lib.
mv /opt/Bigdata/FusionInsight_HD_*/1_*_DataNode/install/hadoop/share/hadoop/common/lib/gsjdbc4-*.jar /tmp
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot