Native Linux server (with management scripts)

Apparently

Code:
/home/buildbot/buildslave/steam_rel_client_linux/build/src/common/httpclient.cpp (3512) : Assertion Failed: Failed writing http cache file to disk
is just buggy Steam code.

But then I noticed...

When originally installing managment scripts you issue the command:

Code:
wget http://illy.bz/fi/7dtd/linux_files.tar.gz
and then you reissue this command now to update, you basically end up with old files with the archive name

Code:
linux_files.tar.gz
and new files with the archive name

Code:
linux_files.tar.gz.1
so issuing the command

Code:
tar --touch -xvzf linux_files.tar.gz -C /home/sdtd/
actually extracts the old files over the old files.

To fix this the manual at https://7dtd.illy.bz/wiki/Installation#InstalltheLinuxengine should probably state

Code:
wget -O linux_files.tar.gz http://illy.bz/fi/7dtd/linux_files.tar.gz
to be future proof.

 
https://7dtd.illy.bz/wiki/Server%20fixes mentions the command "teleport / tele: Teleport a given player to a position" however the in-game console command teleport is not recognized (*** ERROR: unknown command 'teleport'), tele works, also the tele command description mentions the command teleportplayer instead of teleport.
 
Last edited by a moderator:
Well I updated my server and I'm kind of drunk right now so it took me 3 tries, but thumbs up, it worked in the end.

I made the mistake of downloading the new Linux files as tar.gz.1 and extracting the old one.

Don't update your server when you're drunk folks. I didn't read the release notes either...

 
and new files with the archive name
lol you are right, that is what has happened.. man linux pisses me off sometimes, I just expect it to prompt to overwrite an existing file, not make some new one with an increment ... ffffk :D didnt' even realize the existing files were in the same directory I had done wget no wonder it didn't bloody work :D

 
Now that we have the teleport command I'm inclined to write a script to spawn all first time players to a specific coordinate, unfortunately there is no way to save that as the spawn coordinate. This could be substituted by teleporting them to the same place the first 4 logins and giving (give command) them a sleeping bag to place. But...

I have a rudimentary PHP API (telnet) to the LPE command output to get all details (except there is no logins -counter), but if they where counted then... =\

 
Last edited by a moderator:
So I have killed the server first, deleted the old linux_files tar, downloaded the new one, replaced the old linux files, ran the updater. It continues to say running 9.1.

 
Are you sure that u ran the updater as stated in the notes (with the force parameter)?

Everything worked fine for me, except for the instance crashing shortly after updating, but it seems to be running Ok now so no biggie.

 
Hi,

Running the server on ubuntu since 8. something or whatever. Updates has worked fine with instructions. However since quite some time I noticed some errors in output_log.txt

The file '/home/sdtd/engine/7DaysToDie_Data/mainData' is corrupted! Remove it and launch unity again!

[Position out of bounds! 950916 > 950912]

...

The file '/home/sdtd/engine/7DaysToDie_Data/level0' is corrupted! Remove it and launch unity again!

[Position out of bounds! 162972 > 162968]

...

Fallback handler could not load library /home/sdtd/engine/7DaysToDie_Data/Mono/x86/SteamworksNative

Fallback handler could not load library /home/sdtd/engine/7DaysToDie_Data/Mono/x86/SteamworksNative

Fallback handler could not load library /home/sdtd/engine/7DaysToDie_Data/Mono/x86/SteamworksNative

Fallback handler could not load library /home/sdtd/engine/7DaysToDie_Data/Mono/x86/SteamworksNative

Fallback handler could not load library /home/sdtd/engine/7DaysToDie_Data/Mono/x86/SteamworksNative

SteamworksNative fallback handler error occurs ~10 times or so when starting the instance. Apparently server is running and working as intended. Should I just ignore the messages?

 
Not mentioning the update procedure for the Linux stuff in the release notes of the server fixes has a reason: The fixes are for anyone and obviously don't require you to do anything special for Linux. It was only a matter of the Linux scripts (and compound files) so that's where such information can be found ;)

To fix this the manual at https://7dtd.illy.bz/wiki/Installation#InstalltheLinuxengine should probably state
Code:
wget -O linux_files.tar.gz http://illy.bz/fi/7dtd/linux_files.tar.gz
to be future proof.
Really good suggestion, thanks & done :)

https://7dtd.illy.bz/wiki/Server%20fixes mentions the command "teleport / tele: Teleport a given player to a position" however the in-game console command teleport is not recognized (*** ERROR: unknown command 'teleport'), tele works, also the tele command description mentions the command teleportplayer instead of teleport.
Urgh, yeah ... teleportplayer and teleport is not the same ;) Thanks, fixed.

btw how to use the API? or at least for this method of using the webmap https://7dtd.illy.bz/wiki/webmap
The API is provided by the webserver so if you don't have that running you can't use the API.

could there be a hook for player positions.. i mean short of me using lpe and getting positions from that, it seems like the only way right now.
Nope, the hooks are for events, a players position is not an event ;) Also hooks are log based and there's nothing about positions in the log. You really should go with querying the information when you need it for such things. (What's the problem with the "lp" or "lpe" commands?)

So I have killed the server first, deleted the old linux_files tar, downloaded the new one, replaced the old linux files, ran the updater. It continues to say running 9.1.
Did you actually run updatescripts so you got version 53? If it starts but tells you "9.1" it's probably just using the old server fixes (which are updated with the scripts part).

SteamworksNative fallback handler error occurs ~10 times or so when starting the instance. Apparently server is running and working as intended. Should I just ignore the messages?
Yup, all of that seems to be ok :)

 
For some unknown reason telnet (scripts, netcat?) seems always get stuck at:

Code:
# 7dtd.sh backup
...........
29974.810 Telnet executed "saveworld" from: 127.0.0.1:44357
29975.150 Saving 20 of chunks took 326ms)
29976.830 Telnet connection closed by client: 127.0.0.1:44357
for several "minutes". This pretty much causes some complicated delays in restarts, etc. The message after pressing CTRL-C hints of the issue:

Code:
29976.830 Telnet connection closed by client: 127.0.0.1:44357
^Crsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(549) [sender=3.0.9]
that RSync would be running without any "indication"... but I don't understand why as /usr/local/lib/7dtd/commands/backup.sh doesn't specify any silencing parameters.

This stems from my intention of running:

Code:
#!/bin/bash
. /usr/local/lib/7dtd/common.sh
nice -n 10 /usr/local/bin/7dtd.sh backup
loop 5 6 telnetCommand hoyry3 "say Stopping server, maintenance, try again later..."
in <basedir>/hooks/serverPreStop/backup.sh

Theres a too short delay in /usr/local/lib/7dtd/commands/stop.sh:

Code:
Trying to gracefully shutdown...
Waiting for server to shut down...
1/5
2/5
3/5
4/5
5/5
Failed, force closing server...
Done
Because it times out and on our quad quad core xeon (yes) server shutdown needs anything between 3 to 33 seconds of time. Which obviously can be fixed in /usr/local/lib/7dtd/commands/stop.sh by setting:

Code:
             maxwait=45
but it is wiped during scriptupdate.

 
Last edited by a moderator:
well i disabled the webserver as I never used it and I had noticed the cpu usage on just the webserver part as being a bit high was like 10% the last time I had it on and checked in htop so i disabled it.

i might try it on again for the api, but is there no way the api could be had without all the rest of the webserver ?

"(What's the problem with the "lp" or "lpe" commands?)"

nothing wrong with it, just didn't want to do it with a cron lpe

 
For some unknown reason telnet (scripts, netcat?) seems always get stuck at:...

for several "minutes". This pretty much causes some complicated delays in restarts, etc. The message after pressing CTRL-C hints of the issue:

...

that RSync would be running without any "indication"... but I don't understand why as /usr/local/lib/7dtd/commands/backup.sh doesn't specify any silencing parameters.
Hm, not sure if rsync should output anything be default. But also it normally shouldn't really take that long... For testing you could try adding "-v", maybe it would output what it's doing then.

This stems from my intention of running:
Code:
#!/bin/bash
. /usr/local/lib/7dtd/common.sh
nice -n 10 /usr/local/bin/7dtd.sh backup
loop 5 6 telnetCommand hoyry3 "say Stopping server, maintenance, try again later..."
in <basedir>/hooks/serverPreStop/backup.sh
Why in PreStop? If the server is shutdown anyway you should do the backup in PostStop as by then everything is written ;)

(Obviously the "say"-stuff is right in the PreStop :) )

Theres a too short delay in /usr/local/lib/7dtd/commands/stop.sh:
Yeah yeah ... I know ... adding that soon™ ;)

well i disabled the webserver as I never used it and I had noticed the cpu usage on just the webserver part as being a bit high was like 10% the last time I had it on and checked in htop so i disabled it.
Hm, interesting. How did you find out which thread was the webserver? Does it give you any indication of it? (Would be interested in that too :D ) Webserver shouldn't even be a single thread as each request is handled in a dedicated thread (more or less, they get reused, thanks to the ThreadPool framework in .NET :D )

but is there no way the api could be had without all the rest of the webserver ?
Well, you could remove all the files from the "webserver" folder and than you basically would have API but nothing else. It would still be the same webserver as that is what is providing the API.

"(What's the problem with the "lp" or "lpe" commands?)"nothing wrong with it, just didn't want to do it with a cron lpe
So how would you access the web API? Wouldn't it still be a cron job?

 
Hm, interesting. How did you find out which thread was the webserver? Does it give you any indication of it? (Would be interested in that too ) Webserver shouldn't even be a single thread as each request is handled in a dedicated thread (more or less, they get reused, thanks to the ThreadPool framework in .NET )
i think it might have been the monitor-log.sh ... can't be to sure now, whatever it was, disabling the webserver was just worth while at the time as I never used it. Will check again when i next restart and enable webserver.

"So how would you access the web API? Wouldn't it still be a cron job? "

I haven't even checked the API, if it was a playerhook for player movement i was thinking that an an sh script that checked if a player was in a certain area on a faster interval would be possible, and not using a cron job at all as it would be much slower, like check every 1min.

 
Nope, I was talking about this part which points you to the release notes:
Code:
Please check the release notes before continuing:
 https://7dtd.illy.bz/wiki/Release%20Notes
;)

(And I think it's actually really clearly said there what and where ;) Not reading command output doesn't mean there is none or that it wouldn't contain anything useful)

Also release notes for a software product can be found on the product's website most of the time so that would be a good place to start.

Not meant to be harsh or anything but I just don't like documenting all that stuff and trying to get the commands to point you at what to do for people not even reading it. That's just making me having to repeat instructions over and over again and you (as in "the user") having to wait for my response on questions. That's kinda frustrating :(
Alloc,

First off, I really am grateful for this build. I've been running it on my dedicated server for about a month now. Sadly this last update has really screwed me over. I've done a complete reinstall of the server code and I am still not running an instance I can connect to. I've got both the level0 error in my log as well as a corrupted mainData file. I'd like some help, and yes, I've read the documentation and tried all the steps you've outlined to no avail to my problems.

Your coding work is very good, but your documentation is not as exhaustive as you may believe it to be, as it is hard to determine from forum postings and release notes what steps need to be taken in order to go through the bootstrap.sh install, to a working connectable game. This last update seems to have several steps added in order to get it to work properly. Please just treat me like an idiot and walk me through what EXTRA steps I need to do to get a fresh install working for a dedicated Linux server (I run a nogui Ubuntu). Based on other forum comments (specifically the ones who've said they get things working) I know this must be user error. Thanks.

 
Alloc,
First off, I really am grateful for this build. I've been running it on my dedicated server for about a month now. Sadly this last update has really screwed me over. I've done a complete reinstall of the server code and I am still not running an instance I can connect to. I've got both the level0 error in my log as well as a corrupted mainData file. I'd like some help, and yes, I've read the documentation and tried all the steps you've outlined to no avail to my problems.

Your coding work is very good, but your documentation is not as exhaustive as you may believe it to be, as it is hard to determine from forum postings and release notes what steps need to be taken in order to go through the bootstrap.sh install, to a working connectable game. This last update seems to have several steps added in order to get it to work properly. Please just treat me like an idiot and walk me through what EXTRA steps I need to do to get a fresh install working for a dedicated Linux server (I run a nogui Ubuntu). Based on other forum comments (specifically the ones who've said they get things working) I know this must be user error. Thanks.
Okay,

I just reinstalled the server and now it works, YOU'RE AMAZING YOU FIXED MY PROBLEM WITH YOUR ESP!

 
Back
Top