“主机名未验证错误消息”;在PostgreSQL中的SSL连接上 [英] "HostName not verified error message" on SSL connection in postgresql

查看:145
本文介绍了“主机名未验证错误消息”;在PostgreSQL中的SSL连接上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了 server.crt server.key root.crt 文件放在Windows中的 C:\Users\xxxx\AppData\Roaming\postgresql 文件夹中在Windows上运行postgresql服务器。现在,使用SSL运行我的应用程序时,出现以下错误:

I created server.crt, server.key and root.crt files on Centos 7 and put the same onto the C:\Users\xxxx\AppData\Roaming\postgresql folder in windows as i am running the postgresql server on windows. Now on running my applications using SSL, i am getting the error as


无法验证主机名

"The host name could not be verified"

请提供任何帮助。

推荐答案

我正在使用JetBrains Data Grip可以访问Heroku上的Postgres数据库,并在最新的JDBC驱动程序版本中遇到相同的错误。这就是我解决问题的方式(使用此处提供的答案)。

I am using JetBrains Data Grip to access Postgres dbs on Heroku, and got the same error in the latest JDBC driver version. That's how I solved it (using answers provided here).

在高级标签中设置以下内容:

Set the following in the Advanced tab:

ssl = true

sslmode =必需

sslfactory = org.postgresql.ssl.NonValidatingFactory

(我将 sslmode 的值从 verify-ca 更新为必需,因为它现在可与Heroku Postgres一起使用)

(I updated sslmode value from verify-ca to required because it works with Heroku Postgres now)

这篇关于“主机名未验证错误消息”;在PostgreSQL中的SSL连接上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆