mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2026-04-25 06:05:57 +03:00
[GH-ISSUE #4267] [Bug]: Rust Oxide Error with tmux in later debian and ubuntu builds #2681
Labels
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/LinuxGSM#2681
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @austinv900 on GitHub (Jul 20, 2023).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/4267
User story
As a server owner, I want to be able to run OxideMod so that I can mod my server
Game
Rust
Linux distro
Other
Command
command: start
Further information
Hello, I'm a core developer over at OxideMod my main responsibility is fixing and updating the C# compiler that is used to compile plugins at runtime. We've had a couple users bring up that the compiler is failing to start so I've done some digging and have been able to reproduce it on my side.
To be perfectly honest I'm not too heavy into Linux so please correct me if I'm mistaken. I'm finding that LGSM's terminal emulator of choice ( "tmux" ) is causing issues with mono being able to access any console resources of sub processes.
The way the parent process communicates with the compiler process is its redirected I/O stream via the console and for some reason everytime tmux is set as the terminal emulator for the parent process we get a error.
TypeInitializationException: Exception while starting compiler (Exception: Magic number is wrong: 542) at System.TermInfoReader.ReadHeader (System.Byte[] buffer, System.Int32& position) [0x00028] in <fb001e01371b4adca20013e0ac763896>:0 at System.TermInfoReader..ctor (System.String term, System.String filename) [0x0005f] in <fb001e01371b4adca20013e0ac763896>:0 at System.TermInfoDriver..ctor (System.String term) [0x00055] in <fb001e01371b4adca20013e0ac763896>:0 at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <fb001e01371b4adca20013e0ac763896>:0 at System.ConsoleDriver..cctor () [0x0004d] in <fb001e01371b4adca20013e0ac763896>:0All my googling tells me to run
export TERM=xtermbefore launching the game server. I haven't been able to actually do that while utilizing LGSM. Running the game server directly everything runs fine.While I've only tested this on a Rust server I'm sure the issue exists on all the other games supported by oxide and LGSM.
Relevant log output
Steps to reproduce
sudo dpkg --add-architecture i386; sudo apt update; sudo apt install curl wget file tar bzip2 gzip unzip bsdmainutils python3 util-linux ca-certificates binutils bc jq tmux netcat lib32gcc-s1 lib32stdc++6 libsdl2-2.0-0:i386 steamcmd lib32z1netcat doesn't have a valid install candidate for 23.04 so I substituted it for netcat-traditionalwget -O linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh rustserver@dgibbs64 commented on GitHub (Jul 20, 2023):
Interesting problem. I am not much of a tmux expert. However my guess is that the term type is not being set to xterm in the tmux session normally you can get the term type by running
echo $TERM. If this is the case then I think I should be able to force the terminal type in the tmux session. Since this is only effecting newer versions of debian and Ubuntu it migh tbe related to using a newer version of tmuxedit: From the tmux changelog...might be relevant https://github.com/tmux/tmux/blob/master/CHANGES
screen-256color, screen that is available on the build system (--with-TERM
can override).
@dgibbs64 commented on GitHub (Jul 20, 2023):
Just did a quick test on debian 12
The default term type for Debian is
xterm-256colorThe default term type or tmux is
tmux-256color@austinv900 commented on GitHub (Jul 20, 2023):
I've only personally tested it myself on Ubuntu 23.04 I believe it's the same on there too 'xterm-256color' but gets forced to tmux-256color for the game process when launching with LGSM.
@dgibbs64 commented on GitHub (Jul 20, 2023):
Just did more checks for tmux term types. So I am fairly confident tmux-256color is causing the issue. I will look at forcing the term type back to screen
@austinv900 commented on GitHub (Jul 20, 2023):
We appreciate it.
@joeyrutledge2 commented on GitHub (Aug 15, 2023):
Running into this issue currently with LGSM and fresh install of Debian 12. Is there a simple workaround that I can do to get plugins working? Currently Oxide installs, but anytime I load a plugin it fails with errors as austin listed initially in this thread.
@austinv900 commented on GitHub (Aug 15, 2023):
Your gonna want to run a older version of Linux until there's a fix or workaround.
@joeyrutledge2 commented on GitHub (Aug 15, 2023):
think I might have figured it out.
in ~rustuser/.profile I added
export TERM=screenand in ~rustuser/.tmux.conf I added
set -g default-terminal "screen"logged out and back in, restarted rust using ./rustserver restart and plugins loaded. I did this on my dev box (also Debian 12, but slow slow slow) but haven't tried on my production box as folks are still playing atm. EDIT: The same fix worked on my production machine as well.
Pretty sure the fix here was the .tmux.conf but the .profile was added as good measure.
@tumekee commented on GitHub (Aug 15, 2023):
@joeyrutledge2 be interested to know if you can run RCON commands, specifically the “kick” command. I did what you did and was able to log in and play on the server but some RCON commands gave a magic number error ( and didn’t work )
@joeyrutledge2 commented on GitHub (Aug 15, 2023):
@tumekee yep just confirmed that RCON commands work for me. no errors on the kick command at all.
@hasyirin commented on GitHub (Aug 15, 2023):
First of all, thank you for this, definitely saved me here @joeyrutledge2
However I had to rename the ~/.tmux.config file to ~/.tmux.conf in order for it to works.
Again, thanks!
@joeyrutledge2 commented on GitHub (Aug 15, 2023):
@AhrimFakhriy glad to help! I found it odd that this issue had been sitting for a bit without a published solution.
doh good call out. Mistyped it when I wrote up my comment here. I’ll edit my previous post.
@dgibbs64 commented on GitHub (Aug 28, 2023):
Relevant comment
https://github.com/Homebrew/homebrew-core/issues/102748#issuecomment-1145378599
The summary, the issue is that for tmux 3.3a the new default term for tmux is now
tmux-256colorrather thanscreen-256colorbecause it is meant to have more features than the screen TERM. Oxide breaks whentmux-256coloris used.I think the ideal solution would be for oxide to release a bug fix to allow it to work with tmux-256color. If this is not feasible I will need to add code to insert
set -g default-terminal "screen-256color"into~/.tmux.conffor Rust servers. My preference is to not need to change the default behavior of tmux as users might be using tmux for other purposes so I want to avoid editing a users tmux config.I have also looked at if there is a way to change the term when starting a new session but haven't found a way yet.
@austinv900 please let me know what you think about the feasibility of OxideMod patching the tmux-256color term issue and if so what are your thoughts on timescale etc. If you think it is either unlikely or going to take a while I will update LinuxGSM with the workaround. Thanks :)
edit jsut seen this commit
github.com/OxideMod/Oxide.Core@debd6cbb68as a temp warning to users.@austinv900 commented on GitHub (Aug 28, 2023):
To be perfectly honest I'm not to sure where to start with creating a bug fix. I feel like the issue might be higher than .NET as our compiler process just fails to start if we have the Std In/Out redirected. Only thing I can think of is adding in a alternate way to communicate with the compiler process. Maybe someone else has some insight that might help? Alternativly we can do what you'd do and just write to the tmux config file and force a restart to the process but that might cause a headache of complaints.
@austinv900 commented on GitHub (Aug 28, 2023):
Feel free to message me on discord for a faster response. I'm sure we can probably hammer out of details if you feel it would be better trying to add a patch into oxide
@dgibbs64 commented on GitHub (Sep 1, 2023):
@austinv900 is there anything in particular info you need from me? I have no knowledge of how Oxide works so I don't think I will be much use apart from doing some testing. But yeah attempting to patch Oxide I think is preferable in the first instance :)
@austinv900 commented on GitHub (Sep 1, 2023):
We just have no understanding of why tmux is causing issues. We get that exception and all I can understand from that is .NET is getting a unexpected response from the terminal. It's doesn't look like it has anything to do with oxide. Maybe it's a mono issue?
@blackuGT commented on GitHub (Sep 2, 2023):
For me this is not working. Fresh Debian 12 and LinuxGSM instalation, added
exportto.profileand created.tmux.confwithdefault-terminaloption and still when starting server and invoke any oxide command:TERMvariable is looking fine:Running process:
When launching server in
debug modeall is working really fine.@dgibbs64 commented on GitHub (Sep 5, 2023):
Seems like a tough one. Could be a bug with the tmux terminal or .net. I think it's worth raising an issue with the Tmux developer providing the unexpected response error. They will definitely understand way more than I ever could
https://github.com/tmux/tmux