Support Questions

Find answers, ask questions, and share your expertise

Sqoop from Oracle with SSL

avatar
Contributor

Hello -

 

We are trying to import data from Oracle (12.1.0.2)  using Sqoop and with SSL enabled.

 

I have tested without encryption and the sqoop command works and we can import data.

 

However, I am having troubles figuring out the correct syntax to add the SSL options to the Sqoop command. From what i have read online, it requires (at least) these:  useSSL=true    and  requireSSL=true.

 

I have tried many variations of adding the options to the sqoop command and none work.  I get an error from Sqoop indicating "invalid connection string format" 

 

Here is the connection string that works:

sqoop import -Dmapred.job.queue.name=hi.adhoc --connect jdbc:oracle:thin:@170.173.150.162:1522/phdssts2 --username p378428 -P --table P378428.BAR --target-dir /user/p378428/insights2/ --fields-terminated-by '\t' --delete-target-dir --verbose

 

Below are four of variants that don't work.   If anyone knows how to add the SSL options to a sqoop command to Oracle...that would be great.

 

Thanks...

 

(a) sqoop import -Dmapred.job.queue.name=hi.adhoc --connect jdbc:oracle:thin:@170.173.150.162:1522/phdssts2 --useSSL=true --requireSSL=true --username p378428 -P --table DSS_STAGE.KHS_ZC_ARRIV_MEANS --target-dir /user/p378428/insights-zc-khs_SSL_1/ --fields-terminated-by '\t' --delete-target-dir --verbose


(b) sqoop import -Dmapred.job.queue.name=hi.adhoc --connect jdbc:oracle:thin:@170.173.150.162:1522/phdssts2;useSSL=true;requireSSL=true --username p378428 -P --table DSS_STAGE.KHS_ZC_ARRIV_MEANS --target-dir /user/p378428/insights-zc-khs_SSL_1/ --fields-terminated-by '\t' --delete-target-dir --verbose

(c) sqoop import -Dmapred.job.queue.name=hi.adhoc --connect jdbc:oracle:thin:@170.173.150.162:1522/phdssts2&useSSL=true&requireSSL=true --username p378428 -P --table DSS_STAGE.KHS_ZC_ARRIV_MEANS --target-dir /user/p378428/insights-zc-khs_SSL_1/ --fields-terminated-by '\t' --delete-target-dir --verbose

(d) sqoop import -Dmapred.job.queue.name=hi.adhoc --connect "jdbc:oracle:thin:@170.173.150.162:1522/phdssts2;useSSL=true;requireSSL=true" --username p378428 -P --table DSS_STAGE.KHS_ZC_ARRIV_MEANS --target-dir /user/p378428/insights-zc-khs_SSL_1/ --fields-terminated-by '\t' --delete-target-dir --verbose

 

 

10 REPLIES 10

avatar
New Contributor

Hi,

 

When i run the SQOOP Import command with those parameters, i am receiving this error: Can you please advise what could be going wrong?

 

18/04/17 10:14:36 INFO mapreduce.Job: Task Id : attempt_152xxx950_4464_m_000000_0, Status : FAILED
Error: java.lang.RuntimeException: java.lang.RuntimeException: java.sql.SQLRecoverableException: IO Error: Unknown Authentication, Encryption or Data Integrity algorithm
at org.apache.sqoop.mapreduce.db.DBInputFormat.setDbConf(DBInputFormat.java:170)
at org.apache.sqoop.mapreduce.db.DBInputFormat.setConf(DBInputFormat.java:161)
at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:73)
at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:755)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1920)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
Caused by: java.lang.RuntimeException: java.sql.SQLRecoverableException: IO Error: Unknown Authentication, Encryption or Data Integrity algorithm
at org.apache.sqoop.mapreduce.db.DBInputFormat.getConnection(DBInputFormat.java:223)
at org.apache.sqoop.mapreduce.db.DBInputFormat.setDbConf(DBInputFormat.java:168)
... 10 more
Caused by: java.sql.SQLRecoverableException: IO Error: Unknown Authentication, Encryption or Data Integrity algorithm