Skip to main content
infoServer ErrorsAffects: Java Edition servers

How to Fix Query Port Error

Query answers server info requests over UDP when enable-query is on. Why it can't start on its port, and why the in-game server list doesn't need it.

Quick Fix

Give query.port a UDP port nothing else uses, between 1 and 65535, and allow that UDP port through the firewall. Leave enable-query=false if no tool needs it.

Error Message

Unable to initialise query system on 0.0.0.0:25565

How to Fix

1

Set enable-query=true and choose a query.port that no other program uses, then restart.

2

Running several servers on one machine? Give each one its own query.port.

3

Leave server-ip empty unless the machine really has that address.

4

Open the query port for UDP, not TCP, in the firewall and in your host's panel.

5

Look for Query running on in the log to confirm it started.

6

The multiplayer server list doesn't use query. It sends a status request over the normal TCP game port.

Common Causes

  • Another program already uses that UDP port. query.port is 25565 by default whatever server-port says, so two servers with query enabled on one machine collide.
  • server-ip is set to an address this machine doesn't have. Query binds to server-ip when it is set, so the socket can't open.
  • query.port is outside 1 to 65535. The server logs Invalid query port found in server.properties (queries disabled) and starts without query.
  • A firewall blocks UDP on the query port, so tools time out even though the log says Query running on.

Diagnostic Steps

  1. Check enable-query and query.port in server.properties.
  2. Search the log for Query running on or Unable to initialise query system.
  3. Pick a free UDP port if it failed.
  4. Open that UDP port in the firewall and restart.

FAQ

Do I need query enabled?

Only for tools that read server details through the query protocol, such as some server lists and monitoring scripts. Players can see and join the server without it.

Is query TCP or UDP?

UDP. The game itself uses TCP, so query and the game can both use port 25565 without clashing.

What is the default query port?

25565. Changing server-port doesn't move it, so set query.port yourself when more than one server runs on the machine.

Related Errors

Need More Help?