Teradada JDBC exception during sqoop import

Connectivity
New Member

Teradada JDBC exception during sqoop import

Hi ,

 

I am trying to do full table import of Teradata tables using Sqoop. The eval statement works, but when i change it to import, it fails. Please sugges what I am missing here.

 

Sqoop eval which is working:

sqoop eval -libjars /usr/hdp/2.4.2.0-258/sqoop/lib/tdgssconfig.jar,/usr/hdp/2.4.2.0-258/sqoop/lib/teradata-connector-1.4.1-hadoop2.jar,/usr/hdp/2.4.2.0-258/sqoop/lib/terajdbc4.jar --driver com.teradata.jdbc.TeraDriver --connect "jdbc:teradata://x.x.x.x/DATABASE=yyyy" --username abhi --password password --query "SELECT * from table1"

 

But this import is failing:

sqoop import -libjars /usr/hdp/2.4.2.0-258/sqoop/lib/tdgssconfig.jar,/usr/hdp/2.4.2.0-258/sqoop/lib/teradata-connector-1.4.1-hadoop2.jar,/usr/hdp/2.4.2.0-258/sqoop/lib/terajdbc4.jar --driver com.teradata.jdbc.TeraDriver --connect "jdbc:teradata://x.x.x.x/DATABASE=yyyy" --username abhi --password password --table table1 --target-dir /user/hduser1/testing/table1 -m 1

 

Below is the import error:

Error: java.lang.RuntimeException: java.lang.RuntimeException: java.sql.SQLException: [Teradata JDBC Driver] [TeraJDBC 14.10.00.44] [Error 1000] [SQLState 08S01] Login failure for Connection to x.x.x.x Fri Oct 28 18:01:04 ICT 2016 socket orig=x.x.x.x cid=48e7b3d2 sess=0 java.net.ConnectException: Network is unreachable at

 

I am not sure why it is getting Network unreachable. Because eval command is working. Is this got something to do with the jars? I have the latest TD 14 jars in the classpath.

 

 

Full stack trace:

Error: java.lang.RuntimeException: java.lang.RuntimeException: java.sql.SQLException: [Teradata JDBC Driver] [TeraJDBC 14.10.00.44] [Error 1000] [SQLState 08S01] Login failure for Connection to x.x.x.x Fri Oct 28 18:01:04 ICT 2016 socket orig=x.x.x.x cid=48e7b3d2 sess=0 java.net.ConnectException: Network is unreachable at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$ConnectThread.run(TDNetworkIOIF.java:1224)
at org.apache.sqoop.mapreduce.db.DBInputFormat.setConf(DBInputFormat.java:167)
at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:76)
at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:136)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:749)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1709)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162)
Caused by: java.lang.RuntimeException: java.sql.SQLException: [Teradata JDBC Driver] [TeraJDBC 14.10.00.44] [Error 1000] [SQLState 08S01] Login failure for Connection to x.x.x.x Fri Oct 28 18:01:04 ICT 2016 socket orig=x.x.x.x cid=48e7b3d2 sess=0 java.net.ConnectException: Network is unreachable at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$ConnectThread.run(TDNetworkIOIF.java:1224)
at org.apache.sqoop.mapreduce.db.DBInputFormat.getConnection(DBInputFormat.java:220)
at org.apache.sqoop.mapreduce.db.DBInputFormat.setConf(DBInputFormat.java:165)
... 9 more
Caused by: java.sql.SQLException: [Teradata JDBC Driver] [TeraJDBC 14.10.00.44] [Error 1000] [SQLState 08S01] Login failure for Connection to x.x.x.x Fri Oct 28 18:01:04 ICT 2016 socket orig=x.x.x.x cid=48e7b3d2 sess=0 java.net.ConnectException: Network is unreachable at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$ConnectThread.run(TDNetworkIOIF.java:1224)
at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeDriverJDBCException(ErrorFactory.java:94)
at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeDriverJDBCException(ErrorFactory.java:69)
at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeIoJDBCException(ErrorFactory.java:207)
at com.teradata.jdbc.jdbc_4.util.ErrorAnalyzer.analyzeIoError(ErrorAnalyzer.java:59)
at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.createSocketConnection(TDNetworkIOIF.java:157)
at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.<init>(TDNetworkIOIF.java:136)
at com.teradata.jdbc.jdbc.GenericTeradataConnection.getIO(GenericTeradataConnection.java:118)
at com.teradata.jdbc.jdbc.GenericLogonController.run(GenericLogonController.java:98)
at com.teradata.jdbc.jdbc_4.TDSession.<init>(TDSession.java:205)
at com.teradata.jdbc.jdk6.JDK6_SQL_Connection.<init>(JDK6_SQL_Connection.java:35)
at com.teradata.jdbc.jdk6.JDK6ConnectionFactory.constructSQLConnection(JDK6ConnectionFactory.java:25)
at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:179)
at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:169)
at com.teradata.jdbc.TeraDriver.doConnect(TeraDriver.java:232)
at com.teradata.jdbc.TeraDriver.connect(TeraDriver.java:158)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at org.apache.sqoop.mapreduce.db.DBConfiguration.getConnection(DBConfiguration.java:302)
at org.apache.sqoop.mapreduce.db.DBInputFormat.getConnection(DBInputFormat.java:213)
... 10 more
Caused by: java.net.ConnectException: Network is unreachable
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$ConnectThread.run(TDNetworkIOIF.java:1224)

  • Sqoop
  • Sqoop import
  • Teradata
1 REPLY
Teradata Employee

Re: Teradada JDBC exception during sqoop import

Quoted from Stack Overflow:

 

http://stackoverflow.com/questions/33008276/sqoop-eval-is-working-but-sqoop-import-is-giving-error

 

"Sqoop Import uses Map-reduce whereas Sqoop Eval doesn't. You would be executing Sqoop Eval from a node that has connectivity to the Source.

For Sqoop Import to work all the Nodes of your Cluster need to have connectivity to the Source."