我使用Apache (版本1.15.2)创建了一个数据管道,用于将数据从AWS实例中的MySQL数据库传输到时间刻度(postgreSQL)。在Windows 10之上的Virtual上的LinuxUbuntu18.04中运行了Ni-Fi。该管道已经成功地测试了,它使用位于我本地Linux实例中的时间刻度数据库作为目标,而不使用SSL。
然后,我修改了管道,使用时间刻度云作为目标(https://portal.timescale.cloud/login)。数据库名为:periodic-measurements
在时间刻度云服务页面中,我可以看到以下凭证:
<host-string>
10250
tsdbadmin
<timescale-cloud-service-password>
require
postgres://tsdbadmin:<timescale-cloud-service-password>@<host-string>:10250/defaultdb?sslmode=require
require
0.0.0.0/0我使用PutDatabaseRecord处理器在使用DBCPConnectionPool控制器服务的postgreSQL数据库中写入数据。
我已将从Timescale Cloud服务页面获得的CA证书复制到Linux实例中的以下目录中,文件名如下:
/etc/ca-certificates/ts-cloud-ca.pem
这些是DBCPConnectionPool控制器服务中的配置参数:
·数据库连接网址:jdbc:postgres://<host-string>:10250/periodic-measurements
·数据库驱动程序类名:org.postgresql.Driver
·数据库驱动程序位置:/usr/share/java/postgresql/postgresql-42.3.1.jar
·数据库用户:tsdbadmin
·密码:<timescale-cloud-service-password>
·sslmode模式: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:verify-ca更改DBCPConnectionPool控制器服务设置,则得到相同的结果。
请注意,通过使用相同的凭据,我成功地从Linux实例使用Grafana连接到时间刻度云数据库。
有什么提示吗?
谢谢,
贝尔纳多
发布于 2022-03-22 08:40:39
错误出现在数据库连接URL中的DBCPConnectionPool控制器服务中的配置参数中,该服务以jdbc:postgres开始,而不是jdbc:postgresql。
正确配置:
·数据库连接网址: jdbc:postgresql://:10250/periodic-measurements
https://stackoverflow.com/questions/71498067
复制相似问题