我之前用 Xubuntu 15.4 玩 Minecraft 还不错。昨天我更新到 15.10 后就无法在线玩了。以下是启动日志。我尝试重新安装 Minecraft 本身和 Java。我似乎遇到了 Feed the Beast(Minecraft 的 modpack 客户端)的另一个问题,它给出了以下错误:
Authlib checksum download failed, please check log for bad SSL
certificates: 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
以下是 FTB 启动器的另一个错误:
SSL handshake failed. Something might be altering SSL certificates
Certificates are not trusted by JVM certificate chain
Certificate chain will be printed in debug logging level
Authlib Download Failed
还有一个:
No usable authlib available. Please check your firewall rules and network
connection. Can't start MC without working authlib. Launch button will be
disabled.
需要说明的是,我没有使用防火墙,而且我拥有chmod +x
所有 .jar 文件。我在多个 Minecraft 和 FTB 论坛上搜索过答案,但一无所获。
我认为这些问题可能是相关的,但比我更了解的人可能会证明我错了。
我将非常感激任何帮助。
谢谢!
编辑:一周没有回复后,我几乎放弃了。我仍然不知道该怎么办。
编辑:我已将oracle-java
其删除并替换为open-jdk-8
。现在我收到此错误:Recognized exception: the likely cause is a set of broken/missing root-certificates. Check your java install and perhaps reinstall it.
Unable to download remote file. Check your internet connection/proxy settings.
FATAL ERROR: net.minecraft.bootstrap.FatalBootstrapError: Unable to download while being forced
at net.minecraft.bootstrap.Bootstrap.execute(Bootstrap.java:95)
at net.minecraft.bootstrap.Bootstrap.main(Bootstrap.java:381)
Please fix the error and restart.
我稍微弄了一下,并在jre/lib/security/cacerts
文件中添加了一个证书。这样我取得了一些进展,现在日志如下所示:
[20:58:32 INFO]: Logging in with username & password
[20:58:32 ERROR]: Couldn't log in
com.mojang.authlib.exceptions.AuthenticationUnavailableException: Cannot contact authentication server
at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:71) ~[launcher.jar:1.6.44]
at com.mojang.authlib.yggdrasil.YggdrasilUserAuthentication.logInWithPassword(YggdrasilUserAuthentication.java:74) ~[launcher.jar:1.6.44]
at com.mojang.authlib.yggdrasil.YggdrasilUserAuthentication.logIn(YggdrasilUserAuthentication.java:57) ~[launcher.jar:1.6.44]
at net.minecraft.launcher.ui.popups.login.LogInForm$4.run(LogInForm.java:171) [launcher.jar:1.6.44]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_66-internal]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_66-internal]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_66-internal]
Caused by: 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(Alerts.java:192) ~[?:1.8.0_66-internal]
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) ~[?:1.8.0_66-internal]
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) ~[?:1.8.0_66-internal]
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) ~[?:1.8.0_66-internal]
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509) ~[?:1.8.0_66-internal]
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) ~[?:1.8.0_66-internal]
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979) ~[?:1.8.0_66-internal]
at sun.security.ssl.Handshaker.process_record(Handshaker.java:914) ~[?:1.8.0_66-internal]
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) ~[?:1.8.0_66-internal]
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) ~[?:1.8.0_66-internal]
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) ~[?:1.8.0_66-internal]
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) ~[?:1.8.0_66-internal]
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559) ~[?:1.8.0_66-internal]
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) ~[?:1.8.0_66-internal]
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1283) ~[?:1.8.0_66-internal]
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1258) ~[?:1.8.0_66-internal]
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250) ~[?:1.8.0_66-internal]
at com.mojang.authlib.HttpAuthenticationService.performPostRequest(HttpAuthenticationService.java:73) ~[launcher.jar:1.6.44]
at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:54) ~[launcher.jar:1.6.44]
... 6 more
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(PKIXValidator.java:387) ~[?:1.8.0_66-internal]
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292) ~[?:1.8.0_66-internal]
at sun.security.validator.Validator.validate(Validator.java:260) ~[?:1.8.0_66-internal]
at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324) ~[?:1.8.0_66-internal]
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229) ~[?:1.8.0_66-internal]
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124) ~[?:1.8.0_66-internal]
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491) ~[?:1.8.0_66-internal]
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) ~[?:1.8.0_66-internal]
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979) ~[?:1.8.0_66-internal]
at sun.security.ssl.Handshaker.process_record(Handshaker.java:914) ~[?:1.8.0_66-internal]
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) ~[?:1.8.0_66-internal]
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) ~[?:1.8.0_66-internal]
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) ~[?:1.8.0_66-internal]
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) ~[?:1.8.0_66-internal]
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559) ~[?:1.8.0_66-internal]
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) ~[?:1.8.0_66-internal]
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1283) ~[?:1.8.0_66-internal]
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1258) ~[?:1.8.0_66-internal]
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250) ~[?:1.8.0_66-internal]
at com.mojang.authlib.HttpAuthenticationService.performPostRequest(HttpAuthenticationService.java:73) ~[launcher.jar:1.6.44]
at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:54) ~[launcher.jar:1.6.44]
... 6 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:146) ~[?:1.8.0_66-internal]
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:131) ~[?:1.8.0_66-internal]
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280) ~[?:1.8.0_66-internal]
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382) ~[?:1.8.0_66-internal]
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292) ~[?:1.8.0_66-internal]
at sun.security.validator.Validator.validate(Validator.java:260) ~[?:1.8.0_66-internal]
at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324) ~[?:1.8.0_66-internal]
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229) ~[?:1.8.0_66-internal]
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124) ~[?:1.8.0_66-internal]
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491) ~[?:1.8.0_66-internal]
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) ~[?:1.8.0_66-internal]
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979) ~[?:1.8.0_66-internal]
at sun.security.ssl.Handshaker.process_record(Handshaker.java:914) ~[?:1.8.0_66-internal]
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) ~[?:1.8.0_66-internal]
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) ~[?:1.8.0_66-internal]
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) ~[?:1.8.0_66-internal]
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) ~[?:1.8.0_66-internal]
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559) ~[?:1.8.0_66-internal]
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) ~[?:1.8.0_66-internal]
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1283) ~[?:1.8.0_66-internal]
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1258) ~[?:1.8.0_66-internal]
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250) ~[?:1.8.0_66-internal]
at com.mojang.authlib.HttpAuthenticationService.performPostRequest(HttpAuthenticationService.java:73) ~[launcher.jar:1.6.44]
at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:54) ~[launcher.jar:1.6.44]
... 6 more
对我来说,这仍然看起来像是证书的问题,但说实话,我对这类事情不太了解。感谢您的帮助。我仍然迷茫。有没有人有任何从哪里开始呢?
好的,现在我得到了一些帮助,但我似乎无论如何都无法弄清楚如何做到这一点。我测试了以下版本的 Java:
Oracle Java 8
OpenJRE 8
Oracle Java 9
答案1
经过测试并与 FTB IRC 中的优秀人员合作后,我们成功了。我们做了一些改动(例如将 cacerts 链接到 java 的二进制文件中),但真正解决问题的是这个命令。请看这里 :)
sudo update-ca-certificates --fresh
答案2
答案是第一次就以正确的方式安装 Java,我尝试使用的主机上出现了问题,即使在部分安装之后,情况也是如此,我输入了错误的命令,一切都乱了套。我试图删除 ca-certificates 包,结果导致 Ubuntu 的一半都崩溃了……结果进行了数小时的重新配置,重新安装后,我无法再重现该问题。现在的解决方案是:我建议您删除每个 Java 安装,并手动清理 Java 文件夹。现在您可以安装一个名为 default-jre 的包,这应该可以解决问题。它的作用是安装一个名为 ca-cetficates-java 的包
sudo apt-get install default-jre
The following extra packages will be installed:
ca-certificates-java default-jre-headless fonts-dejavu-extra java-common libatk-wrapper-java libatk-wrapper-java-jni libgif4 libgnomevfs2-0 libgnomevfs2-common libsctp1 lksctp-tools openjdk-7-jre openjdk-7-jre-headless tzdata-java
然后它将带来 minecraft 运行所需的证书!就这么简单。
旧:我有同样的问题,它仍然需要更多的证书,但最新的错误日志没有说它尝试访问哪个站点。解决方案是让 java 接受任何证书。 https://stackoverflow.com/questions/1828775/how-to-handle-invalid-ssl-certificates-with-apache-httpclient
答案3
我遇到了这个问题,但 sudo update-ca-certificates --fresh 无法修复它。事实证明我的 icedtea 版本相对于我的 nss 版本已经过时了。
答案4
我可以通过使用 openjdk-8 而不是 openjdk-11 来解决该错误。要找出您使用的 Java 版本,请java --version
在终端中输入。默认情况下,openjdk-java 安装在/usr/lib/jvm/java-$version-openjdk-$platform
(其中 $version 是版本,例如 8,$platform 是平台,例如 amd64)。如果您在那里找到版本 8,您可以使用以下命令运行启动器/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java -jar FTB_launcher.jar