我使用Apache Ni-Fi(版本 1.15.2)創建了一個資料管道,用于將資料從 AWS RDS 實體中的 MySQL 資料庫傳輸到 Timescale(postgreSQL)。Ni-Fi 在 Windows 10 之上的 Virtual Box 中的 Linux Ubuntu 18.04 中運行。該管道已通過使用位于我的本地 Linux 實體中的 Timescale 資料庫作為目標成功測驗,而無需使用 SSL。
然后我修改了管道以使用Timescale Cloud作為目標 ( https://portal.timescale.cloud/login )。資料庫名稱為:periodic-measurements
在 Timescale Cloud 服務頁面中,我可以看到這些憑據:
- 主持人:
<host-string> - 港口:
10250 - 用戶:
tsdbadmin - 密碼:
<timescale-cloud-service-password> - 服務 URI:
postgres://tsdbadmin:<timescale-cloud-service-password>@<host-string>:10250/defaultdb?sslmode=require - SSL模式:
require - 允許的 IP 地址:
0.0.0.0/0
我使用 PutDatabaseRecord 處理器在使用 DBCPConnectionPool 控制器服務的 postgreSQL 資料庫中寫入資料。
我已將從 Timescale Cloud 服務頁面獲取的 CA 證書復制到我的 Linux 實體中的以下目錄中,檔案名如下:
/etc/ca-certificates/ts-cloud-ca.pem
這些是 DBCPConnectionPool 控制器服務中的配置引數:
? 資料庫連接 URL:jdbc:postgres://<host-string>:10250/periodic-measurements
? 資料庫驅動程式類名稱:org.postgresql.Driver
? 資料庫驅動程式位置:/usr/share/java/postgresql/postgresql-42.3.1.jar
? 資料庫用戶:tsdbadmin
? 密碼:<timescale-cloud-service-password>
? ssl 模式:require
? sslrootcert:/etc/ca-certificates/ts-cloud-ca.pem
啟用控制器服務時,出現以下錯誤:
StandardControllerServiceNode[service=DBCPConnectionPool[id=017e1005-818e-1423-7951-125faf9dff4d], name=Connector to Timescale Cloud, active=true] Failed to invoke @OnEnabled method due to java.sql.SQLException: No suitable driver
causes: org.apache.nifi.processor.exception.ProcessException: No suitable driver for the given Database Connection URL: No suitable driver for the given Database Connection URL
如果我使用 sslmode 更改 DBCPConnectionPool 控制器服務設定,我會得到相同的結果:verify-ca
請注意,我已使用相同的憑據從我的 Linux 實體成功連接到帶有 Grafana 的 Timescale Cloud 資料庫。
有什么提示可能是錯的嗎?
謝謝,
貝爾納多
uj5u.com熱心網友回復:
錯誤出現在以 jdbc:postgres 而不是 jdbc:postgresql 開頭的資料庫連接 URL 中的 DBCPConnectionPool 控制器服務的配置引數中
正確配置:
? 資料庫連接 URL:jdbc:postgresql://:10250/periodic-measurements
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/447406.html
上一篇:為什么這個JavaHttpsServer沒有成功完成一次TLS握手?
下一篇:JS計算2個陣列之間的日期匹配
