kettle填坑【二】

运行环境:

  • Kettle Version 9.2
  • sqljdbc_6.0.8112.200
  • java version “1.8.0_301”
  • MS Sql Server2016 已开启强制加密[Configuration Manager->SQL server 网络配置->MSSQLSERVER的协议->右键点击属性->Force Encryption]

ktr文件中的连接配置:

MSSQL类型
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<connection>
<name>测试数据库</name>
<server>192.168.1.1</server>
<type>MSSQL</type>
<access>Native</access>
<database>test</database>
<port>1433</port>
<username>sa</username>
<password>xxxxxxxxx</password>
<servername/>
<data_tablespace/>
<index_tablespace/>
<attributes>xxxxxx...</attributes>
</connection>
MSSQL(NATIVE)类型
1
2
3
4
5
6
7
8
9
10
11
12
13
<connection>
<name>test</name>
<server>${test.server}</server>
<type>MSSQLNATIVE</type>
<access>Native</access>
<database>${test.database}</database>
<port>1433</port>
<username>${test.username}</username>
<password>${test.pwd}</password>
<servername/>
<data_tablespace/>
<index_tablespace/>
</connection>
Kettle/PDI使用MS Sql Server类型连接MS Sql Server失败

连接类型:MS Sql Server
连接方式:Native(JDBC)

具体报错:

Driver class ‘net.sourceforge.jtds.jdbc.Driver’ could not be found, make sure the ‘MS SQL Server’ driver (jar file) is installed.

解决方法:下载jtds.jar包,将文件移动到data-integration\lib 中,下载地址:jTDS - SQL Server and Sybase JDBC driver Files

Kettle/PDI使用MS Sql Server类型连接MS Sql Server失败,提示参数错误。

连接类型:MS Sql Server
连接方式:Native(JDBC)

具体报错:

Connection failed. Verify all connection parameters and confirm that the appropriate driver is installed.
I/O Error: DB server closed connection.

问题引起原因:Kettle连接数据库方法类型使用MSSQL是使用jtds连接数据库,但连接开启强制加密的数据库会提示参数缺失。

解决方法:
暂时还没找到,临时方法改用连接类型:MS Sql Server(Native) 连接方式:Native(JDBC)处理

Kettle/PDI使用MS Sql Server(Native)类型连接MS Sql Server失败,提示jar缺失

连接类型:MS Sql Server(Native)
连接方式:Native(JDBC)

具体报错:

Driver class ‘sun.jdbc.odbc.JdbcOdbcDriver’ could not be found, make sure the ‘MS SQL Server’ driver (jar file) is installed. sun.jdbc.odbc.JdbcOdbcDriver

解决方法:从此下列链接下载sqljdbc jar文件 将其放在 data-integration/lib 文件夹中

Download Microsoft JDBC Driver 6.0 for SQL Server (tar.gz)
JDBC历史版本

Kettle/PDI使用MS Sql Server(Native)类型连接MS Sql Server失败,提示无法建立安全连接

连接类型:MS Sql Server(Native)
连接方式:Native(JDBC)

具体报错:

com.microsoft.sqlserver.jdbc.SQLServerException: 驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。错误:“The server selected protocol version TLS10 is not accepted by client preferences [TLS12]”

问题引起的原因:从1.8_171开始,会禁用3DES加密
原文摘录:

3DES Cipher Suites Disabled

To improve the strength of SSL/TLS connections, 3DES cipher suites have been disabled in SSL/TLS connections in the JDK via the jdk.tls.>disabledAlgorithms Security Property.

解决方法:
修改%JAVA_HOME%/jre/lib/security/java.security文件中数据库加密方式,找到jdk.tls.disabledAlgorithms配置节点,将TLSv1、TLSv1.1、3DES_EDE_CBC从禁止名单中剔除。

E:\Java\jdk1.8\jre\lib\security\java.security
1
2
3
4
5
6
7
8
# 原配置 :
# jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, RC4, DES, MD5withRSA, \
# DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \
# include jdk.disabled.namedCurves
# 改动后配置:
jdk.tls.disabledAlgorithms=SSLv3, RC4, DES, MD5withRSA, \
DH keySize < 1024, EC keySize < 224, anon, NULL, \
include jdk.disabled.namedCurves

参考:https://blog.csdn.net/chch87/article/details/86504581

书签摘录

https://www.staroon.dev/categories/Kettle/
https://inf.news/zh-hans/technique/549875ce18ea3b72c350f4449370c3ad.html
https://xiaoym.gitee.io/2019/08/08/kettle-2/#%E9%9C%80%E6%B1%82-2
https://ai.plainenglish.io/pentaho-data-integration-installation-guide-easy-yet-powerful-etl-tool-80930cff46c6
https://ai.plainenglish.io/getting-started-with-pentaho-data-integration-kettle-and-its-components-ef1e71101323
https://ai.plainenglish.io/what-is-the-pdi-client-spoon-in-pentaho-data-integration-kettle-df65b33879ac
https://medium.com/@shravankumar.suvarna
https://sourceforge.net/projects/pentaho/files/
https://mvnrepository.com/artifact/pentaho-kettle
https://stackoverflow.com/questions/11634181/pentaho-data-integration-sql-connection
https://help.hitachivantara.com/Documentation/Pentaho/9.2/Setup/JDBC_drivers_reference#r_pentaho_my_sql_jdbc_drivers_reference
https://jira.pentaho.com/browse/PDI-11536
https://jira.pentaho.com/projects/PDI/issues/PDI-16383?filter=allopenissues
https://sourceforge.net/projects/jtds/files/

Your browser is out-of-date!

Update your browser to view this website correctly.&npsb;Update my browser now

×