DBeaver mysql 连接中出现网络错误:“无法找到请求目标的有效证书路径”

发布于 2025-01-15 09:35:50 字数 289 浏览 3 评论 0原文

我的 DBeaver 中有此消息 你能帮我解决这个问题吗?

Network error

Motif:

Network unavailable:

javax.net.ssl.SSLHandshakeException:PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I have this message in my DBeaver
Can you help me to fix the problem?

Network error

Motif:

Network unavailable:

javax.net.ssl.SSLHandshakeException:PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

天邊彩虹 2025-01-22 09:35:50

我第一次打开数据库时遇到类似的错误:

网络错误

原因:由于证书问题,网络不可用。尝试改变
在“首选项”->“连接”中设置使用 Windows 信任存储
重新启动DBeaver。如果您没有覆盖信任存储,这可能会有所帮助。
javax.net.ssl.SSLHandshakeException:PKIX 路径构建失败:
sun.security.provider.certpath.SunCertPathBuilderException:无法
找到请求目标的有效认证路径

我尝试“bAsK”解决方案,但对我不起作用。

对我来说,解决方案是在“首选项”->“连接”中删除设置 使用 Windows 信任存储 中的检查,然后重新启动 DBeaver

在此处输入图像描述

我还安装了 JRE 8 (Java)

I have similar error the first time that i open a DB:

Network error

Reason: Network unavailable due to certificate issue. Try changing the
setting Use Windows trust store in Preferences->Connections and
restart DBeaver. It might help if you haven't overridden trust store.
javax.net.ssl.SSLHandshakeException:PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target

I try 'bAsK' solution but not work for me.

The solution for me is remove check in the setting Use Windows trust store in Preferences->Connections and restart DBeaver

enter image description here

I also installed JRE 8 (Java)

吾家有女初长成 2025-01-22 09:35:50

对于 macOS:

编辑:

/Applications/DBeaver.app/Contents/Eclipse/dbeaver.ini

添加行:

-Djavax.net.ssl.trustStoreType=KeychainStore

重新启动 DBeaver 应用程序即可解决此问题。

For macOS:

Edit:

/Applications/DBeaver.app/Contents/Eclipse/dbeaver.ini

add the line:

-Djavax.net.ssl.trustStoreType=KeychainStore

Restart the DBeaver application to resolve this problem.

凉城凉梦凉人心 2025-01-22 09:35:50

在 Windows 上:

在 DBeaver 安装路径中,打开 dbeaver.ini 文件并删除此行:-Djavax.net.ssl.trustStoreType=WINDOWS-ROOT

On Windows:

In DBeaver installation path, open the dbeaver.ini file and remove this line: -Djavax.net.ssl.trustStoreType=WINDOWS-ROOT

心如荒岛 2025-01-22 09:35:50

我使用以下启用的选项解决了这个问题。

输入图片此处描述

I resolved this using below option enabled.

enter image description here

你怎么敢 2025-01-22 09:35:50

如果您在 Java 安装中使用自定义 cacerts,则需要 替换 DBeaver 的 jre 文件夹中的 cacerts 文件
jre文件夹位于DBeaver的主安装文件夹中。

请注意,如果有人为您安装了 Java(例如在公司计算机上),您可能不知道 Java 证书已更新,因此此解决方案可能也值得尝试。
在这种情况下,将 cacerts 文件从 Java 安装的 /lib/security 文件夹复制到 DBeaver 的 jre 文件夹中(另请参阅 我如何找出我的 JVM 正在使用的密钥库)。

If you are using custom cacerts in your Java installation you need to replace the cacerts file in DBeaver's jre folder.
The jre folder is located in the main installation folder of DBeaver.

Note that if someone installed your Java for you (e.g. on a company machine) you might be not aware that Java cacerts where updated, so this solution might be also worth trying.
In such case copy the cacerts file from /lib/security folder of your Java installation into jre folder of DBeaver (see also How do I find out what keystore my JVM is using).

靖瑶 2025-01-22 09:35:50

是的。这对我也有用。非常感谢您的发帖。

这是我在 ini 文件

ssl=org.postgresql.ssl.LibPQFactory


窗口中的设置 ->首选项->连接->选中“使用 Windows 信任存储”

Yes. this worked for me as well .Thanks a lot for posting.

Here are my settings in the ini file

ssl=org.postgresql.ssl.LibPQFactory


window -> Preferences -> Connections -> Check 'Use Windows trust store'

半步萧音过轻尘 2025-01-22 09:35:50

并不总是原因,但就我而言是这样。我的公司使用 Zscalar,它提供了 Dbeaver 不信任的代理证书。
只需注销 VPN 就解决了我的问题。

我没有深入研究它,但我很确定我可以将 Zscalar 提供的证书添加到 Dbeaver 信任存储中,这样就可以解决问题。

Not always the reason but it was in my case. My company use the Zscalar, and it provides a proxy certificate that is not trusted by the Dbeaver.
Just logging off the VPN resolved the issue for me.

I didn't dig into it but I am quite sure that I could have added the certificate offered by the Zscalar into the Dbeaver trust store and it would have resolved the problem.

旧时光的容颜 2025-01-22 09:35:50

我在使用 dbeaver 下载数据库驱动程序时遇到此错误,在 Windows 10 上的控制台模式 (dbeaver-cli.exe ) 中可见。
“以管理员身份”启动 dbeaver-cli.exe 解决了这个问题

I was getting this error when downloading db driver with dbeaver, visible in console mode (dbeaver-cli.exe ) on windows 10.
Starting dbeaver-cli.exe "as administrator" solved it

时光匆匆的小流年 2025-01-22 09:35:50

我做了同样的步骤,但没有工作,但后来我将 SSL Factory 更改为 org.postgresql.ssl.LibPQFactory 并且它工作了。

I did the same step, and did not work, but then I changed the SSL Factory to org.postgresql.ssl.LibPQFactory and it works.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文