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

Joining LAN server results in timeout #2296

Closed Guanran928 closed 4 months ago

Guanran928 commented 5 months ago

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

World Information

Client Information

Server Information

Guanran928 commented 5 months ago

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 commented 5 months ago

It started showing up again on the new instance

sam-kirby commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

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: :facepalm: it is 15s since the beginning...

sam-kirby commented 5 months ago

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 commented 5 months ago

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 commented 4 months ago

Closing as stale