Support Questions

Find answers, ask questions, and share your expertise

sqoop connection error

avatar
Explorer

Hi ,

i am trying to connect oracle database 11gr2 with sqoop Sqoop 1.4.5-cdh5.3.0. but gettig error

 

hdfs@node01:/opt/cloudera/parcels/CDH/lib/hadoop$ sqoop list-tables -connect jdbc:oracle:thin:@192.168.171.149:1521/BG11G -username hdfsuser -P
Warning: /opt/cloudera/parcels/CDH-5.3.0-1.cdh5.3.0.p0.30/bin/../lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
15/01/15 20:49:36 INFO sqoop.Sqoop: Running Sqoop version: 1.4.5-cdh5.3.0
Enter password:
15/01/15 20:49:41 INFO oracle.OraOopManagerFactory: Data Connector for Oracle and Hadoop is disabled.
15/01/15 20:49:41 INFO manager.SqlManager: Using default fetchSize of 1000
15/01/15 20:49:41 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.NullPointerException
java.lang.NullPointerException
 at org.apache.sqoop.manager.OracleManager.listTables(OracleManager.java:759)
 at org.apache.sqoop.tool.ListTablesTool.run(ListTablesTool.java:49)
 at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
 at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
 at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
 at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
 at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
 at org.apache.sqoop.Sqoop.main(Sqoop.java:236)

 

i am running CDH5.3 on ubuntu 12 .

 

i came accros  Quest OraOop software . it is necessary to install this to move data rom oracle to  hdfs

9 REPLIES 9

avatar
Explorer

Guys ,

Anyone can help on this ?

avatar
> jdbcracle:thin:@192.168.171.149:1521/BG11G

Should that not be jdbc:oraacle:thin:@//192.168.171.149:1521/BG11

​Also ensure there is no firewall blocking communications between the
cluster nodes and the Oracle server​

Regards,
Gautam Gopalakrishnan

avatar
New Contributor

I tried this 

 

[root@quickstart bin]# sqoop list-tables --connect jdbcracle:thin@10.0.0.3:1521/xe --username hr -P


Warning: /usr/lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
15/09/28 16:56:48 INFO sqoop.Sqoop: Running Sqoop version: 1.4.5-cdh5.4.2
Enter password:
15/09/28 16:57:05 ERROR tool.BaseSqoopTool: Got error creating database manager:
java.io.IOException: No manager for connect string: jdbcracle:thin@10.0.0.3:152
1/xe
at org.apache.sqoop.ConnFactory.getManager(ConnFactory.java:191)
at org.apache.sqoop.tool.BaseSqoopTool.init(BaseSqoopTool.java:250)
at org.apache.sqoop.tool.ListTablesTool.run(ListTablesTool.java:44)
at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
at org.apache.sqoop.Sqoop.main(Sqoop.java:236)

 

 

and didn't work , do you know where the problem is ?

avatar
Rising Star
-P expects password : User should enter in the console

Instead of -P use :

--password your_password

avatar
New Contributor

[root@quickstart cloudera]# sqoop list-tables --connect jdbcracle:thin@10.0.0.3:1521/xe --username hr --password hr
Warning: /usr/lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
15/09/29 04:24:18 INFO sqoop.Sqoop: Running Sqoop version: 1.4.5-cdh5.4.2
15/09/29 04:24:18 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
15/09/29 04:24:19 ERROR tool.BaseSqoopTool: Got error creating database manager: java.io.IOException: No manager for connect string: jdbcracle:thin@10.0.0.3:1521/xe
at org.apache.sqoop.ConnFactory.getManager(ConnFactory.java:191)
at org.apache.sqoop.tool.BaseSqoopTool.init(BaseSqoopTool.java:250)
at org.apache.sqoop.tool.ListTablesTool.run(ListTablesTool.java:44)
at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
at org.apache.sqoop.Sqoop.main(Sqoop.java:236)

-----------------------------------

still same problem , I'm not sure if jdbcracle:thin@ is proper driver  !!! don't you think so?

avatar
Rising Star

Here is an example for My SQL: 

--connect jdbc:mysql://quickstart:3306/retail_db

 

I guess for Oracle you should use below format with replacement:

 

--connect jdbc:oracle:thin:@OracleServer:OraclePort:OracleSID

OR

--connect jdbc:oracle:thin:@//OracleServer:OraclePort/OracleService

 

Make sure you have installed Oracle Connector for Sqoop.

avatar
New Contributor

Kindly , Do you have any suggestion URL in how to install Oracle Connector for sqoop, i would prefer if there is video for it step by step.

 

best regards, and thank you so much

avatar
Rising Star

avatar
New Contributor
he is using 5.3 so that shouldn't be neccessary with --direct or am i wrong?