Difference between revisions of "Minecraft can't find server on local LAN"

From Exterior Memory
Jump to: navigation, search
 
Line 6: Line 6:
  
 
;Steps to fix:
 
;Steps to fix:
1. Quit Minecraft and open the Minecraft Launcher
+
# Quit Minecraft and open the Minecraft Launcher
2. Select the Minecraft "Installations" tab.
+
# Select the Minecraft "Installations" tab.
3. Edit the installation that you are normally playing
+
# Edit the installation that you are normally playing
4. Select "More options"
+
# Select "More options"
5. At the "JVM arguments" append the text ` -Djava.net.preferIPv4Stack=true`. In my case, the whole line now reads `-Xmx4G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn256M -Djava.net.preferIPv4Stack=true`
+
# At the "JVM arguments" append the text ` -Djava.net.preferIPv4Stack=true`. In my case, the whole line now reads `-Xmx4G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn256M -Djava.net.preferIPv4Stack=true`
6. Save and start Minecraft.
+
# Save and start Minecraft.
  
 
{{Category:Bug Reports}}
 
{{Category:Bug Reports}}

Latest revision as of 17:18, 8 September 2019

Problem
A minecraft server is running on the local network, but the Minecraft client can't find server on the local LAN.
Cause
on MacOS, Java uses IPv6 by default for service discovery, but the server is only announced over IPv4.
Solution
Force Java on the client to prefer IPv4.
Steps to fix
  1. Quit Minecraft and open the Minecraft Launcher
  2. Select the Minecraft "Installations" tab.
  3. Edit the installation that you are normally playing
  4. Select "More options"
  5. At the "JVM arguments" append the text ` -Djava.net.preferIPv4Stack=true`. In my case, the whole line now reads `-Xmx4G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn256M -Djava.net.preferIPv4Stack=true`
  6. Save and start Minecraft.

The pages list specific bug reports. I try to keep this category empty by reporting bugs directly to the developers database.

For example:

See Template:Categories for a hierarchical list of all categories or Special:Categories for an automatically generated list.