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.


Solution 1:

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.

Solution 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.

  1. Remove snap version sudo snap remove minecraft
  2. completely remove java 10 ( If Installed )
  3. Install Minecraft Via curl Script

Solution 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

Solution 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.