PvP Server Kiralama & Oyun Sunucuları
0 Giriş Yap Kayıt Ol

How to Solve Minecraft Cannot Connect to Server Error? Port, IP and Firewall Guide

Yazdır

How to Solve Minecraft Cannot Connect to Server Error?

Step by step guide for connection refused, timed out, port, IP and firewall problems.

One of the most common problems on Minecraft servers is that players cannot connect to the server. The player adds the IP address to the server list, but the connection is not established, Connection refused, Timed out, Can't connect to server or Unknown host You may get errors like:

This error is not always caused by Minecraft files. The IP address, port, firewall, server.properties, DNS routing, hosting panel, Java process or whether the server is actually working should be checked together.

Simple explanation: In order for the player to enter the server, the Minecraft server must be open, it must listen to the correct port, and the firewall must allow external connections. If one link of this chain is broken, the connection cannot be established.

1. Separate the Error Message Correctly

Minecraft connection errors do not all mean the same thing. First of all, the error message the player receives must be read correctly.

  • Connection refused: The IP may be reachable, but there is no service running on the target port or the connection is rejected.
  • Timed out: The connection request is sent but no response is returned. There may be a firewall, network or port forwarding problem.
  • Unknown host: The Domain/SRV record cannot be resolved or the IP/domain is misspelled.
  • Can't connect to server: It is a general connection problem; IP, port, server status and version compatibility should be checked.
  • Outdated server/client: Player and server Minecraft version are incompatible.

2. Does Minecraft Server Really Work?

The first check is whether the server is active or not. If the server is down, the player cannot connect even if the port is open.

screen -ls
ps aux | grep java

If running with systemd service:

systemctl status minecraft

If a line like this appears in the console, it means that the server has started listening on the port:

Done! For help, type "help"

If the server shuts down while starting, the console output and log files should be examined first.

3. server.properties Port Setting

Which port the Minecraft server will run on? server.properties in the file server-port determines the value.

nano server.properties

The line to check is:

server-port=25565

Default Minecraft Java port 25565 It is used as. If you have specified a different port, players must write the port as well as the IP.

SUNUCU_IP:25565
Important: If more than one Minecraft server is running on the same machine, each server must use a different port. Two servers cannot use the same port.

4. Should the server-ip field be left blank?

in server.properties server-ip line should be left blank in most cases.

server-ip=

If this field is filled with the wrong IP, the server may not listen to the port correctly or may only work through a specific interface.

General advice in hosting environments:

  • On standard servers with a single IP, server-ip is left blank.
  • Conscious configuration is made in a multi-IP or private network structure.
  • If the wrong IP is typed, connection refused or bind error may occur.

5. Is the Port Really Listening?

Even if the Minecraft server appears to be open, it should be checked whether the port is listened to.

ss -tulpn | grep 25565

If there is no output, it means the Minecraft server is not listening to that port. In this case, server.properties, console errors or Java process should be checked.

Example expected output logic:

LISTEN 0  128  0.0.0.0:25565  0.0.0.0:*  users:(("java",pid=1234))

6. Firewall Port Permission

Even if the server port is listening, players cannot connect if the firewall blocks the external connection.

On Ubuntu/Debian systems using UFW:

ufw allow 25565/tcp
ufw reload
ufw status

On CentOS/AlmaLinux/Rocky Linux systems using Firewalld:

firewall-cmd --permanent --add-port=25565/tcp
firewall-cmd --reload
firewall-cmd --list-ports

If there is an additional firewall on the hosting panel or provider side, port permission must also be granted through the panel.

7. If You Are Using Domain or SRV Record

If players connect via domain instead of IP, DNS records must be correct.

  • A record: It directs the domain to the server IP address.
  • SRV record: Provides redirection to custom Minecraft port without typing port.
  • DNS propagation: New registrations may not be active in almost every location.

If player Unknown host If you receive an error, the domain may be misspelled, the DNS record is missing, or it may not be propagated yet.

8. Minecraft Version Compatibility

If the connection is established but the player is kicked out at login, the client and server versions may be incompatible. For example, if the player tries to log in with 1.21 while the server is 1.20.1, he may receive an error.

Solution:

  • Announce the server version clearly to players.
  • If compatibility plugins such as ViaVersion are used, configure them correctly.
  • On modded servers, the client mod package and server mod package must be the same.

Common Mistakes

  • Thinking it's a port problem when the server is down
  • Writing the wrong IP in the server-ip field
  • Not granting port permission when firewall is on
  • Giving missing port information to players
  • Performing a connection test without logging into the domain DNS record
  • Trying to run two Minecraft servers on the same port

FAQ

What does the connection refused error mean?
Usually there is no service running on the target port, the Minecraft server is down, or the port is not listening properly.

What causes a timed out error?
The connection may be missed due to firewall, network block, wrong IP, closed port or security rule on the provider side.

I can't connect with domain but I can connect with IP, why?
The DNS or SRV record may be incorrect. The domain may not be pointing to the correct IP.

Safety and Operations Recommendations

  • Just open the necessary Minecraft ports to the outside world.
  • Do not leave panel, SSH and database ports open to the public.
  • Write the correct IP, port and version information to the players.
  • If you are using more than one server, create a port plan.
  • When receiving connection issue notifications, ask for the error message, player version, and the address it is connecting to.

This article is specially prepared for PvPServer.

Bu cevap yeterince yardımcı oldu mu?

Oyla

overlay spinner