Unable to connect to authentication servers on debian vps

I am currently hosting a server on a VPS running debian and when I try to connect to the server my client gets an error saying the authentication servers are down, and the server displays an error saying it is unable to connect to the authentication servers. I have checked the status of the servers and Mojang says they are up and running. I suspect it has something to do with the fact it is a vps and i need to add the authentication servers to a file somewhere in the OS to allow the server to connect I am just unsure where and how.
Best Answer
Some folks use VPS servers to try and 'crack' all kinds of authentication servers, including Mojang's. They're not really interested in Minecraft accounts beyond learning of an email / password pair that might work for other (more important) things like gmail.
It's not unlikely that the previous 'owner' of your VMs IP was engaged in those sort of shenanigans, and that Mojang inserted a firewall rule on their side to stop the abuse.
If that is the case:
- Contact Mojang. Tell them you just bought a new VPS and it can't connect to their authentication server.
- Be ready to back up that claim - keep the welcome email the host sent you
- If all fails, try explaining this to your host, and ask for an IP from a different block
SSH to the VM first and try pinging / traceroute to the auth server, include this information when you contact Mojang.
When you get a shiny new VM, you also (unfortunately) inherit all of the bad behavior that might have been coming from the IP it was assigned - once in a while you have to play the it ain't me game to get stuff working again.
Pictures about "Unable to connect to authentication servers on debian vps"



How do I fix the authentication server may not be available?
In some cases, the error is displayed when the internet cache that has been built up by the router is corrupted and it prevents the user from establishing a secure connection with the servers. This error can also cause the connection to timeout.FIX Unable to Add Server | Authentication Server Could Not Be Contacted | Host Not Found | karkiGeek
More answers regarding unable to connect to authentication servers on debian vps
Answer 2
I had a similar issues.
The problem with all the fixes i found was that I installed Minecraft via snap. sudo snap install minecraft
and because snaps are self contained the java on my machine did not effected it.
What fixed it for me was installing the old launcher instead.
- Remove snap version
sudo snap remove minecraft
- completely remove java 10 ( If Installed )
- Install Minecraft Via curl Script
Answer 3
I've had this issue before, turned out that whilst I'd created iptables rules to allow incoming connections to ports that the server used for the game, I hadn't allowed established/related connections coming back from the authentication servers.
If you are using iptables, you might want to check you have this rule on your input chain.
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
Check if you have any iptables rules using the command iptables -L
If this helps, these are my iptables rules (as seen by the command iptables -L
), basically, it firewalls off all incoming connections apart from SSH (used to manage the server), http as I run a web server on the system, then I allow 25565 (Minecraft) and 25575 (rcon), and any other incoming traffic on the local network (192.168.1.0/24). I place no restrictions on traffic being output from the system, and note that I also allow all ICMP traffic through, which isn't essential, but it could cause problems if you block it.
root@mc:~# iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT tcp -- anywhere anywhere tcp dpt:25565
ACCEPT tcp -- anywhere anywhere tcp dpt:25575
ACCEPT all -- 192.168.1.0/24 anywhere
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Answer 4
I'm not sure if you are still having this issue, but I finally found a solution that works for me. Along with making sure the iptables rules suggested earlier are in place, I had to add two java command line arguments.
-Djava.net.preferIPv4Stack=true -Djava.net.prferIPv6Addresses=false
After adding those in my java execution line, I was able to connect to my minecraft server running on my debian vps.
Answer 5
I had this problem on a new Digital Ocean box running Ubuntu 18.04 and tried a lot of things, but these steps finally fixed it.
Ensure you can access the following URLs from your box using ping, curl, wget etc.
- minecraft.net
- account.mojang.com (note, this will give you a 403 by default)
- authserver.mojang.com
- skins.minecraft.net
- textures.minecraft.net
If you cannot, look at Tim Post's answer, if you can connect, continue.
Completely remove the currently installed version of Java from the box. There are complete answers online as to how to do that.
apt-get install openjdk-8-jdk
. (I had java 10 installed fromapt-get install default-jre
and nothing I did would make that work.)update-ca-certificates -f
Run the commands from this script
/usr/bin/printf '\xfe\xed\xfe\xed\x00\x00\x00\x02\x00\x00\x00\x00\xe2\x68\x6e\x45\xfb\x43\xdf\xa4\xd9\x92\xdd\x41\xce\xb6\xb2\x1c\x63\x30\xd7\x92' > /etc/ssl/certs/java/cacerts
/var/lib/dpkg/info/ca-certificates-java.postinst configure
reboot
Success!
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Brett Sayles, Pixabay, Pixabay, Pixabay