Native Linux server (with management scripts)

As the engine is started it can't be any of the tools (the engine itself does not rely on the tools). It could only be related to libraries or system settings ... What locale are you running?

 
Code:
root@ribesg:~# locale
LANG=fr_FR.UTF-8
LANGUAGE=
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=
 
Ok, trying it with french installation ... ;)

@Elendar: Are you running on french locale too?

 
@Ribesg: Looks like it indeed is a problem with your locale. I.e. some string parsing function seems to fail because it uses a French interpretation of something that just isn't stored the way you would in French. Judging from the errors it's about parsing doubles.

Please try the following: Open /usr/local/lib/7dtd/commands/start.sh in an editor. Go to line 34 which should be:

Code:
		LD_LIBRARY_PATH=$SDTD_BASE/linux_files $SSD --start $SSD_PID $SSD_DAEMON $SSD_USER --chdir $SDTD_BASE/engine --exec $SDTD_BASE/engine/7DaysToDie.x86 -- $OPTS > $(getInstancePath $1)/stdout.log 2>&1
Add "LC_CTYPE=C.UTF-8 LC_NUMERIC=C.UTF-8 LC_ALL=C.UTF-8" so it looks like:

Code:
		LD_LIBRARY_PATH=$SDTD_BASE/linux_files LC_CTYPE=C.UTF-8 LC_NUMERIC=C.UTF-8 LC_ALL=C.UTF-8 $SSD --start $SSD_PID $SSD_DAEMON $SSD_USER --chdir $SDTD_BASE/engine --exec $SDTD_BASE/engine/7DaysToDie.x86 -- $OPTS > $(getInstancePath $1)/stdout.log 2>&1
And start the instance again.

 
You should add this to the original script, it works!

Well for now I started the server without the error, don't have the time to try to connect to it right now but I'm pretty sure it will be ok.

 
Glad it works. Will add this soon, though I'll have to make sure that the selected locale does actually exist on the system ;)

@Elendar:

Thought something like this was the culprit. Wonder though why it does work with German locales, as we do have the same decimal notation o.O

 
surprisingly i got it working on ubuntu 12 just fine with no problems.. well except from this error during the install

App state (0x300502) downloading, progress: 99.95 (1939972401 / 1941020977)App state (0x300502) downloading, progress: 99.95 (1939972401 / 1941020977)

App state (0x300502) downloading, progress: 99.95 (1939972401 / 1941020977)

App state (0x300502) downloading, progress: 100.00 (735244128 / 735244128)

App state (0x300502) downloading, progress: 100.00 (735244128 / 735244128)

App state (0x300502) downloading, progress: 100.00 (735244128 / 735244128)

Success! App '251570' fully installed.

/home/buildbot/buildslave/steam_rel_client_linux/build/src/clientdll/../common/singleprocesspipe_linux.cpp (146) : Assertion Failed: false

/home/buildbot/buildslave/steam_rel_client_linux/build/src/clientdll/../common/singleprocesspipe_linux.cpp (153) : Assertion Failed: CSingleProcessPipe::BWrite errno=22

=============================================================
but performance was terrible, certainly not something you can run with other gameservers on the same machine as it just chews up the cpu, worst than java minecraft servers.

suffice to say i hope they get a proper linux dedicated server out soon, then I can try again.

though might try setting this up again on another machine where it can't effect other servers

- - - Updated - - -

also does the steam account need to have 7dtd to get the files? so i dont' have to use my own account next time i try setting up a server?????

 
well except from this error during the install
Those are "normal". They appear on some systems, do not know the exact reasons but they also don't seem to matter anyway ;)

but performance was terrible
Hm, looks like it's somewhat different for everyone. At least there were reports it's running ok.

also does the steam account need to have 7dtd to get the files? so i dont' have to use my own account next time i try setting up a server?????
Unfortunately yes, the account has to own 7dtd. If not you would not even need to enter any account data at all ;)

This might change in the future if TFP release a server only build which could be downloaded with anonymous access but that's not for sure.

Regards,

Chris

 
"This might change in the future if TFP release a server only build which could be downloaded with anonymous access but that's not for sure."

yeh thats what i was thinking cus most steam server builds can be installed with anon access

hope they get proper dedicated servers builds out soon

 
so I tried running it again, and for about 5mins the cpu usage was totally fine, then it just spiked and used up all 4 cpu cores and never stopped, even stood still on the map for another 5mins with no zombies around.

 
the only thing is that when it did spike to using all the 4 cpu cores, it was laggy as f#, totally fine when it wasn't though. Now when I try startup the server it just goes straight to using 4cores everytime. And its not like the dedicated server is doing anything else

 
So tried taskset, started an instance and did: taskset -cp 0,1 12652 , whcih seemed to be the main thread.

for about 30mins the server worked great, then it started lagging again, I checked htop to see this...

6ohUe3P.png


looks like a bunch of other threads got started and chewed up the cpu, doing what I don't know but sure would like to, because nothing was happening in game, so was fine for 30mins longer than before and then lagged for 5mins when those other threads with the higher pid value 14411+ got started.

 
Last edited by a moderator:
also how to use taskset on "7dtd.sh start <instance>" so I can limit that to specific cpu cores without having to get pid once I've started it.

 
Hm, why 0,4? As you seem to have only 4 cores (at least htop only shows 4 in your screenshot) the highest number would be 3 ;)

You might want to try to run "taskset -acp 0,3 <pid>" instead where -a makes it set affinity also for all child threads.

Wonder why 7dtd is starting this many threads at all though ... "listthreads" only shows 8 for me while there's roughly 30 threads running. Just some random thing: what locale is your server running?

EDIT:

also how to use taskset on "7dtd.sh start <instance>" so I can limit that to specific cpu cores without having to get pid once I've started it.
You would have to edit /usr/local/lib/7dtd/commands/start.sh line 34. Not sure though if CPU affinity is inherited by new threads started from a process. Testing and will report back with more details ;)

 
Last edited by a moderator:
You would have to edit /usr/local/lib/7dtd/commands/start.sh line 34. Not sure though if CPU affinity is inherited by new threads started from a process. Testing and will report back with more details ;)
Ok, seems to work. You have to edit line 34 of /usr/local/lib/7dtd/commands/start.sh. It should currently start with:

Code:
LD_LIBRARY_PATH=$SDTD_BASE/linux_files $SSD --start $SSD_PID $SSD_DAEMON $SSD_USER --chdir $SDTD_BASE/engine --exec $SDTD_BASE/engine/7DaysToDie.x86 -- $OPTS ...
change it to:

Code:
LD_LIBRARY_PATH=$SDTD_BASE/linux_files/x86 $SSD --start $SSD_PID $SSD_DAEMON $SSD_USER --chdir $SDTD_BASE/engine --exec /usr/bin/taskset -- -c 0 $SDTD_BASE/engine/7DaysToDie.x86 $OPTS ...
The "-c 0" right in front of the 7dtd.x86 is the affinity list, use whatever you like there.

 
yeah i meant 0,3 I just copied pasted it from that site... but i did change it when I did it in ssh

and locale....

LANG=en_GB.UTF-8

LANGUAGE=

LC_CTYPE="en_GB.UTF-8"

LC_NUMERIC="en_GB.UTF-8"

LC_TIME="en_GB.UTF-8"

LC_COLLATE="en_GB.UTF-8"

LC_MONETARY="en_GB.UTF-8"

LC_MESSAGES="en_GB.UTF-8"

LC_PAPER="en_GB.UTF-8"

LC_NAME="en_GB.UTF-8"

LC_ADDRESS="en_GB.UTF-8"

LC_TELEPHONE="en_GB.UTF-8"

LC_MEASUREMENT="en_GB.UTF-8"

LC_IDENTIFICATION="en_GB.UTF-8"

LC_ALL=

 
Hm, ok, that should not be any problem. Thought it might be that in some locales the server starts but some threads could run into problems with data if the locale is a bit weirder ;)

Please tell us if setting the CPU affinity does have any (hopefully positive) effect on performance ,)

 
Fun never ends

Thank for putting this together! I followed the automatic installation and created my instance; however, when I run the instance I get a "Failed!" response looking at the stdout I see this

/usr/local/lib/7dtd/start-stop-daemon/start-stop-daemon: unable to stat /home/sdtd/engine/7DaysToDie.x86 (No such file or directory)
I can confirm I do not have an engine directory at all, did something go awry with my install and if so should I uninstall and reinstall everything or is there a simple fix/point where I can pick up at? I'm running ubuntu 12.04 lts (32bit).
UPDATE

I got the engine problem resolved, I'm still getting a failed though and the output is

Found path: /home/sdtd/engine/7DaysToDie.x86There is no data folder
 
Last edited by a moderator:
Back
Top