首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Apache Ni-Fi尝试用SSL连接时间刻度云时出错

问使用Apache Ni-Fi尝试用SSL连接时间刻度云时出错
EN

Stack Overflow用户
提问于 2022-03-16 13:38:39
回答 1查看 172关注 0票数 1

我使用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>

  • Port:10250

  • User:tsdbadmin

  • Password:<timescale-cloud-service-password>

  • Service

  • 主机:require

  • Allowed URI:postgres://tsdbadmin:<timescale-cloud-service-password>@<host-string>:10250/defaultdb?sslmode=require

  • SSL模式:require

  • Allowed IP地址: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

当启用控制器服务时,我会得到以下错误:

代码语言:javascript
复制
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连接到时间刻度云数据库。

有什么提示吗?

谢谢,

贝尔纳多

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-03-22 08:40:39

错误出现在数据库连接URL中的DBCPConnectionPool控制器服务中的配置参数中,该服务以jdbc:postgres开始,而不是jdbc:postgresql。

正确配置:

·数据库连接网址: jdbc:postgresql://:10250/periodic-measurements

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71498067

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档