Mojira Archive
MC-213034

Minecraft does not query for SRV records when client has static IP on LAN, resulting in a "Can't connect to server" message

Minecraft does not query for SRV records when the client machine has static IP on its local network (typical LAN), not using DHCP.
As a result there is displayed the standard message "Can't connect to server" and I can't play on the server.

I observed this on versions 1.16.5 and 1.16.3, but it looks like earlier versions also may be affected.

In my case I configured the static IP as a Preferred IP on the client-side, because I have no access to the router to try configure the static IP on the router-side and then use DHCP on the client-side. (This is not so unusual situation: we want to use static IPs on the LAN but the router is leased from ISP and also managed by ISP.)

I sniffed the DNS packets using Wireshark and found that only A queries were made when the client had static IP.
As an example Minecraft server I used cubesurv.pl, which is real & working server, but available only by using SRV record.
I attached 4 TEXT files containing sniffed DNS packets:
=> 2 "LAN-cable-*.txt" files show tests on a cable-LAN,
=> 2 "Mobile-Hotspot-*.txt" files show tests on a mobile hotspot (prepared from my phone).

For comparison there are included sniffed DNS packets for static IP (faulty) and DHCP (work as expected).

I hope the files show everything in details, so there is no need to describe the faulty behavior.

I would only like to point something in "Mobile-Hotspot-*.txt" that seems to be a strange or not clear.
The config for the mobile-hotspot network was following:

  • IP/subnet: 192.168.43.xxx/24
  • DNS server: 192.168.43.1

"Mobile-Hotspot-DHCP.txt" shows that there were made 2 SRV queries: into 192.168.1.1 and 192.168.43.1 .
"Mobile-Hotspot-Static-IP.txt" shows that there was made 1 SRV query: into 192.168.1.1 .

Query to DNS IP = 192.168.1.1 is faulty of course, because (in mobile-hotspot config) the network 192.168.1.xxx/24 does not exist in the system at all.
So I would like also ask for explanation why MC does query to 192.168.1.1 DNS server ?
Does MC assume this IP as a "default" or "always worth a try" address ?

 

Cannot Reproduce

Tom MCT

2021-01-27, 04:02 AM

2021-09-12, 08:22 PM

2021-09-12, 02:58 AM

1

3

Unconfirmed

Networking

DNS, srv-record

1.16.5

-