DarkPacks / SkyFactory-4

SkyFactory 4 offers a brand-new experience never before seen in the series. Full automation, tech, magic, and bacon resources! This iteration offers over 30+ world types so you can play the pack like never before!
https://minecraft.curseforge.com/projects/skyfactory-4/
133 stars 45 forks source link

Server can only be joined via localhost #2299

Closed devini15 closed 4 months ago

devini15 commented 4 months ago

Bug Description

My server is up and working as normal, but can only be connected to by using localhost in the address box. Neither I nor anyone else can connect to it by using the IP or my domain.

I know my network configuration is correct, because my vanilla server is working just fine on the same domain. (I literally stopped the server, exited the game, and ran my vanilla server on the same port to test)

The port number is 25565 and the issue persists regardless of if I specify. Pretty much all server properties are default, online mode is true etc.

Have tried restarting game and server to no avail.

Did this behavior use to work in the previous version?

I just installed the pack and server client today, I am using the latest version.

Error message: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection timed out: no further information

The server does not acknowledge my connection attempt in the cmd window.

It's all behavior I'd expect if my router config was incorrect, but I would like to reiterate that I have checked and doublechecked, it only stops working for SkyFactory.

I do not have any other modded servers to test with at the moment.

Steps to Reproduce (for bugs)

  1. Run server client (via included batch file).
  2. Enter IP address and attempt connection.
  3. You will not be able to connect to the server.

Logs

World Information

Client Information

Server Information

sam-kirby commented 4 months ago

The server does not acknowledge the connection attempts, so they are not reaching the server software. As you seem to have validated your port forwarding rules, other possible issues include: 1) Setting server-ip in server.properties to an IP not owned by the correct interface. I would advise leaving server-ip blank so that the game attempts to bind to all interfaces. If you need to set this, then it needs to be set to the internal IP address of the interface your system uses to communicate with the internet. 2) A misconfigured firewall. If your vanilla server uses a different version of Java then firewall rules set for that version will not apply to the modded server. Make sure you allow incoming connections for the Java binary running the server.

devini15 commented 4 months ago

@sam-kirby

  1. Setting server-ip in server.properties to an IP not owned by the correct interface. I would advise leaving server-ip blank so that the game attempts to bind to all interfaces. If you need to set this, then it needs to be set to the internal IP address of the interface your system uses to communicate with the internet.

I'm not entirely certain what the "internal IP address of the interface" is or how to retrieve it (I'm assuming it's different from my local IP) but I had server-ip unset for the entire time I was testing

  1. A misconfigured firewall. If your vanilla server uses a different version of Java then firewall rules set for that version will not apply to the modded server. Make sure you allow incoming connections for the Java binary running the server.

This could actually be it, I know I agreed to let java through the firewall, but there was a different UAC box that came up while I was tapping Esc for other reasons and I don't know what it was for. Maybe a different firewall prompt. I never saw it again though, how would I get it to come back? Or would I just have to pin down this specific java instance in firewall settings?

sam-kirby commented 4 months ago

I'm not entirely certain what the "internal IP address of the interface" is or how to retrieve it (I'm assuming it's different from my local IP) but I had server-ip unset for the entire time I was testing

If server-ip is blank then don't worry about it. But internal IP is a synonym for local IP. A common error is when someone puts their external/public IP address in the server-ip field. As no network interface on the computer reports having that IP the game will either bind no interface on Windows making it inaccessible or crash on Linux.

This could actually be it, I know I agreed to let java through the firewall, but there was a different UAC box that came up while I was tapping Esc for other reasons and I don't know what it was for. Maybe a different firewall prompt. I never saw it again though, how would I get it to come back? Or would I just have to pin down this specific java instance in firewall settings?

You will need to add a rule to the firewall that allows inbound connections. Open the "Windows Defender Firewall with Advanced Security" configuration pane (you can just search for it in the start menu), go to inbound rules and choose New Rule. The rule type is "Program", enter the path to the Java 8 binary you're using - if you need to find this you can use task manager's "Open file location" button, the action is "Allow the connection".

devini15 commented 4 months ago

I tried allowing it through my firewall last night and it worked! I forgot it was a different instance of Java that had to be allowed separately. Thank you so much for your help!