- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
sqoop list-databases error
- Labels:
-
Apache Accumulo
-
Apache Sqoop
Created on ‎08-02-2018 12:06 PM - edited ‎09-16-2022 06:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
desabv@xxxxx:~#> sqoop list-databases --connect "jdbc:jtds:sqlserver://xxxxx.com:1433" --connection-manager org.apache.sqoop.manager.SQLServerManager --driver net.sourceforge.jtds.jdbc.Driver --username desabv -P
Warning: /sso/sfw/cloudera/parcels/CDH-5.14.0-1.cdh5.14.0.p0.24/bin/../lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
18/08/02 15:03:27 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6-cdh5.14.0
Enter password:
18/08/02 15:03:34 INFO manager.SqlManager: Using default fetchSize of 1000
18/08/02 15:03:35 ERROR manager.CatalogQueryManager: Failed to list databases
java.sql.SQLException: I/O Error: DB server closed connection.
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2481)
at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:632)
at net.sourceforge.jtds.jdbc.JtdsConnection.<init>(JtdsConnection.java:371)
at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
Any help anyone
Created ‎08-10-2018 07:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The solution would be to use an updated client library that supports SSL. The one you download from the site does not support connecting to an encrypted MS SQL DB
So for others who try to Sqoop to MS SQL server , this is what i used. Download the updated one from here . https://sourceforge.net/p/jtds/bugs/725/
sqoop import --connect "jdbc:jtds:sqlserver://xxx.xxxx.xxx.xxx:1433;databaseName=abcd;domain=xxx.xxx.xxx;useNTLMv2=true;integratedSecu..." --driver net.sourceforge.jtds.jdbc.Driver --connection-manager org.apache.sqoop.manager.SQLServerManager --username "desind" -P --fields-terminated-by "\001" --query "
select Number_, Active FROM dwh_14a.Currency WHERE \$CONDITIONS" --split-by 'Number_' --target-dir /tmp/test --fetch-size 10000 -m1
Created ‎08-04-2018 09:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Based on the error i think the SQL Server uses an SSL connection and a valid client certificate is required to communicate with the SQL Server.Contact your sql admin for this . Once you have the certificate the error should go off .
Created ‎08-07-2018 11:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes I think you are right.
Logs from SQL Server
Date 8/7/2018 2:26:24 PM Log SQL Server (Current - 8/7/2018 2:26:00 PM) Source Logon Message Encryption is required to connect to this server but the client library does not support encryption; the connection has been closed. Please upgrade your client library. [CLIENT: 149.173.90.36]
So is there a client library that supports encryption for JTDS?
Created ‎08-10-2018 07:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The solution would be to use an updated client library that supports SSL. The one you download from the site does not support connecting to an encrypted MS SQL DB
So for others who try to Sqoop to MS SQL server , this is what i used. Download the updated one from here . https://sourceforge.net/p/jtds/bugs/725/
sqoop import --connect "jdbc:jtds:sqlserver://xxx.xxxx.xxx.xxx:1433;databaseName=abcd;domain=xxx.xxx.xxx;useNTLMv2=true;integratedSecu..." --driver net.sourceforge.jtds.jdbc.Driver --connection-manager org.apache.sqoop.manager.SQLServerManager --username "desind" -P --fields-terminated-by "\001" --query "
select Number_, Active FROM dwh_14a.Currency WHERE \$CONDITIONS" --split-by 'Number_' --target-dir /tmp/test --fetch-size 10000 -m1
Created on ‎09-17-2019 09:55 PM - edited ‎09-17-2019 09:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using below sqoop import command. But facing with exception.
sqoop import -Dhadoop.security.credential.provider.path=jceks://hdfs/DataDomains/HDPReports/credentials/credentials.jceks --connect "jdbc:jtds:sqlserver://xx.xx.xx.xx:17001;useNTLMv2=true;domain=bfab01.local" --connection-manager org.apache.sqoop.manager.SQLServerManager --driver net.sourceforge.jtds.jdbc.Driver --verbose --query 'Select * from APS_CONN_TEST.dbo.ConnTest WHERE $CONDITIONS' --target-dir /user/admvxb/sqoopimport1 --split-by ConnTestId --username ******* --password '******' -- --schema dbo
Exception
========
19/09/18 14:50:51 ERROR manager.SqlManager: Error executing statement: java.sql.SQLException: Client driver version is not supported.
java.sql.SQLException: Client driver version is not supported.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:649)
at net.sourceforge.jtds.jdbc.JtdsConnection.<init>(JtdsConnection.java:371)
at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184)
Thanks
Venkat
