• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Improvements for the dedicated server

Hm, there were no code changes at all from 218 to 222 (only the AC#.dll was patched for b10, now you run b9 on the server).
Also "Telnet" and HTTP aren't related in any way, I fear there's some kind of bigger problem in there like thread count problems :( Will continue investigating, maybe after all I have to replace the HTTP library.

Btw, are you using the authentication on the webmap?

@bolibompa: Do you also get a spam of those log entries as Soylent before the "Telnet" connection hangs?
Hi

I grepped for "Net.Sockets.SocketException:" but found nothing.

I use authentication on the webmap.

I get tons of these though. The log files are 600MB each day.

Code:
2015.01.12 09:35:53: Can't send RPC function because the target is not connected to the server.
2015.01.12 09:35:53: Can't send RPC function because the target is not connected to the server.
2015.01.12 09:35:54: Can't send RPC function because the target is not connected to the server.
2015.01.12 09:35:54: Can't send RPC function because the target is not connected to the server.
2015.01.12 09:35:54: Can't send RPC function because the target is not connected to the server.
2015.01.12 09:35:54: Can't send RPC function because the target is not connected to the server.
2015.01.12 09:35:55: Can't send RPC function because the target is not connected to the server.
2015.01.12 09:35:55: Can't send RPC function because the target is not connected to the server.
2015.01.12 09:35:55: Can't send RPC function because the target is not connected to the server.
2015.01.12 09:35:55: Can't send RPC function because the target is not connected to the server.
 
Hi
I grepped for "Net.Sockets.SocketException:" but found nothing.

I use authentication on the webmap.

I get tons of these though. The log files are 600MB each day.
You are running a Linux server, aren't you? If so could you check the number of open threads every now and then?

Code:
cat /proc/$(cat /home/sdtd/instances/<instancename>/7dtd.pid)/status | grep Threads
Also if possible try to watch memory consumption of the game server over time.

 
Yes, running on Linux.

I'm logging number of thread and memory usage now on two game servers.

You are running a Linux server, aren't you? If so could you check the number of open threads every now and then?
Code:
cat /proc/$(cat /home/sdtd/instances/<instancename>/7dtd.pid)/status | grep Threads
Also if possible try to watch memory consumption of the game server over time.
 
Hm, there were no code changes at all from 218 to 222 (only the AC#.dll was patched for b10, now you run b9 on the server).
Also "Telnet" and HTTP aren't related in any way, I fear there's some kind of bigger problem in there like thread count problems :( Will continue investigating, maybe after all I have to replace the HTTP library.

Btw, are you using the authentication on the webmap?

@bolibompa: Do you also get a spam of those log entries as Soylent before the "Telnet" connection hangs?
No, not using authentication currently. One of the problems troubleshooting these things is that when the server crashes and restarts, it creates a new output.log file. And when telnet hangs, I can't putty into the server to see what's going on.

 
No, not using authentication currently. One of the problems troubleshooting these things is that when the server crashes and restarts, it creates a new output.log file. And when telnet hangs, I can't putty into the server to see what's going on.
Have it create a new log: -logfile "somelog-with-timestamp.txt". If you use the batch file you can use Windows commands to get the current time automatically and insert that to the filename.

Do you know at what point it stopped working?

 
Have it create a new log: -logfile "somelog-with-timestamp.txt". If you use the batch file you can use Windows commands to get the current time automatically and insert that to the filename.

Do you know at what point it stopped working?
Actually. I don't know when it stops responding to telnet requests.

I will make telnet requests and log that too.

I'll be back.

 
Actually. I don't know when it stops responding to telnet requests.
I will make telnet requests and log that too.

I'll be back.
That would be great. Could you use the "webstat" command to do that? It could also give a bit of further information.

 
Have it create a new log: -logfile "somelog-with-timestamp.txt". If you use the batch file you can use Windows commands to get the current time automatically and insert that to the filename.

Do you know at what point it stopped working?
I cannot, as it is a rented server. I don't have access to the executable.

 
And it restarts the server manually? I'd recommend opening a support ticket with them so they add such parameter automatically. It really helps in keeping logs organized (and archived in case you need an older one).

 
i get the same error alot, windows server

Code:
2015-01-26T18:21:48 38543.227 INF Error in ApiHandler.HandleRequest(): Handler threw an exception: System.IO.IOException: Write failure ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host.





 at System.Net.Sockets.Socket.Send (System.Byte[] buf, Int32 offset, Int32 size, SocketFlags flags) [0x00000] in <filename unknown>:0 


 at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0 


 --- End of inner exception stack trace ---


 at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0 


 at System.Net.ResponseStream.InternalWrite (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0 


 at System.Net.ResponseStream.Write (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0 


 at AllocsFixes.NetConnections.Servers.Web.API.WebAPI.WriteJSON (System.Net.HttpListenerResponse resp, AllocsFixes.JSON.JSONNode root) [0x00000] in <filename unknown>:0 


 at AllocsFixes.NetConnections.Servers.Web.API.GetPlayersLocation.HandleRequest (System.Net.HttpListenerRequest req, System.Net.HttpListenerResponse resp, System.Net.HttpListenerBasicIdentity user) [0x00000] in <filename unknown>:0 


 at AllocsFixes.NetConnections.Servers.Web.ApiHandler.HandleRequest (System.Net.HttpListenerRequest req, System.Net.HttpListenerResponse resp, System.Net.HttpListenerBasicIdentity user) [0x00000] in <filename unknown>:0 


2015-01-26T18:21:48 38543.229 INF Error in Web.HandleRequest(): System.InvalidOperationException: Cannot be changed after headers are sent.


 at System.Net.HttpListenerResponse.set_StatusCode (Int32 value) [0x00000] in <filename unknown>:0 


 at AllocsFixes.NetConnections.Servers.Web.ApiHandler.HandleRequest (System.Net.HttpListenerRequest req, System.Net.HttpListenerResponse resp, System.Net.HttpListenerBasicIdentity user) [0x00000] in <filename unknown>:0 


 at AllocsFixes.NetConnections.Servers.Web.Web.HandleRequest (IAsyncResult result) [0x00000] in <filename unknown>:0
here the output from today

http://www.7dayszombiestomp.com/log/output_log1262015.txt

 
i get the same error alot, windows server
As said before this is normal to occur once in a while. And your log even only contains one single instance of this exception. So nothing out of the ordinary there.

 
Heh, ok, good point, should have made that clearer as it's an undocumented one ;)

It's one of the mods console commands. Only for debugging purposes so I never wrote it down. Just execute it as the command you run regularly and save the output so I can compare it to the thread/mem monitoring :)

 
Hi alloc! I was wondering if it was possible for me to add my own code to your patch?

I tried the steps under "Build yourself" on your website (https://7dtd.illy.bz/wiki/Server%20fixes) but I ran into so many problems. :(

building Deobfuscator requires plenty of dependencies, missing patchers.xml, etc

Would it be possible to package everything in a zip file, deob bin for windows and maybe a small sample on how to write and add/replace code on top of your mod in the server dll?

I would appreciate it a lot!! <3 *makes cute eyes*

There are so many stuff I'd like to add. :)

 
My serverhost Vilayer apparently can't add the webserver. this is their response;

Sorry for the delay, this is not possible currently as we do not run Linux servers so we cannot run webservers along side the game. We will look in to this and try to find a solution but we do not have an eta, once it is added or not added we will email all customers about the update.

Do you know of any way to make it work?

 
building Deobfuscator requires plenty of dependencies, missing patchers.xml, etc
Get the release build of the deobfuscator. You don't have to use its source. Also there is no missing dependency, the only thing not included in the source is the patchers.xml which can be taken from any of the releases.

Sorry for the delay, this is not possible currently as we do not run Linux servers so we cannot run webservers along side the game.
They neither have to run on Linux nor do they have to run any additional software. The webserver stuff is part of the mod and thus is run from within the game server itself. Just add the webserver-folder to the game's root folder and it will run. They only have to make sure the ports aren't in use by anything else and are not blocked by their firewall.

 
Get the release build of the deobfuscator. You don't have to use its source. Also there is no missing dependency, the only thing not included in the source is the patchers.xml which can be taken from any of the releases.
ah right, got it. Got your latest head from your svn and the file webstats.cs is missing (or a bad reference in the csproj?)

 
so ummm, I did a lot of poking around, I managed to deob AC dll, build the fixes dll, the fixer exe. Here's some things I did/had to do:

open '\binary-improvements\server-fixes.sln' with MonoDevelop

change 7dtd-server-fixes target framework to "Mono/.net 4.0". (was 3.5 and yielded compile errors on default parameters, don't know why)

Now I do a full rebuild using Release config. I get the fixer exe and fixes dll under '\binary-improvements\bin\Release' along with all kind of other dll that I'm not sure where they come from. I guess the AC dll in there is the deob one.

run the fixer.exe and get:

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

at System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType)

at System.Reflection.RuntimeMethodInfo.get_CallingConvention()

at Mono.Cecil.MetadataImporter.ImportMethod(MethodBase method, IGenericContext context, ImportGenericKind import_kind)

at dtdfixer.MainClass.addHook(TypeDefinition type, String methodName, Boolean addThisRef, Int32 opCount, Boolean atEnd, MethodBase targetMethod)

at dtdfixer.MainClass.mappingPatch(ModuleDefinition module)

at dtdfixer.MainClass.Main(String[] args)

I've poke around a lot to see what I'm doing wrong. Someone said to remove RSA from the deob AC.dll. I don't know what that means nor how to do that.

So please tell me what I'm doing wrong here. Any idea or pointers?

Thanks

 
Last edited by a moderator:
Back
Top