Repository navigation
fix(terraria,tmodloader): probe readiness without connecting - #42
Merged
Merged
Conversation
The Terraria server crashes with an ObjectDisposedException in Netplay.ServerLoop when a client connects and closes at once, which is exactly what the kubelet's tcpSocket readiness probe does every 10 s. On the kubelab live sweep the pod restarted 5 times in 6 minutes, and a crash during world generation left the restart stuck at "Choose World:". Both templates now declare no probe, like dont-starve-together; the operator then sets none on the game container. terraria 2.2.1 -> 2.2.2, tmodloader 1.0.0 -> 1.0.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NsN6bnAMRM9XQtrTQ6KC7U Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
…of dropping it
Removing the readiness probe stopped the crash loop but left the pod Ready
before the server could take players. Bring the probe back as an exec probe
that reads /proc/net/tcp for a socket LISTENing on 7777 (0x1E61): it never
opens a connection, so it cannot trigger the ObjectDisposedException that
the kubelet's tcpSocket connect-and-close caused.
Verified on kubelab: a vanilla server with this probe stayed Ready for 6.5
minutes with 0 restarts and no connection in its log (the tcpSocket probe
gave 5 restarts in 6 minutes); the probe returns 0 for port 7777 and 1 for
7778; the tModLoader image has sh, grep -E and /proc/net/tcp{,6}.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NsN6bnAMRM9XQtrTQ6KC7U
Signed-off-by: valgulnecron <39313199+ValgulNecron@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This replaces the crashing
tcpSocketreadiness probe interrariaandtmodloaderwith anexecprobe that never connects to the game.The bug: the Terraria server crashes when a client connects and closes right away. That is exactly what the kubelet's
tcpSocketprobe does every 10 s, so the probe crash-looped the pod.Evidence from the 2026-10-04 kubelab live sweep:
... is connecting...lines, then anObjectDisposedExceptioninTerraria.Netplay.ServerLoop, and the container exited.Choose World:.The fix:
sh -c "grep -qsE ':1E61 [0-9A-F]+:[0-9A-F]{4} 0A' /proc/net/tcp /proc/net/tcp6"0A(LISTEN) on local port 7777 (0x1E61).initialDelaySeconds,periodSecondsandfailureThresholdare unchanged.specs.mdexplains the probe for both modules.terraria2.2.1 → 2.2.2,tmodloader1.0.0 → 1.0.1.Verification (kubelab, 2026-10-05)
vanilla-latestserver with this probe was not-ready 4 times during world generation, then turned Ready. It stayed Ready for 6.5 minutes with 0 restarts. Its log had nois connectingorObjectDisposedlines./proc/net/tcpshows00000000:1E61 00000000:0000 0A.sh,grep -E,/proc/net/tcpand/proc/net/tcp6are all present. A full tModLoader boot test was not possible, because the image exits without an uploaded modpack (see the note below).nuclear-optionandminecraft-java.Separate issue found while testing (not fixed here)
The
tmodloadertemplate'sMODPACKconfig field has no default and is not marked required. The image exits ("Modpack name was not provided", or "Modpack was not detected" when no modpack is uploaded), so a fresh tModLoader server crash-loops until a modpack is uploaded. The tModLoader versions on theterrariatemplate behave the same way.Follow-up in Gameplane
ValgulNecron/Gameplane#551 bumps the
modulespointer to this branch and mirrors the probe in the Terraria bot e2e fixture. Please merge this PR with a merge commit (not squash or rebase), so the pinned SHA stays onmain.🤖 Generated with Claude Code
https://claude.ai/code/session_01NsN6bnAMRM9XQtrTQ6KC7U