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

Joining LAN server results in timeout #2296

Closed
Guanran928 opened this issue Apr 12, 2024 · 8 comments
Closed

Joining LAN server results in timeout #2296

Guanran928 opened this issue Apr 12, 2024 · 8 comments

Comments

@Guanran928
Copy link

Guanran928 commented Apr 12, 2024

Bug Description

I cannot join my LAN server, after I double-clicked on my server, my client is stuck on the "Joining" screen, my server sees my client joins for *exactly* 30s, then `Timed out`

I am able to join my server sometimes, normally I need to re-join 4-5 times.

Did this behavior use to work in the previous version?

Untested

Steps to Reproduce (for bugs)

  1. Join SF4 server
  2. Wait for ~30s
  3. Disconnect with one of the following messages:
  • Timed out
  • Disconnected
  • io.netty.channel.unix.Errors$NativeIoException: syscall:write(..) failed: Broken pipe

Logs

  • Client/Server Log:
    server latest.log: https://fars.ee/2iFA
    server latest.log, second boot: https://fars.ee/9M8S

    client latest.log: https://fars.ee/PL_a
    (io.netty.channel.unix.Errors$NativeConnectException: syscall:getsockopt(..) failed: Connection refused should be when I accidentally quitted Zellij, then the server shuted down)

  • Crash Log: n/a

World Information

  • World Preset: SkyFactory4
  • Prestige Enabled: No
  • Modpack Version world created in: 4.2.4
  • Additional Content Installed: None

Client Information

  • Modpack Version: 4.2.4
  • Java Version: OpenJDK 8u362
openjdk version "1.8.0_362"
OpenJDK Runtime Environment (build 1.8.0_362-ga)
OpenJDK 64-Bit Server VM (build 25.362-bga, mixed mode)
  • Launcher Used: Prism Launcher 8.2
  • Memory Allocated: 6000MiB
  • Server/LAN/Single Player: LAN server
  • Optifine Installed: No
  • Shaders Enabled: No

Server Information

  • Java Version: Temurin 8u392, with Aikar's flags
openjdk version "1.8.0_392"
OpenJDK Runtime Environment (Temurin)(build 1.8.0_392-b08)
OpenJDK 64-Bit Server VM (Temurin)(build 25.392-b08, mixed mode)
  • Operating System: Linux, NixOS
  • Hoster/Hosting Solution: Selfhosted
  • Sponge (Non-Vanilla Forge) Server: No
@Guanran928
Copy link
Author

Guanran928 commented Apr 12, 2024

Is this related to JEI? I created a new client instance that was working fine, syncing JEI(?) takes ~25s (06:58:09 to 06:58:34) on the old instance, and 4s (07:26:29 to 07:26:33) on new instance

@Guanran928
Copy link
Author

It started showing up again on the new instance

@sam-kirby
Copy link
Contributor

sam-kirby commented Apr 13, 2024

Have you tried extending the timeout? You can modify it by setting the property fml.readTimeout, for example by adding the following flag to your server arguments: -Dfml.readTimeout=60. It defaults to 30, units are seconds.

Note that this flag must be added before -jar to have any effect.

@Guanran928
Copy link
Author

Have you tried extending the timeout? You can modify it by setting the property fml.readTimeout, for example by adding the following flag to your server arguments: -Dfml.readTimeout=60. It defaults to 30, units are seconds.

Thanks, will try that when I got home.

@Guanran928
Copy link
Author

Guanran928 commented Apr 16, 2024

Hmm. I'm still getting timeouts

Here is my entire jvm flag:

#!/usr/bin/env bash
nix run nixpkgs#temurin-bin-8 -- -Xms4G -Xmx4G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -Dfml.readTimeout=120 -jar forge-1.12.2-14.23.5.2860.jar nogui

server latest.log: https://fars.ee/1qyR

my server sees my client joins for exactly 30s, then Timed out

Now it seems to be 15s for some reason?

[20:31:21] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: Guanran928 joined the game
[20:31:37] [Server thread/INFO] [net.minecraft.network.NetHandlerPlayServer]: Guanran928 lost connection: Timed out
[20:38:10] [Server thread/INFO] [minecraft/DedicatedServer]: Guanran928 joined the game
[20:38:26] [Server thread/INFO] [minecraft/NetHandlerPlayServer]: Guanran928 lost connection: Timed out

EDIT: 🤦 it is 15s since the beginning...

@sam-kirby
Copy link
Contributor

It's 30 seconds in the first log you provided:-

[06:46:16] [User Authenticator #49/INFO] [net.minecraft.server.network.NetHandlerLoginServer]: UUID of player Guanran928 is 86dbb6c5-8d8b-4c45-b8eb-b3fdf03bfb27[06:46:17] [Netty Epoll Server IO #11/INFO] [FML]: Client protocol version 2
[06:46:17] [Netty Epoll Server IO #11/INFO] [FML]: Client protocol version 2
...
[06:46:46] [Server thread/INFO] [net.minecraft.network.NetHandlerPlayServer]: Guanran928 lost connection: Timed out
[06:46:46] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: Guanran928 left the game

And 36 seconds in the new log:-

[20:31:01] [User Authenticator #1/INFO] [net.minecraft.server.network.NetHandlerLoginServer]: UUID of player Guanran928 is 86dbb6c5-8d8b-4c45-b8eb-b3fdf03bfb27
[20:31:01] [Netty Epoll Server IO #2/INFO] [FML]: Client protocol version 2
...
[20:31:37] [Server thread/INFO] [net.minecraft.network.NetHandlerPlayServer]: Guanran928 lost connection: Timed out
[20:31:37] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: Guanran928 left the game

@sam-kirby
Copy link
Contributor

So it seems to have increased it, but not by as much as is specified.

You could try adding Random Patches to your server - one of the many patches it includes extends both the login and read timeouts to (by default) 90 seconds but you can configure it further if necessary.

@sam-kirby
Copy link
Contributor

Closing as stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants