Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server can only be joined via localhost #2299

Closed
devini15 opened this issue May 16, 2024 · 4 comments
Closed

Server can only be joined via localhost #2299

devini15 opened this issue May 16, 2024 · 4 comments
Labels
Env: Server Type: Support For questions and other inquiries that are not a bug or feature request.

Comments

@devini15
Copy link

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

  • Client/Server Log: I don't think there's anything of interest in here but I can upload it to pastebin upon request.
  • Crash Log: No crash on client or server side

World Information

  • World Preset:SkyFactory 4
  • Prestige Enabled:Yes
  • Modpack Version world created in: 4.2.4
  • Additional Content Installed: N/A

Client Information

  • Modpack Version: 4.2.4
  • Java Version: 1.8.0_51
  • Launcher Used: CurseForge
  • Memory Allocated: 4G (I think)
  • Server/LAN/Single Player: Server
  • Optifine Installed: No
  • Shaders Enabled: No

Server Information

  • Java Version: 1.8.0_401
  • Operating System: Windows 11 Version 23H2 (OS Build 22631.3447)
  • Hoster/Hosting Solution: Hosting locally from my PC. Server is functional when I connect to "localhost"
  • Sponge (Non-Vanilla Forge) Server: I don't know where to find this information, but I literally downloaded CurseForge about an hour ago so whatever comes with the default.
@sam-kirby
Copy link
Contributor

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.

@sam-kirby sam-kirby added the Type: Support For questions and other inquiries that are not a bug or feature request. label May 16, 2024
@devini15
Copy link
Author

devini15 commented May 16, 2024

@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
Copy link
Contributor

sam-kirby commented May 17, 2024

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
Copy link
Author

devini15 commented May 17, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Env: Server Type: Support For questions and other inquiries that are not a bug or feature request.
Projects
None yet
Development

No branches or pull requests

2 participants