openai-java
openai-java copied to clipboard
sun.security.validator.ValidatorException: PKIX path building failed
java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
我也是这个问题
Just checking to see if related to a diff problem. Please post results of:
java --version
This problem is caused by the Java environment without HTTPS website certificate, but I don't know how to solve it. I have tried many online solutions but still can't solve it
java version "1.8.0_11" Java(TM) SE Runtime Environment (build 1.8.0_11-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode)
Upgrade to java11 , solve the problem
To use 1.8.0_100 or less you have to use the keytool to upgrade the certs which is complicated and not secure. Upgrading java will fix your issue. Thanks @qianyx !
######(中文)最简单的办法####### 我分享个我的cacerts文件给大家吧 https://wwym.lanzoum.com/iM6ZU0pjc1eh 下载解压,然后替换 路劲为:
Windows
Your Path/jdk1.8.0_91\jre\lib\security
Linux
Your Path/jdk1.8.0_45/jre/lib/security
####(English)A piece of cake#####
I share my cacerts file here
https://wwym.lanzoum.com/iM6ZU0pjc1eh
Please uncompress the file and replace to yours
For windows
Your Path/jdk1.8.0_91\jre\lib\security
For linux
Your Path/jdk1.8.0_45/jre/lib/security
That will work too, but just be aware JDK1.8.0_202 - 361 have multiple security fixes, not just updated certs. You should upgrade to at least JDK 11 or even the latest JDK 19 if you are doing development.
#######(中文)最简单的办法##### 我分享个我的cacerts文件给大家吧 https://wwym.lanzoum.com/iM6ZU0pjc1eh 下载解压,然后替换 路劲为:
Windows Your Path/jdk1.8.0_91\jre\lib\security Linux Your Path/jdk1.8.0_45/jre/lib/security
####(英语)小菜一碟##### 我在这里分享我的 cacerts 文件 https://wwym.lanzoum.com/iM6ZU0pjc1eh 请解压缩文件并替换为您的文件 对于窗口 您的路径/jdk1.8.0_91\jre\lib\security 对于 linux 您的路径/jdk1.8.0_45/jre/lib/security
为什么我替换了这个文件也不行,1.8和11都试了我想不明白
Sometimes your runtime or JRE is different than the jdk directory. For instance, on my linux machine, it's located in /usr/lib/jvm/default-java/lib/security and conf/security. If you update the certs, you might have to update the conf file too. If you have having trouble replacing the file from permissions, make sure it isn't being used by any applications and restart everything. You don't have to install the certs using jdk11. You should just reinstall JDK1.8.0_361 or JDK19. While @202252197 is being very helpful, installing 3rd party certs is in general not a good practice.
I ran into this today, machine used has not been used for a week and a half. Program worked prior, now today I am getting this.
Not sure if capacity related (It's at capacity as of writing). Happy to provide more info, just not sure what's changed in the past week or two. (On the side of ChatGPT/this library)
i sovle this problem by update jdk1.8.0_65 to jdk1.8.0_151 . https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html#license-lightbox