Jump to content

7 Days To Die Dedi Fatal Error: Magic Number is Wrong 542


Dox

Recommended Posts

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

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

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

  • 3 weeks later...

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...