Dox Posted July 14, 2019 Share Posted July 14, 2019 Hey guys, Running a dedicated server on an Ubuntu System 64 19.04. The server worked great for 2 weeks before encountering this issue: Exception: Magic number is wrong: 542 at System.TermInfoReader.ReadHeader (System.Byte[] buffer, System.Int32& position) [0x00000] in <filename unknown>:0 at System.TermInfoReader..ctor (System.String term, System.String filename) [0x00000] in <filename unknown>:0 at System.TermInfoDriver..ctor (System.String term) [0x00000] in <filename unknown>:0 at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <filename unknown>:0 at System.ConsoleDriver..cctor () [0x00000] in <filename unknown>:0 Rethrow as TypeInitializationException: An exception was thrown by the type initializer for System.ConsoleDriver at System.Console.SetEncodings (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x00000] in <filename unknown>:0 at System.Console..cctor () [0x00000] in <filename unknown>:0 Rethrow as TypeInitializationException: An exception was thrown by the type initializer for System.Console at UnityEngine.UnityLogWriter.Init () [0x00000] in <filename unknown>:0 at UnityEngine.ClassLibraryInitializer.Init () [0x00000] in <filename unknown>:0 (Filename: Line: -1) Previously a fresh install FIXED the issue, I simply installed the dedicated server (copied my world and server) to a new directory and it worked great again for about 48 hours. This worked once. Things I have tried: Using a backup (a clone of the entire dedicated server folder) from when it was working previously. A fresh install with my config/admin files preserved (and removed previous installs from steam directory) A fresh install without any modifications These now all result in the same fatal error. A friend mentioned that it could be a 32/64bit conflict, as 7 days dedi only works on the 32bit version, but I figure if this was related, it would have never worked in the first place. I have attached the server log. https://pastebin.com/TYLZ023N Any help and advice will be appreciated. Edit: Log of it working https://pastebin.com/mhxKHFgL Link to comment Share on other sites More sharing options...
SylenThunder Posted July 14, 2019 Share Posted July 14, 2019 Do you have a log from when it worked? Link to comment Share on other sites More sharing options...
Dox Posted July 14, 2019 Author Share Posted July 14, 2019 added, thanks Link to comment Share on other sites More sharing options...
Dox Posted July 14, 2019 Author Share Posted July 14, 2019 I located this post https://stackoverflow.com/questions/49242075/mono-bug-magic-number-is-wrong-542 export TERM=xterm Then verify it is changed with: echo $TERM This appears to have fixed it. /shrug. Link to comment Share on other sites More sharing options...
SylenThunder Posted July 14, 2019 Share Posted July 14, 2019 I wonder if that's something specific to 19.04. I'll have to put up a test system and find out. Link to comment Share on other sites More sharing options...
Dox Posted July 14, 2019 Author Share Posted July 14, 2019 Thats a good possibility, as very little changes took place on the system between when it was working great and then stopped. I'll have to do a little more research to understand what the command even did. Link to comment Share on other sites More sharing options...
zootal Posted July 15, 2019 Share Posted July 15, 2019 Using export to screw with the environment isn't really the best way to fix this. The TERM variable is set to "screen" in a screen session for a reason, though some terminals will over ride this. If you use xfce4-terminal, for example, it will set TERM to "xterm-256color" at startup, and in a screen session, it gets set to "screen.xterm-256color". Other terminals will set it to "screen", and that is where mono barfs causing the server to crash. It is mono barfing, but I'm not sure if it is a mono bug or a 7D bug. The end result is the same - the server will barf if TERM is set to "screen". A better fix to this, instead of using export to screw with the environment, is to modify your server startup script to set the TERM variable. In my startup script, I just add this line: TERM=xterm And it works great, and leaves the overall environment alone. Link to comment Share on other sites More sharing options...
MooD Posted August 4, 2019 Share Posted August 4, 2019 Hello, Just some info : 1) I'm not an expert in Mono, but it doesn't seem to be related to 7Days exclusively : it seems the issue arose for even simple Mono "Hello World" programs. 2) It's also not linked specifically to Ubuntu 19.04 -> I have the same issue with my Arch/Manjaro. Cheers, MooD Link to comment Share on other sites More sharing options...
zootal Posted August 5, 2019 Share Posted August 5, 2019 Hello, Just some info : 1) I'm not an expert in Mono, but it doesn't seem to be related to 7Days exclusively : it seems the issue arose for even simple Mono "Hello World" programs. 2) It's also not linked specifically to Ubuntu 19.04 -> I have the same issue with my Arch/Manjaro. Cheers, MooD I use Slackware, and if I try to start the server in a screen session without fixing the TERM variable, it will do this every time. However, fixing the TERM variable with one line in my startup script: TERM=xterm Fixis the problem everytime. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.