[GH-ISSUE #4267] [Bug]: Rust Oxide Error with tmux in later debian and ubuntu builds #2681

Closed
opened 2026-02-27 03:04:40 +03:00 by kerem · 19 comments
Owner

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>:0

All my googling tells me to run export TERM=xterm before 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

03:48 [Info] [DEBUG] [CSharp] [4] Starting compiler with parameters: -unsafe true --setting:Force true -ms true --parent 18639 -l:file compiler_2023-07-20.log -v Debug
03:48 [Error] ExType: TypeInitializationException
03:48 [Error] [DEBUG] [CSharp] [4] 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>:0 
03:48 [Error] [DEBUG] [CSharp] [4] Compiler may not be set as executable; chmod +x or 0744/0755 required
03:48 [Error] [DEBUG] [CSharp] [4] BaseException:  (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>:0

Steps to reproduce

  1. Start a fresh distro of Ubuntu 23.04
  2. Run apt update and apt upgrade
  3. Reboot
  4. Install LGSM dependencies for 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 lib32z1 netcat doesn't have a valid install candidate for 23.04 so I substituted it for netcat-traditional
  5. Add the rustserver user
  6. Switch to the rust server user
  7. wget -O linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh rustserver
  8. Run the install script using ./rustserver install
  9. Download the latest oxidemod from the umod website and extract the files into serverfiles directory
  10. Launch the server once and stop the instance.
  11. Add any rust or covalence plugins it really doesn't matter.
  12. Start the server again.
  13. You'll notice all the plugins failed do to unable to start compiler. "You need a debug version of Oxide.CSharp.dll to get more output. I can provide this if needed or you can compile your own"
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>:0 ` All my googling tells me to run `export TERM=xterm` before 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 ```shell 03:48 [Info] [DEBUG] [CSharp] [4] Starting compiler with parameters: -unsafe true --setting:Force true -ms true --parent 18639 -l:file compiler_2023-07-20.log -v Debug 03:48 [Error] ExType: TypeInitializationException 03:48 [Error] [DEBUG] [CSharp] [4] 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>:0 03:48 [Error] [DEBUG] [CSharp] [4] Compiler may not be set as executable; chmod +x or 0744/0755 required 03:48 [Error] [DEBUG] [CSharp] [4] BaseException: (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>:0 ``` ### Steps to reproduce 1. Start a fresh distro of Ubuntu 23.04 2. Run apt update and apt upgrade 3. Reboot 4. Install LGSM dependencies for `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 lib32z1` netcat doesn't have a valid install candidate for 23.04 so I substituted it for **netcat-traditional** 5. Add the rustserver user 6. Switch to the rust server user 7. `wget -O linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh rustserver` 8. Run the install script using ./rustserver install 9. Download the latest oxidemod from the umod website and extract the files into serverfiles directory 10. Launch the server once and stop the instance. 11. Add any rust or covalence plugins it really doesn't matter. 12. Start the server again. 13. You'll notice all the plugins failed do to unable to start compiler. "You need a debug version of Oxide.CSharp.dll to get more output. I can provide this if needed or you can compile your own"
Author
Owner

@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 tmux

edit: From the tmux changelog...might be relevant https://github.com/tmux/tmux/blob/master/CHANGES

  • When building, pick default-terminal from the first of tmux-256color, tmux,
    screen-256color, screen that is available on the build system (--with-TERM
    can override).
<!-- gh-comment-id:1643650504 --> @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 tmux edit: From the tmux changelog...might be relevant https://github.com/tmux/tmux/blob/master/CHANGES * When building, pick default-terminal from the first of tmux-256color, tmux, screen-256color, screen that is available on the build system (--with-TERM can override).
Author
Owner

@dgibbs64 commented on GitHub (Jul 20, 2023):

Just did a quick test on debian 12
The default term type for Debian is xterm-256color
The default term type or tmux is tmux-256color

<!-- gh-comment-id:1643872693 --> @dgibbs64 commented on GitHub (Jul 20, 2023): Just did a quick test on debian 12 The default term type for Debian is `xterm-256color` The default term type or tmux is `tmux-256color`
Author
Owner

@austinv900 commented on GitHub (Jul 20, 2023):

Just did a quick test on debian 12
The default term type for Debian is xterm-256color
The default term type or tmux is tmux-256color

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.

<!-- gh-comment-id:1643958609 --> @austinv900 commented on GitHub (Jul 20, 2023): > Just did a quick test on debian 12 > The default term type for Debian is `xterm-256color` > The default term type or tmux is `tmux-256color` 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.
Author
Owner

@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

Ubuntu 22.04 term = screen
Debian 11 term = screen
Debian 12 term = tmux-256color
<!-- gh-comment-id:1644215982 --> @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 ``` Ubuntu 22.04 term = screen Debian 11 term = screen Debian 12 term = tmux-256color ```
Author
Owner

@austinv900 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

Ubuntu 22.04 term = screen
Debian 11 term = screen
Debian 12 term = tmux-256color

We appreciate it.

<!-- gh-comment-id:1644258449 --> @austinv900 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 > ``` > Ubuntu 22.04 term = screen > Debian 11 term = screen > Debian 12 term = tmux-256color > ``` We appreciate it.
Author
Owner

@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.

<!-- gh-comment-id:1678302345 --> @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.
Author
Owner

@austinv900 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.

Your gonna want to run a older version of Linux until there's a fix or workaround.

<!-- gh-comment-id:1678306673 --> @austinv900 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. Your gonna want to run a older version of Linux until there's a fix or workaround.
Author
Owner

@joeyrutledge2 commented on GitHub (Aug 15, 2023):

think I might have figured it out.
in ~rustuser/.profile I added

export TERM=screen

and 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.

<!-- gh-comment-id:1678339820 --> @joeyrutledge2 commented on GitHub (Aug 15, 2023): think I might have figured it out. in ~rustuser/.profile I added `export TERM=screen` and 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.
Author
Owner

@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 )

<!-- gh-comment-id:1678362276 --> @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 )
Author
Owner

@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.

<!-- gh-comment-id:1679238176 --> @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.
Author
Owner

@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!

<!-- gh-comment-id:1679523524 --> @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!
Author
Owner

@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.

However I had to rename the ~/.tmux.config file to ~/.tmux.conf in order for it to works.

doh good call out. Mistyped it when I wrote up my comment here. I’ll edit my previous post.

<!-- gh-comment-id:1679660409 --> @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. > However I had to rename the ~/.tmux.config file to ~/.tmux.conf in order for it to works. doh good call out. Mistyped it when I wrote up my comment here. I’ll edit my previous post.
Author
Owner

@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-256color rather than screen-256color because it is meant to have more features than the screen TERM. Oxide breaks when tmux-256color is 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.conf for 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@debd6cbb68 as a temp warning to users.

<!-- gh-comment-id:1696353582 --> @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-256color` rather than `screen-256color` because it is meant to have [more features](https://github.com/tmux/tmux/issues/3218) than the screen TERM. Oxide breaks when `tmux-256color` is 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.conf` for 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 https://github.com/OxideMod/Oxide.Core/commit/debd6cbb6899d4299d1c7ca8db05b9b01024ff32 as a temp warning to users.
Author
Owner

@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.

<!-- gh-comment-id:1696370190 --> @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.
Author
Owner

@austinv900 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-256color rather than screen-256color because it is meant to have more features than the screen TERM. Oxide breaks when tmux-256color is 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.conf for 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@debd6cbb68 as a temp warning to users.

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

<!-- gh-comment-id:1696372248 --> @austinv900 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-256color` rather than `screen-256color` because it is meant to have [more features](https://github.com/tmux/tmux/issues/3218) than the screen TERM. Oxide breaks when `tmux-256color` is 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.conf` for 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 https://github.com/OxideMod/Oxide.Core/commit/debd6cbb6899d4299d1c7ca8db05b9b01024ff32 as a temp warning to users. 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
Author
Owner

@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 :)

<!-- gh-comment-id:1703443192 --> @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 :)
Author
Owner

@austinv900 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 :)

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?

<!-- gh-comment-id:1703460453 --> @austinv900 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 :) 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?
Author
Owner

@blackuGT commented on GitHub (Sep 2, 2023):

think I might have figured it out. in ~rustuser/.profile I added

export TERM=screen

and 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.

For me this is not working. Fresh Debian 12 and LinuxGSM instalation, added export to .profile and created .tmux.conf with default-terminal option and still when starting server and invoke any oxide command:

Exception while starting compiler version : (Exception: Magic number is wrong: 542)
at System.TermInfoReader.ReadHeader (System.Byte[] buffer, System.Int32& position) [0x00028] in :0
at System.TermInfoReader..ctor (System.String term, System.String filename) [0x0005f] in :0
at System.TermInfoDriver..ctor (System.String term) [0x00055] in :0
at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in :0
at System.ConsoleDriver..cctor () [0x0004d] in :0
Compiler may not be set as executable; chmod +x or 0744/0755 required

TERM variable is looking fine:

echo $TERM
screen

Running process:

tmux -L rustserver new-session -d -x 80 -y 23 -s rustserver ./RustDedicated -batchmode +app.listenip 0.0.0.0 +app.port 28082 +server.ip 0.0.0.0 +server.port 28015 +server.queryport 28017 +server.tickrate 30 +server.hostname "[Redacted]" +server.identity "rustserver" +server.gamemode vanilla +server.level "Procedural Map" +server.seed 674000918 +server.salt 0 +server.maxplayers 150 +server.worldsize 4000 +server.saveinterval 300 +rcon.web 1 +rcon.ip 0.0.0.0 +rcon.port 28016 +rcon.password "[Redacted]" -logfile

When launching server in debug mode all is working really fine.

<!-- gh-comment-id:1703778366 --> @blackuGT commented on GitHub (Sep 2, 2023): > think I might have figured it out. in ~rustuser/.profile I added > > `export TERM=screen` > > and 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. For me this is not working. Fresh Debian 12 and LinuxGSM instalation, added `export` to `.profile` and created `.tmux.conf` with `default-terminal` option and still when starting server and invoke any oxide command: > Exception while starting compiler version : (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>:0 > Compiler may not be set as executable; chmod +x or 0744/0755 required `TERM` variable is looking fine: > echo $TERM >screen Running process: > tmux -L rustserver new-session -d -x 80 -y 23 -s rustserver ./RustDedicated -batchmode +app.listenip 0.0.0.0 +app.port 28082 +server.ip 0.0.0.0 +server.port 28015 +server.queryport 28017 +server.tickrate 30 +server.hostname "[Redacted]" +server.identity "rustserver" +server.gamemode vanilla +server.level "Procedural Map" +server.seed 674000918 +server.salt 0 +server.maxplayers 150 +server.worldsize 4000 +server.saveinterval 300 +rcon.web 1 +rcon.ip 0.0.0.0 +rcon.port 28016 +rcon.password "[Redacted]" -logfile When launching server in `debug mode` all is working really fine.
Author
Owner

@dgibbs64 commented on GitHub (Sep 5, 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 :)

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?

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

<!-- gh-comment-id:1706866509 --> @dgibbs64 commented on GitHub (Sep 5, 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 :) > > 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? 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
Sign in to join this conversation.
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
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LinuxGSM#2681
No description provided.