"Connection refused" on a Minecraft server, the full diagnostic tree

Apr 29, 20266 min read#troubleshooting#minecraft

"Connection refused" on a Minecraft server, the full diagnostic tree

"Connection refused" is the most common error message that means something specific. It tells you: the network reached the host, but the host refused the connection. Different from "no route to host" (couldn't reach the host at all) or "timeout" (host didn't respond).

This article is the systematic diagnosis. Most cases resolve at step 1 or 2.

What "connection refused" actually means

Technically: a TCP connection was attempted, the host received the request, and replied with a TCP RST (reset) packet, refusing it.

Causes, broadly:

  1. The server isn't running.
  2. The server is running but listening on a different port.
  3. A firewall is rejecting the connection.
  4. Something else is using the port.

The full diagnostic tree

No

Yes

No

Yes

No

Yes

Yes

No

Yes

No

Connection refused

Can the host be reached at all?
ping host.com

DNS problem, host outage,
or wrong address

Server process running?
Check panel

Start it.
If it fails to boot, fix that

Listening on the right port?
ss -tlnp grep java

Port mismatch.
Fix server.properties or panel config

Firewall blocking?
ufw status, iptables -L

Open the port

Player's network broken?
Test from another network

Player-side: ISP, router, VPN

Host-side: contact support
or check status page

Step 1: is the server actually running?

The obvious step. People skip it.

Check your hosting panel. Is the server in "running" status?

If running: server process is alive. Skip to step 2.

If not running: start it. Watch the boot log. If it fails to boot, the error message tells you why (out of memory, corrupted world, plugin error). Address that.

Most "connection refused" tickets resolve here.

Step 2: is the server listening on the right port?

Even a running server has to be listening on a specific port. Check:

In server.properties:

server-port=25565

In your panel: the displayed connection address shows the port (e.g., play.myserver.com:25577).

From the server's terminal:

sudo ss -tlnp | grep java

You should see a line for your Minecraft port.

If the server is running but not listening: it failed to bind to the port. Check the boot log for "Address already in use" or "Permission denied."

If the server is listening on a different port: your players are connecting to the wrong one.

Step 3: are players connecting to the right address?

Sometimes "connection refused" is because the player tried play.myserver.com:25565 but the server's actually on :25577.

Confirm:

  • The address you've given players.
  • The address the server is actually on.

Match them.

For custom domains with SRV records, players type the friendly hostname. If the SRV record is wrong or missing, players hit the default port (25565), which may not be where your server is.

Test the SRV:

dig _minecraft._tcp.play.myserver.com SRV

Should show your real port.

Step 4: is a firewall blocking the connection?

Firewalls can block connections. Either the server's firewall or a network firewall upstream.

On the server (Linux):

sudo iptables -L -n
sudo ufw status

Look for rules that would block your port.

On the host's network panel: Most paid hosts expose a firewall configuration in the panel. Confirm the port is open.

ISP-level blocks: Rare, but some ISPs block residential hosting on common ports. If you're self-hosting and players from one ISP can't connect, this might be it.

Step 5: is something else using the port?

If you have two Minecraft instances on the same machine and both tried port 25565, only one wins. The other gets "Address already in use" at boot.

sudo lsof -i :25565

Shows what process has port 25565.

If wrong process: stop it. Or change your server's port.

Step 6: is the player's network broken?

Less common but worth checking.

The player tries from a different network (mobile data, a friend's house). If it works there, their home network has something wrong:

  • ISP DNS broken.
  • Their router rejecting outbound connections.
  • VPN or proxy interfering.

If it fails everywhere: server side.

Step 7: is the host having a regional outage?

Some hosts have specific incidents. Check the host's status page. Sometimes "connection refused" is because the host's network is broken in a way they're aware of.

If the host is down: nothing for you to do except wait.

Step 8: is the world / save preventing boot?

If the server tries to boot but immediately crashes during world load, the process exits and connections get refused.

Check the latest log:

tail -100 logs/latest.log

Look for the actual error. Common: corrupted world, missing mod, OOM during chunk load.

Address the underlying issue (restore backup, fix mod, raise RAM).

Step 9: protocol version mismatch?

If a player tries to connect with a different Minecraft version, the server may refuse with a specific message ("Outdated client" or "Outdated server").

This isn't "connection refused" exactly, but sometimes shows up as a related error. Confirm versions match.

Step 10: rate limiting or DDoS

A common scenario: server is being attacked. Connections are dropped or refused due to flood protection.

Symptoms:

  • Players intermittently get connection refused.
  • Server log shows many connection attempts.
  • Network traffic in the panel is high without obvious player count.

Address: see the DDoS article.

Common quick fixes

Pattern Likely cause
Panel shows running but players can't connect Process hung. Restart through the panel.
Started failing this morning, fine yesterday Host network change or overnight config change
One specific player can't, everyone else can Their network / client
Just added a mod / plugin and won't accept clients Mod is broken or version-mismatched

Specific gotchas

Plugin firewall rules.

Some plugins (anti-cheat, bot protection) implement their own connection filtering. Misconfigured, they reject legitimate players. Check plugin config.

Whitelist with online-mode mismatch.

Server is set to online-mode=true but the whitelist has names that aren't validly authenticated Mojang accounts. New players get "Failed to verify username." Sometimes appears as connection issues.

Wrong MC version after upgrade.

You upgraded the server but the client lists still point to the old version. Players' clients need updating.

The "magic" port 25565.

Minecraft's default. If players type just the hostname without a port, the client tries 25565 (and SRV-resolves). If your server is on a non-default port and SRV is broken, players are off in the wrong place.

When to escalate

If you've worked through this list and still can't figure it out:

  1. Read the recent server log. Sometimes the answer is in plain text.
  2. Contact your host's support. Give them the times this happens, error messages, what you've tried.
  3. Ask in your community's relevant Discord. Other admins have seen most weirdness.

Don't keep restarting and hoping. Each cycle without diagnosis is wasted.

Conclusion

"Connection refused" is specific enough to diagnose quickly with the right tree. Most cases are server-down, wrong-port, or firewall. Run through the steps; you'll find it.

The single most useful tool: actually reading the server's boot log. Half the time the answer is sitting there in plain English.


Hosting your game server with AndroHost means we handle most of what's in this post for you automatically: tier sizing, SRV records, off-site backups, DDoS protection.

Browse plans·More posts·Discord