JVM 信息:Oracle Corporation - 1.8.0_51 - 25.51-b03 java.net.preferIPv4Stack=true 找到 java 版本 1.8.0_51 添加了 Lets Encrypt 根证书作为附加信任 目标目录: . CreeperHost 在 https://www.creeperhost.net/ 友情镜像的数据 提取主罐子: 提取成功 考虑 minecraft 服务器 jar
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
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
at sun.security.ssl.Handshaker.fatalSE(Unknown Source)
at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
at sun.security.ssl.Handshaker.processLoop(Unknown Source)
at sun.security.ssl.Handshaker.process_record(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
at net.minecraftforge.installer.DownloadUtils.getConnection(DownloadUtils.java:243)
at net.minecraftforge.installer.DownloadUtils.downloadManifest(DownloadUtils.java:307)
at net.minecraftforge.installer.json.Util.getVanillaVersion(Util.java:73)
at net.minecraftforge.installer.actions.ServerInstall.run(ServerInstall.java:86)
at net.minecraftforge.installer.SimpleInstaller.main(SimpleInstaller.java:128)
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
at sun.security.validator.Validator.validate(Unknown Source)
at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source)
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
... 19 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source)
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
at java.security.cert.CertPathBuilder.build(Unknown Source)
... 25 more
无法下载版本清单,找不到服务器 jar URL。 安装时出错
/* 我已经尝试将 creeperhosts 证书添加到 java 的 cacert。请记住,我对这件事没有任何经验......:DDDDD 所以我只能按照你的指示去做。 */
在花了一些时间尝试找到解决方案后,我打开了安装程序的代码并找到了安装程序尝试用来下载 minecraft 服务器文件的 URL。
public static final String MANIFEST_URL = "https://launchermeta.mojang.com/mc/game/version_manifest.json";
所以你必须从这个链接导出根证书,并导入到你的 JRE 可信证书文件夹中。证书名称是“DigiCert Global Root G2”。这样做的命令是:
keytool.exe -import -alias digicert -keystore 'C:\Program Files\Java\jre1.8.0_51\lib\security\cacerts' -file 'C:\Users\[you user here]\Downloads\DigiCert Global Root G2.crt'
通常密钥库的密码是“changeit”(不带引号)。
现在您可以运行安装程序,它应该可以正常工作。