【发布时间】:2021-03-06 11:30:42
【问题描述】:
我正在尝试使用 Talend Open Studio for Big Data v7.3.1 连接到位于远程服务器中的 PostgreSQL 数据库 问题是服务器需要 SSL 证书。我尝试了很多方法,但仍然失败。 这是我尝试过的连接字符串和 TOS BD 中的日志错误
1) 使用 ssl 模式禁用 jdbc:postgresql://xx.xx.xx.xx:5432/dbName?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory&sslmode=disable
Exception in component tDBConnection_1 (DB_Connection)
org.postgresql.util.PSQLException: FATAL: pg_hba.conf rejects connection for host "my.ip.address.here", user "user", database "databasename", SSL off
2)不指定ssl模式(表示采用默认模式)jdbc:postgresql://xx.xx.xx.xx:5432/dbName?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory
org.postgresql.ssl.PGjdbcHostnameVerifier verify
GRAVE: Server name validation failed: hostname xx.xx.xx.xx does not match common name xxxxx
Exception in component tDBConnection_1 (DB_Connection)
org.postgresql.util.PSQLException: The hostname xx.xx.xx.xx could not be verified by
hostnameverifier PgjdbcHostnameVerifier
3)如果我在连接中省略 SSL 参数部分,例如 jdbc:postgresql://xx.xx.xx.xx:5432/dbName?,它会要求提供有效的客户端证书。
注意:我可以使用 pgadmin 连接到数据库,但问题在于 Talend open Studio
【问题讨论】:
标签: postgresql ssl ssl-certificate etl talend