15

Im using Ubuntu 15.04 and OpenJDK 7, trying to run Minecraft. This is what I get.

EDIT: Minecraft is working now when I use sudo java -jar Minecraft.jar but doesn't work without super user, how would I fix this! The reason i can't run it as super user all the time is because i want to be able to run by double-clicking it on desktop.

Downloading: https://s3.amazonaws.com/Minecraft.Download/launcher/launcher.pack.lzma (try 4/10)
Exception: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

When running it. I have tried using OpenJDK 8 and it did this as well, also I have tried Oracle's java 8.

Minecraft worked fine on my old 14.04 laptop using OpenJDK 7.

EDIT 2: Now after getting SSL exception, it starts the launcher and says Play Offline, so I went to "launcher log" tab and i get this (Sorry Its not in code format because I cant get that to work please edit that!):

[16:46:39 INFO]: Minecraft Launcher 1.6.11 (through bootstrap 5) started on linux...
[16:46:39 INFO]: Current time is May 25, 2015 4:46:39 PM
[16:46:39 INFO]: System.getProperty('os.name') == 'Linux'
[16:46:39 INFO]: System.getProperty('os.version') == '3.19.0-18-lowlatency'
[16:46:39 INFO]: System.getProperty('os.arch') == 'amd64'
[16:46:39 INFO]: System.getProperty('java.version') == '1.8.0_45-internal'
[16:46:39 INFO]: System.getProperty('java.vendor') == 'Oracle Corporation'
[16:46:39 INFO]: System.getProperty('sun.arch.data.model') == '64'
[16:46:39 INFO]: proxy == DIRECT
[16:46:39 INFO]: Refreshing local version list...
[16:46:39 INFO]: Refreshing remote version list...
[16:46:39 ERROR]: Unexpected exception refreshing version list
javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1937) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1894) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1877) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1398) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1375) ~[?:1.8.0_45-internal]
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563) ~[?:1.8.0_45-internal]
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) ~[?:1.8.0_45-internal]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1512) ~[?:1.8.0_45-internal]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440) ~[?:1.8.0_45-internal]
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254) ~[?:1.8.0_45-internal]
    at com.mojang.launcher.Http.performGet(Http.java:54) ~[launcher.jar:1.6.11]
    at net.minecraft.launcher.updater.RemoteVersionList.getContent(RemoteVersionList.java:27) ~[launcher.jar:1.6.11]
    at net.minecraft.launcher.updater.VersionList.refreshVersions(VersionList.java:85) ~[launcher.jar:1.6.11]
    at net.minecraft.launcher.updater.MinecraftVersionManager.refreshVersions(MinecraftVersionManager.java:60) ~[launcher.jar:1.6.11]
    at net.minecraft.launcher.Launcher$2.run(Launcher.java:132) [launcher.jar:1.6.11]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_45-internal]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_45-internal]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_45-internal]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_45-internal]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45-internal]
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:90) ~[?:1.8.0_45-internal]
    at sun.security.validator.Validator.getInstance(Validator.java:179) ~[?:1.8.0_45-internal]
    at sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:312) ~[?:1.8.0_45-internal]
    at sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(X509TrustManagerImpl.java:171) ~[?:1.8.0_45-internal]
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:184) ~[?:1.8.0_45-internal]
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124) ~[?:1.8.0_45-internal]
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1460) ~[?:1.8.0_45-internal]
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:212) ~[?:1.8.0_45-internal]
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979) ~[?:1.8.0_45-internal]
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:914) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1050) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1363) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1391) ~[?:1.8.0_45-internal]
    ... 16 more
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200) ~[?:1.8.0_45-internal]
    at java.security.cert.PKIXParameters.<init>(PKIXParameters.java:120) ~[?:1.8.0_45-internal]
    at java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:104) ~[?:1.8.0_45-internal]
    at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:88) ~[?:1.8.0_45-internal]
    at sun.security.validator.Validator.getInstance(Validator.java:179) ~[?:1.8.0_45-internal]
    at sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:312) ~[?:1.8.0_45-internal]
    at sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(X509TrustManagerImpl.java:171) ~[?:1.8.0_45-internal]
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:184) ~[?:1.8.0_45-internal]
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124) ~[?:1.8.0_45-internal]
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1460) ~[?:1.8.0_45-internal]
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:212) ~[?:1.8.0_45-internal]
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979) ~[?:1.8.0_45-internal]
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:914) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1050) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1363) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1391) ~[?:1.8.0_45-internal]
    ... 16 more
[16:46:40 INFO]: Loaded 2 profile(s); selected 'AsherMaster'
[16:46:40 INFO]: Refreshing auth...
[16:46:40 INFO]: Logging in with access token
[16:46:40 ERROR]: Exception whilst logging into profile
com.mojang.authlib.exceptions.AuthenticationUnavailableException: Cannot contact authentication server
    at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:71) ~[launcher.jar:1.6.11]
    at com.mojang.authlib.yggdrasil.YggdrasilUserAuthentication.logInWithToken(YggdrasilUserAuthentication.java:132) ~[launcher.jar:1.6.11]
    at com.mojang.authlib.yggdrasil.YggdrasilUserAuthentication.logIn(YggdrasilUserAuthentication.java:55) ~[launcher.jar:1.6.11]
    at net.minecraft.launcher.Launcher.ensureLoggedIn(Launcher.java:214) [launcher.jar:1.6.11]
    at net.minecraft.launcher.Launcher$2.run(Launcher.java:168) [launcher.jar:1.6.11]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_45-internal]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_45-internal]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_45-internal]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_45-internal]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45-internal]
Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1937) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1894) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1877) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1398) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1375) ~[?:1.8.0_45-internal]
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563) ~[?:1.8.0_45-internal]
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) ~[?:1.8.0_45-internal]
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1282) ~[?:1.8.0_45-internal]
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1257) ~[?:1.8.0_45-internal]
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250) ~[?:1.8.0_45-internal]
    at com.mojang.authlib.HttpAuthenticationService.performPostRequest(HttpAuthenticationService.java:73) ~[launcher.jar:1.6.11]
    at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:54) ~[launcher.jar:1.6.11]
    ... 9 more
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:90) ~[?:1.8.0_45-internal]
    at sun.security.validator.Validator.getInstance(Validator.java:179) ~[?:1.8.0_45-internal]
    at sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:312) ~[?:1.8.0_45-internal]
    at sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(X509TrustManagerImpl.java:171) ~[?:1.8.0_45-internal]
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:184) ~[?:1.8.0_45-internal]
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124) ~[?:1.8.0_45-internal]
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1460) ~[?:1.8.0_45-internal]
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:212) ~[?:1.8.0_45-internal]
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979) ~[?:1.8.0_45-internal]
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:914) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1050) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1363) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1391) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1375) ~[?:1.8.0_45-internal]
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563) ~[?:1.8.0_45-internal]
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) ~[?:1.8.0_45-internal]
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1282) ~[?:1.8.0_45-internal]
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1257) ~[?:1.8.0_45-internal]
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250) ~[?:1.8.0_45-internal]
    at com.mojang.authlib.HttpAuthenticationService.performPostRequest(HttpAuthenticationService.java:73) ~[launcher.jar:1.6.11]
    at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:54) ~[launcher.jar:1.6.11]
    ... 9 more
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
    at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200) ~[?:1.8.0_45-internal]
    at java.security.cert.PKIXParameters.<init>(PKIXParameters.java:120) ~[?:1.8.0_45-internal]
    at java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:104) ~[?:1.8.0_45-internal]
    at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:88) ~[?:1.8.0_45-internal]
    at sun.security.validator.Validator.getInstance(Validator.java:179) ~[?:1.8.0_45-internal]
    at sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:312) ~[?:1.8.0_45-internal]
    at sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(X509TrustManagerImpl.java:171) ~[?:1.8.0_45-internal]
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:184) ~[?:1.8.0_45-internal]
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124) ~[?:1.8.0_45-internal]
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1460) ~[?:1.8.0_45-internal]
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:212) ~[?:1.8.0_45-internal]
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979) ~[?:1.8.0_45-internal]
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:914) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1050) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1363) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1391) ~[?:1.8.0_45-internal]
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1375) ~[?:1.8.0_45-internal]
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563) ~[?:1.8.0_45-internal]
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) ~[?:1.8.0_45-internal]
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1282) ~[?:1.8.0_45-internal]
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1257) ~[?:1.8.0_45-internal]
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250) ~[?:1.8.0_45-internal]
    at com.mojang.authlib.HttpAuthenticationService.performPostRequest(HttpAuthenticationService.java:73) ~[launcher.jar:1.6.11]
    at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:54) ~[launcher.jar:1.6.11]
    ... 9 more
  • Yes, please. I need the whole message. – A.B. May 24 '15 at 5:51
  • Please go into your Minecraft Launcher and open the Launcher Log Tab. Copy all messages, edit your question and add these messages. – A.B. May 25 '15 at 19:26
  • As superuser? That's a really bad idea. – A.B. May 25 '15 at 20:22
  • Move the folder and correct the permissions. – A.B. May 25 '15 at 20:24
  • Open a terminal and fire the command: sudo mv /root/.minecraft ~/.minecraft. And the command sudo chown -R $USER:$USER ~/.minecraft – A.B. May 25 '15 at 20:31
34

Actually, a better answer is to enter the following at the command prompt.

sudo update-ca-certificates -f
  • thx, it helped me too =) – Alexander Logger Nov 2 '15 at 12:56
  • 1
    this also helped to fix my maven setup on 15.10 – Kalle Nov 29 '15 at 12:08
  • That was the fix for me as well... Been searching for a minute. Thanks! – Philip May 16 '16 at 16:43
  • This helped me as well, I installed OpenJDK8 on ubuntu server (wily) and was trying to run a java application that uses OAuth for twitter, and was getting this error , and was very confused since ca-certificates-java was installed already. After running this, everything worked fine! – mgrandi Jun 22 '16 at 20:03
  • I can also confirm this worked for me also. I was getting this error just trying to read podcast URLs from a RackSpace hosted instance, and this command fixed it. – Clay Ferguson Nov 24 '16 at 19:09
5

Open a terminal and fire this command:

sudo apt-get install --reinstall ca-certificates-java

And make sure that the time setting of your system is correct.

Source

I quote:

Basically, Minecraft uses SSL to protect your login, but Java didn’t have the certificates needed to verify. The Minecraft launcher really should give a better error message, but this was really Ubuntu’s fault. You need the ca-certificates-java package installed, but on my Ubuntu install, it was broken. Try doing ls /etc/ssl/certs/java/cacerts. If it comes up missing, then you need copy it from a friend or a different Unix machine. You don’t want to copy security files from strangers…

  • Same error message after trying this, is my "Time Setting" just the system time because that is right. Also doing ls /etc/ssl/certs/java/cacerts isnt missing – ashermaster May 24 '15 at 2:36
3

I finally found a solution after none of the others worked for me. At the bottom of this bug report, I found this magical series of commands:

sudo dpkg --purge --force-depends ca-certificates-java

And then:

sudo apt-get install ca-certificates-java

This instantly solved the problem for me.

  • 1
    This worked for me on Kubuntu 18.04. – Brandon Jun 23 '18 at 16:18
1

I just solved it! Here is how to fix all SSL errors in Minecraft.

  1. You need another Linux computer's "cacerts" file, so on another Linux PC run this command:

    readlink -f /usr/bin/java | sed "s:bin/java::"
    

    and go to that path (Something like /usr/lib/jvm/java-8-openjdk-amd64/jre/).

  2. Open the "lib" folder, then open the "security" folder.
  3. Copy the "cacerts" file.
  4. Run the command again on your computer and go to that path:

    readlink -f /usr/bin/java | sed "s:bin/java::"
    
    • If you are having trouble editing things, you need to open "Files" using sudo -H nautilus.
  5. Open "lib" and then "security" again.
  6. Replace the "cacerts" file with the file from the other PC.

If you can't find the "cacerts" file on another PC, check this path for it /etc/ssl/certs/java/ and you should see cacerts. I can't guarantee this working though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.