Jump to content

Troubleshooting login errors in Forge


Paint_Ninja

Recommended Posts

If you're having trouble with joining servers or sharing to LAN, this thread should help by providing some solutions for common causes. This is my first time writing a comprehensive troubleshooting guide on this forum so if you have any feedback please let me know. :)

 

1. Hosts file

What's a hosts file and why should I care?

Spoiler

When connecting to a server, it needs to lookup the IP address for the domain name using DNS. You can think of this like looking up the phone number of a company. Before using DNS, your OS (Windows, macOS, whatever) first checks the hosts file, which contains overrides. Some apps use this file to block websites and connections to servers.

How do I fix it?

Spoiler

On Windows, there's two ways:

1a. Hosts File Editor

Step 1: Install Microsoft PowerToys if you haven't already

Step 2: Run PowerToys and look for the "Hosts File Editor" on the left and click the launch option

Step 3: Switch off entries mentioning Mojang or Minecraft

Step 4: Switch off entries containing the IP 127.0.0.1, ::1, fe80, 0.0.0.0, ::0 or similar.

Step 5: Close the editor and restart your PC. You can uninstall PowerToys if you don't need it anymore.

More info on the hosts file editor can be found here: https://learn.microsoft.com/en-gb/windows/powertoys/hosts-file-editor

 

1b. Notepad

Step 1: Press Win + R to open the run prompt

Step 2: Paste this in and press enter: `powershell "Start-Process Notepad -Verb runAs -ArgumentList "$env:windir\system32\drivers\etc\hosts""`

Step 3: Make a copy of the entire thing before making any changes, so that you can restore the backup if needed

Step 4: Add a # to the start of lines mentioning Mojang or Minecraft

Step 5: Add a # to the start of lines with the IP 127.0.0.1, ::1, fe80, 0.0.0.0, ::0 or similar.

Step 6: Press Ctrl + S to save and restart your PC.

How do I know if this worked?

Repeat the steps above and check if the changes you made to the file have applied.


 

2. DNS

What's DNS and why should I care?

Spoiler

When connecting to a server, it needs to lookup the IP address for the domain name using DNS. You can think of this like looking up the phone number of a company. If your DNS is broken, slow or unreliable, it may cause problems connecting to servers and slow down web browsing.

How do I fix it?

Spoiler

Manually change your DNS to Cloudflare's, which has a good reputation for performance and reliability. To do this on Windows 11, there's two main ways:

 

2a. Windows 11 Settings app

 

Step 1: Open the Settings app and click the "Network & Internet" tab

Step 2: Click "Properties" at the top

Step 3: Beside "DNS server assignment", click edit and change to manual

Step 4: Switch on both IPv4 and IPv6

Step 5: Enter the following settings for IPv4:

 

Preferred DNS

IP: 1.1.1.2

DNS over HTTPS: On (manual template)

DNS over HTTPS template: https://security.cloudflare-dns.com/dns-query

Fall-back to plaintext: On

 

Alternative DNS

IP: 1.0.0.2

DNS over HTTPS: Off

 

Step 6: Enter the following settings for IPv6:

 

Preferred DNS

IP: 2606:4700:4700::1112

DNS over HTTPS: On (manual template)

DNS over HTTPS template: https://security.cloudflare-dns.com/dns-query

Fall-back to plaintext: On

 

Alternative DNS

IP: 2606:4700:4700::1002

DNS over HTTPS: Off

 

Step 6: Click save and restart your PC.

 

It's important you do both IPv4 and IPv6, as if one is invalid it will cause issues.

 

2b. Control Panel Network and Sharing Centre

 

Step 1: Press Start, search for "Control Panel" and open it

Step 2: Click "Network and Internet" and then "Network and Sharing Centre"

Step 3: On the right, click the link next to "Connections:" then click "Properties"

Step 4: Click "Internet Protocol Version 4 (TCP/IPv4)" and click "Properties"

Step 5: Click "Use the following DNS server addresses" and enter the following addresses:

 

Preferred DNS server: 1.1.1.2

Alternate DNS server: 1.0.0.2

 

Step 6: Click OK then "Internet Protocol Version 6 (TCP/IPv6)" and "Properties"

Step 7: Click "Use the following DNS server addresses" and enter the following addresses:

 

Preferred DNS server: 2606:4700:4700::1112

Alternate DNS server: 2606:4700:4700::1002

 

Step 8: Click OK on the remaining windows and restart your PC.

 

It's important you do both IPv4 and IPv6, as if one is invalid it will cause issues.

How do I know if this worked?

Go to https://1.1.1.1/help and it should say you're connected to 1.1.1.1.

If it doesn't, open PowerShell, run `Clear-DnsClientCache`, reboot and try again.


 

3. Firewall

What's a firewall and why should I care?

Spoiler

A firewall controls what can and can't connect to your computer. If it's setup incorrectly, it might block connections in a way that breaks the connection test when joining a server.

How do I fix it?

Spoiler

This info is mainly useful for server owners. Most users won't need to do anything here unless they've explicitly configured their firewall to block certain traffic.

I can't give you detailed instructions as there's too many different ones. A general rule of thumb is if you know you've currently configured your firewall to block certain traffic, make sure you always do both directions - that is, both incoming and outgoing.

 

 

4. Launchers and Java

Why would this matter and how do I fix it?

Spoiler

Some launchers may add extra launch arguments to the game which conflict or override Forge's.

MinecraftForge only officially supports the Vanilla launcher, but I'll tell you what launch arguments to look out for regardless of launcher.

By default, the Vanilla launcher will work fine. However, if you or another launcher added extra arguments, make sure you *don't* have any of the following as it'll conflict with Forge:

- -Djava.net.preferIPv6Addresses

- -Djava.net.preferIPv4Stack

 

Java might be explicitly set to apply one of these arguments globally. You can try using jarfix to fix this.

 

 

5. VPNs and proxies

If you're using a VPN or proxy, it might be blocking certain traffic. Try disabling it and see if it fixes the issue.


 

6. General router settings

(I'm sorry if you've gotten this far and still having trouble.)

What's a router?

Spoiler

It's what connects your computer to the Internet and other computers on your LAN.

How do I fix it?

Spoiler

The steps here are intentionally very general and may not apply to your specific router, because there's too much variety in how their settings pages work. If you're not sure, ask your ISP (the people who sell Internet to you) for help or someone who knows more about networking. Do not blindly follow these steps if you don't know what you're doing or you may lose your Internet connection.

 

Step 1: Open your router's settings page. This is usually http://192.168.1.1 or https://192.168.0.1

Step 2: Check if there's any firmware updates available and install them if there are

Step 3: Check the firewall settings and make sure it's not blocking any traffic on ports 25565 or 25575

Step 4: Try enabling or disabling port triggering on ports 25565 and 25575

Step 5: Try enabling or disabling UPnP

Step 6: Enable IPv6 if it's disabled. If it's already enabled, leave it as-is.

Step 7. Temporarily enable DMZ for your computer's IP to see if it fixes the issue. If it does, you'll need to figure out what's blocking the connection and disable DMZ again.

Step 8: Change the router's DNS settings to Cloudflare's, which are listed in the DNS section above.


 

7. Adapter settings

What's an adapter and why should I care?

Spoiler

It's what connects your computer to the router. If it's configured incorrectly, it might unintentionally block connections in a way that breaks the connection test when joining a server.

How do I fix it?

Spoiler

Step 1: Press Start, search for "Control Panel" and open it

Step 2: Click "Network and Internet" and then "Network and Sharing Centre"

Step 3: On the right, click the link next to "Connections:" then click "Properties"

Step 4: Make sure both "Internet Protocol Version 4 (TCP/IPv4)" and "Internet Protocol Version 6 (TCP/IPv6)" are checked

Step 5: If the properties for IPv4 is set to use a specific IP address rather than obtaining one automatically, you may need to do the same for IPv6. If you can set a static IP from the router-side and have it set to obtain an IP automatically for both v4/v6, that may also work.

 

 

8. Antivirus

If you're using a third-party antivirus (not Windows Defender), it might be blocking certain traffic. Try disabling it and see if it fixes the issue. If it does, add an exception for Minecraft and Forge. Contact your antivirus provider for further help with this.


 

9. Docker

For server owners, if you're using Docker, it might be worth trying to explicitly enable IPv6 support. This is usually done by adding `--sysctl net.ipv6.conf.all.disable_ipv6=0` to the `docker run` command. Another thing you can try is adding AAAA records for your server's domain name to point to the IPv6 address of your server, assuming everything else IPv6-related is already working of course. Also refer to the Firewall section above - it's very important that if you block IPv6 for some reason, that you do it for both incoming and outgoing traffic and not just one direction.


 

10. Finale

If, after everything here, you're still having trouble that only seems to affect Forge, please ping me (Paint_Ninja#6054) in #squirrels on the Forge Discord server so I can find out what's going on and why it's happening. I wrote the PRs that added full dual-stack networking support to Forge and want to make sure I've covered all bases. While I did extensive testing, there's always the possibility I missed something that only affects a small number of users. This applies to anyone having trouble - players, server owners, launcher devs...


 

Edited by Paint_Ninja
Add link to PowerToys, mention jarfix
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Thank you that was this mod indeed, it tried to spawn a structure at spawn but since It was already generated he was not able to and so crashed the server lol. I was looking for mod during the pregen and added it just before the ram issue, thank you
    • I’m trying to make a mod that lets me put beacon beams through barrels for a mod pack I’m making but I don’t know what code to put and where to make this happen   (Forge 1.20.1)  
    • ---- Minecraft Crash Report ---- // My bad. Time: 2024-07-17 11:17:18 Description: Unexpected error java.lang.NullPointerException: Unexpected error     at com.google.common.collect.Iterators$6.transform(Iterators.java:829)     at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:52)     at net.minecraft.class_2370.remap(class_2370.java:744)     at net.minecraft.class_2370.unmap(class_2370.java:875)     at net.fabricmc.fabric.impl.registry.sync.RegistrySyncManager.unmap(RegistrySyncManager.java:368)     at net.minecraft.class_310.handler$bma000$fabric-registry-sync-v0$disconnectAfter(class_310.java:11691)     at net.minecraft.class_310.method_18096(class_310.java:2269)     at net.minecraft.class_8673.method_10839(class_8673.java:319)     at net.minecraft.class_2535.method_10768(class_2535.java:673)     at net.minecraft.class_636.method_2927(class_636.java:290)     at net.minecraft.class_310.method_1574(class_310.java:1908)     at net.minecraft.class_310.method_1523(class_310.java:1246)     at net.minecraft.class_310.method_1514(class_310.java:882)     at net.minecraft.client.main.Main.main(Main.java:256)     at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470)     at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)     at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace:     at com.google.common.collect.Iterators$6.transform(Iterators.java:829)     at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:52)     at net.minecraft.class_2370.remap(class_2370.java:744)     at net.minecraft.class_2370.unmap(class_2370.java:875)     at net.fabricmc.fabric.impl.registry.sync.RegistrySyncManager.unmap(RegistrySyncManager.java:368)     at net.minecraft.class_310.handler$bma000$fabric-registry-sync-v0$disconnectAfter(class_310.java:11691)     at net.minecraft.class_310.method_18096(class_310.java:2269)     at net.minecraft.class_8673.method_10839(class_8673.java:319)     at net.minecraft.class_2535.method_10768(class_2535.java:673)     at net.minecraft.class_636.method_2927(class_636.java:290) -- Uptime -- Details:     JVM uptime: 111.259s     Wall uptime: 70.335s     High-res time: 44.634s     Client ticks: 508 ticks / 25.400s Stacktrace:     at net.minecraft.class_310.method_1587(class_310.java:2501)     at net.minecraft.class_310.method_54580(class_310.java:949)     at net.minecraft.class_310.method_1514(class_310.java:905)     at net.minecraft.client.main.Main.main(Main.java:256)     at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470)     at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)     at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) -- Last reload -- Details:     Reload number: 1     Reload reason: initial     Finished: Yes     Packs: vanilla, fabric, accessories, advanced-xray-fabric, appleskin, armoroftheages, auditory, balm-fabric, beautify, betterf3, betterthirdperson, biolith, bobby, bosses_of_mass_destruction, caffeineconfig, cardinal-components, cardinal-components-base, cardinal-components-block, cardinal-components-chunk, cardinal-components-entity, cardinal-components-item, cardinal-components-level, cardinal-components-scoreboard, cardinal-components-world, carryon, chipped, chunky, cinderscapes, cinderscapes-client, cinderscapes-common, cinderscapes-worldgen, cloth-config, comforts, conditional-mixin, cool_elytra, cratedelight, creativecore, creeperoverhaul, cristellib, croptopia, dramaticdoors, duckling, eatinganimationid, elytratrims, entity_texture_features, epherolib, explorerscompass, fabric-api, fabric-api-base, fabric-api-lookup-api-v1, fabric-biome-api-v1, fabric-block-api-v1, fabric-block-view-api-v2, fabric-blockrenderlayer-v1, fabric-client-tags-api-v1, fabric-command-api-v1, fabric-command-api-v2, fabric-commands-v0, fabric-content-registries-v0, fabric-convention-tags-v1, fabric-convention-tags-v2, fabric-crash-report-info-v1, fabric-data-attachment-api-v1, fabric-data-generation-api-v1, fabric-dimensions-v1, fabric-entity-events-v1, fabric-events-interaction-v0, fabric-game-rule-api-v1, fabric-item-api-v1, fabric-item-group-api-v1, fabric-key-binding-api-v1, fabric-keybindings-v0, fabric-language-kotlin, fabric-lifecycle-events-v1, fabric-loot-api-v2, fabric-loot-api-v3, fabric-message-api-v1, fabric-model-loading-api-v1, fabric-networking-api-v1, fabric-object-builder-api-v1, fabric-particles-v1, fabric-recipe-api-v1, fabric-registry-sync-v0, fabric-renderer-api-v1, fabric-renderer-indigo, fabric-renderer-registries-v1, fabric-rendering-data-attachment-v1, fabric-rendering-fluids-v1, fabric-rendering-v0, fabric-rendering-v1, fabric-resource-conditions-api-v1, fabric-resource-loader-v0, fabric-screen-api-v1, fabric-screen-handler-api-v1, fabric-sound-api-v1, fabric-transfer-api-v1, fabric-transitive-access-wideners-v1, fabricloader, forf, freecam, friendsandfoes, geocluster, glassential, glore, grassoverhaul, horizontal_glass_panes, infinity-cave, iris, jade, jamlib, jankson, libgui, mavapi, mavm, medieval_buildings, mes, midnightlib, mns, more_armor_trims, mostructures, mr_dungeons_andtavernsdeserttempleoverhaul, mr_dungeons_andtavernsendcastlestandalone, mr_dungeons_andtavernsjungletempleoverhaul, mr_dungeons_andtavernsnetherfortressoverhaul, mr_dungeons_andtavernsoceanmonumentoverhaul, mr_dungeons_andtavernswoodlandmansionoverhaul, mss, mvs, natures_spirit, necronomicon, new_slab_variants, nicer-skies, noisium, notenoughanimations, polymer-core, polymer-resource-pack, resourcefulconfig, simple_backpack, sodium, sodium-extra, sound_physics_remastered, spectrelib, status-effect-bars, stendhal, sulfurpotassiummod, terraform-biome-remapper-api-v1, terraform-shapes-api-v1, terraform-surfaces-api-v1, terraform-wood-api-v1, the_bumblezone, time_on_display, toggleableitemframes, toomanypaintings, travelersbackpack, trimeffects, universal-graves, utility_belt, variantbarrels, variantbeehives, variantbookshelves, variantcomposters, variantsandventures, visuality, waterframes, waxablecoral, waystones, xaerominimap, xaeroworldmap, yet_another_config_lib_v3, zoomify, minecraft:supporteatinganimation, file/Stay_True_1.21.zip, file/Better Cats v2.0 1.21.zip, file/Better Horses v2.0 1.21.zip, file/Torrezx-Bad_omen.zip, file/Torrezx-Sculk_power.zip, file/Torrezx-Warden_Power.zip, file/Torrezx-Heavy_core_tools.zip, file/waystones_1.21.zip  
    • Maybe an issue with spawnstructures_forge
    • hello, sure you need to use the instaler with java to create the file for you. Here is a video that can show you in detail the step. https://www.youtube.com/watch?v=-jYVkHYhK38
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.