Jump to content

Native Linux server (with management scripts)


Alloc

Recommended Posts

Well looks like i figured out my own problem.

 

In looking for why I was having an issue i was looking at the updateengine.sh file when i noticed that there was a --check command. When performing that command it showed me a list of version available for 7 Day to die server and it turns out I seem to be on the latest version of the experimental. However I have no idea how I got on the latest. Puzzling and please disregard this post if you haven't already. user error! =)

 

Grampy

Link to comment
Share on other sites

Hm, password should not affect using LiteNetLib. Our testers have been doing this for months. Can you disable SteamNetworking again and create a bug report with a log from both client and server after failed login with password?

 

Well i have to admit, that i didn't try it at the time of my post. I have read it in the bug thread of b197.

But as requested here the logs from client and sever.

 

Client complete log: https://pastebin.com/UXx7V77h

Important lines i think???!!!

2018-11-23T20:08:21 10.213 INF WorldStaticData.Init() needed 2.377s
2018-11-23T20:08:21 10.475 INF [steamworks.NET] Login ok.
2018-11-23T20:08:21 10.779 INF AchievementManager: Received stats and achievements from Steam
2018-11-23T20:08:24 13.382 INF Started thread ServerBrowserListUpdater
2018-11-23T20:08:27 16.152 INF Connecting to server 192.168.178.22:25000...
2018-11-23T20:08:27 16.154 INF NET: LiteNetLib trying to connect to: 192.168.178.22:25000
2018-11-23T20:08:27 16.160 INF Exited thread ServerBrowserListUpdater
2018-11-23T20:08:27 16.250 INF NET: LiteNetLib: Connection failed: ConnectionRejected
2018-11-23T20:08:27 16.251 INF NET: Steam NW trying to connect to: 192.168.178.22:25000
2018-11-23T20:08:27 16.251 INF [steamworks.NET] NET: Resolving SteamID for IP 192.168.178.22:25000
2018-11-23T20:08:27 16.282 INF [steamworks.NET] NET: Connecting to SteamID XXXXXXXXX 
2018-11-23T20:08:42 31.318 INF [steamworks.NET] NET: P2PSessionConnectFail to: XXXXXXXXX - Error: k_EP2PSessionErrorTimeout
2018-11-23T20:08:42 31.464 ERR [NET] Connection to server failed: Connection timed out

 

Server (shows nothing at connection attempt, but here startup log)

https://pastebin.com/AtKaKrux

Link to comment
Share on other sites

Not sure if this was discussed on this thread or not, i didn't search, but it seems that the --check command doesn't report accurately the builds issued by steamCMD. I am not a coder/programmer but looking at the updateengine.sh script the --check seems to generate a file called 7dtd.appinfo in the /tmp/ directory. From that point on it just continues to look at this file it seems. If you delete file/tmp/7dtd.appinfo and then do a --check command again it seems to see the correct information. However I still had to run the --force to get it to update the server.

 

Just thought I would post this for FYI. If its a know issue or not an issue then I apologize for the post in advance. =)

 

Grampy

Link to comment
Share on other sites

  • 2 weeks later...

[uPDATED April 2019] I am now using Alloc's build for my servers. So I'm updating this with as a reference to anyone that want's to run it without Alloc's fixes included.

 

[OLD Method Dec 2018: My Setup Prior to switching over to Alloc's build]

 

This is just a basic quick set of shell scripts I created to quickly get the A17 builds running without much fuss and also puts the output log into a tmux session with a tail -f command. So you can activly see the console log as it runs and generates the world files. I did this because i wanted a quick and dirty way to get the A17 builds up and running without fooling around with to many config files for LGSM.

 

I use TMUX to do this

 

Install tmux with ...

sudo apt-get install tmux 

 

I realize this stuff is very rough but it's something I just threw together quickly. This update script adds the -beta operand to pull down the A17 experimental build.

 

update.sh

steamcmd +login anonymous +force_install_dir /home/sduser/sdtdservers +app_update 294420 -beta latest_experimental -validate +exit

 

Make sure to create the "Log" directory and update the location of SDTDLog before you start the server. first run may generate an error due to the server not having a log file to copy yet but subsequent runs will work as the log file will be generated/moved/linked to the current running log.

 

sdtdserver.sh

#!/bin/bash

SDTDData="/home/sduser/sdtdservers/7DaysToDieServer_Data"
SDTDLog="/home/sduser/sdtdservers/Log"

for f in $SDTDData/output_log*.txt; do mv $f $SDTDLog; done
rm $SDTDLog/output-atrum.log

tmux new -d -s sdtdserver "./startserver.sh -configfile=atrum.xml"
sleep 2

ln -s $SDTDData/output_log*.txt $SDTDLog/output-atrum.log

tmux new -d -s sdtdloger "/usr/bin/tail -F $SDTDLog/output-atrum.log"

 

you can call the output log using ./monitor

 

monitor.sh

tmux attach -t sdtdloger

 

can kill the server and monitor sessions using ./killserver.sh

 

killserver.sh

 

tmux kill-session -t sdtdserver
tmux kill-session -t sdtdloger

 

make sure to chmod 755 the 4 files.

 

chmod 755 update.sh
chmod 755 sdtdserver.sh
chmod 755 monitor.sh
chmod 755 killserver.sh

 

to update the server issue ./update.sh

to start the server (after editing your custom config file) issue ./sdtdserver.sh

to watch the log issue ./monitor.sh

to kill the server and the log watching session issue ./killserver.sh

 

while your in the monitor session you can press CTRL B followed by Left Shift " to break the screen in half at the horizon. This puts you at a console prompt in the lower window to do other things with. Often i will start an htop session in the lower window so i can see processor utilization and memory usage on 7DaysToDiesServer.x86_64.

 

NOTE: CTRL B followed by Left Shift % (while in the montior session) breaks the screen into two vertical sessions.

Edited by morggin (see edit history)
Link to comment
Share on other sites

The network protocols are what the game client is using to communicate with the server?

Is there a good/better/best type to use? I am totally lost on this part of the settings and just leave whatever is in place stock.

The default (disabling SteamNetworking) is good to go (that's why it is default ;) ) for typical dedicated servers. LiteNetLib typically performs better than SteamNetworking. The only reason to use SteamNetworking would be if your server is behind a NAT router and you don't want to / can't open the required ports. Though in that case outside people will still only be able to connect to your server once someone connected locally and the others are on this persons friends list.

 

 

 

I am using the linux 7dtd server setup from here.. https://7dtd.illy.bz/wiki

 

When I use commands..

 

sudo 7dtd.sh updateengine --experimental

or

sudo 7dtd.sh updateengine --branch -beta

 

I just get told that the engine is on the newest build on the selected branch "latest_experimental" (local: 3321792, remote: 3321792) and won't seem to update. I have read the wiki extensively but there seems to be no documentation on these command variables.

The second command is wrong, it would be "--branch latest_experimental". Though your first version is preferred for switching exp/stable branches. Adding "--force" always makes sure to update to whatever Steam provides, even if update detection fails for some unknown reason. Update detection checks are only performed every 10 minutes, so if you run e.g. "7dtd.sh updateengine --check" just before a new build is put live on Steam and then another time after a new build is live within 10 minutes from the first execution you'll still get the old data. Unfortunately SteamCMD has some bugs here that this timeout stuff tries to work around.

 

 

 

Well i have to admit, that i didn't try it at the time of my post. I have read it in the bug thread of b197.

But as requested here the logs from client and sever.

I assume you always tried to connect by IP and not from the server list. In that case there was a bug in the server that did not show you the password prompt when you tried to login with an invalid / no password and thus it looked like it failed for some unknown reason. This should be fixed in the latest experimental build last night.

Link to comment
Share on other sites

  • 2 weeks later...

I just updated my linux based dedicated server to A17 and was wondering if there are new or changed property names for the config file that reflect the new settings available in game. For example. You can now control how zombies move during the day, night, when feral and during bloodmoon.

Link to comment
Share on other sites

  • 2 weeks later...

Just released v111, which should work fine with A17. Still thinking about removing the instance editor, it's a pain in the ass to keep updated and also makes it incompatible with different versions of the game (e.g. when switching back to A16 now).

 

Sorry for the long delay, was kinda bad timing on the A17 release for me :(

Link to comment
Share on other sites

  • 1 month later...

Hey Alloc

 

Don't know if I'm doing something wrong or if this is a bug but I have some weird behaviour. I had a server on A17.1 b9 and tried updating to the latest stable version.

 

NulGaiu.png

 

Then I tried with the --force parameter, it downloaded some stuff from steam and now I get this message.

 

Engine is already at the newest build on the selected branch "public" (local: 3579269, remote: 3472022)

 

After this the server refused to boot up but that's most likely because I didn't wipe/change any configs after updating. :D

NulGaiu.jpg.3a122fb2e6e77b44a3ec63c9d1f51c0a.jpg

Link to comment
Share on other sites

Yeah, the build id detection is still wonky (thanks Valve for not fixing your issues :( ). As you did --force should always work, though theoretically if you only run the updateengine once with at least 10min delay in between you *should* also get the proper data.

 

If it's not starting it's *probably* due to the changes in the serverconfig as outlined in the release notes of 17.2. Biggest issue should be the removal of BlockDurabilityModifier and ZombiesRun. Added config stuff should just be ignored as it would stay at the default if not overridden in the config. Will have to update the scripts for this to work again. Mabye I can get to that today or tomorrow.

Link to comment
Share on other sites

Yeah, the build id detection is still wonky (thanks Valve for not fixing your issues :( ). As you did --force should always work, though theoretically if you only run the updateengine once with at least 10min delay in between you *should* also get the proper data.

 

If it's not starting it's *probably* due to the changes in the serverconfig as outlined in the release notes of 17.2. Biggest issue should be the removal of BlockDurabilityModifier and ZombiesRun. Added config stuff should just be ignored as it would stay at the default if not overridden in the config. Will have to update the scripts for this to work again. Mabye I can get to that today or tomorrow.

 

Yeah the configfile was indeed the problem :). Got everything working again now, just wanted to report this because I wasn't sure if you were aware of it already.

 

Thanks!

Link to comment
Share on other sites

  • 3 months later...

I am attempting to set up a server on Ubuntu. I get through everything and go through the setting up an instance. However, I then get a bunch of issues with xmlstarlet. I tried to figure it out, but now it is 1 am and I am frustrated, so I am parking this here to see if anyone has a solution.

 

Screen cap of output https://prnt.sc/nz5da1

 

Also, I have installed it, though using apt did not work, I had to use snap.

Edited by Hammerofheaven
Forgot link (see edit history)
Link to comment
Share on other sites

ok, that's odd. I just install it via apt.

 

You should run all of these commands under root.

 

apt-get update

apt-get install xmlstarlet

apt-get install lib32gcc1

apt-get install lib32stdc++6

apt-get install make

apt-get install gcc

 

That should take care of it nicely

 

 

I assume you're using Ubuntu server, and not desktop version though.

Link to comment
Share on other sites

ok, that's odd. I just install it via apt.

 

You should run all of these commands under root.

 

apt-get update

apt-get install xmlstarlet

apt-get install lib32gcc1

apt-get install lib32stdc++6

apt-get install make

apt-get install gcc

 

That should take care of it nicely

 

 

I assume you're using Ubuntu server, and not desktop version though.

 

 

I am running Ubuntu server, I have run the above commands. This is what happens when I try to install xmlstarlet - http://prntscr.com/nzcxuz

 

I have installed it with snap, however, it is in a different place. I did mess around with using 'ln' to link the two locations, but that was not working as the examples I found online.

Edited by Hammerofheaven (see edit history)
Link to comment
Share on other sites

Seems like something is messed up with where it's getting the repository from. I've got it set to defaults, and don't have any issues getting it with apt. Just ran it a bit ago, and I get ...

 

root@beta:~# apt-get install xmlstarlet
Reading package lists... Done
Building dependency tree
Reading state information... Done
xmlstarlet is already the newest version (1.6.1-2).
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.

Link to comment
Share on other sites

Seems like something is messed up with where it's getting the repository from. I've got it set to defaults, and don't have any issues getting it with apt. Just ran it a bit ago, and I get ...

 

root@beta:~# apt-get install xmlstarlet
Reading package lists... Done
Building dependency tree
Reading state information... Done
xmlstarlet is already the newest version (1.6.1-2).
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.

 

I don't know what to tell you. This has been an issue for a long time across multiple VMs on my end and so far has only impacted my 7 days server. It started as an issue when I made a server for a17 experimental and ended up just needing to use steam cmd as this script did not function properly... Back then I assumed it was because the script was not updated or some such.

Link to comment
Share on other sites

  • 3 weeks later...

I've recently used the scripts provided to install a 7dtd server, it's working really well except for when I attempt to shut it down, here's what that looks like: https://i.imgur.com/qMfzaZp.jpg

 

Just curious as to whether this is normal behavior or not, I feel as though failing a graceful shutdown isn't a good thing but I'm new to all of this.

 

This is on google cloud using Debian GNU/Linux 9 (stretch).

qMfzaZp.jpg.12482f2b789efa330ec8934098f86410.jpg

Edited by shieldme (see edit history)
Link to comment
Share on other sites

I've recently used the scripts provided to install a 7dtd server, it's working really well except for when I attempt to shut it down, here's what that looks like: https://i.imgur.com/qMfzaZp.jpg

 

Just curious as to whether this is normal behavior or not, I feel as though failing a graceful shutdown isn't a good thing but I'm new to all of this.

 

This is on google cloud using Debian GNU/Linux 9 (stretch).

Either the server did not shut down fast enough (in that case it *could* be an issue if it was not finishing saving data) or it did not properly end all threads (which would only be not so nice behaviour on the server's end that we should get fixed).

 

Would be interesting to see the log of such a terminated session. For more information.

 

Also you can increase the timeout in /etc/7dtd.conf, if it was the first case that should help.

Link to comment
Share on other sites

Thanks for the response, I'll try increasing the timeout but I've been running into more problems, now I can't connect to the server because I'm receiving the error "server is still initiating, please try again in a minute."

 

Here's the log: https://pastebin.com/mmYSbwPi

 

When the server is up and I run status this is the result:

 

Instance: sha

 

Status: Running

Open ports:

26902 (udp)

8081 (tcp)

/usr/local/lib/7dtd/common.sh: line 234: nc: command not found

Players:

 

Game info:

Server name: Shieldme's Humble Abode

Password: ----------

Max players: 6

World: Navezgane

 

Network info:

Port: 26900

Public:

Control Panel: off

Telnet: Port 8081, Pass

 

It was running fine until I got stuck with that "creating player" message. I thought it was client side but decided it couldn't hurt to do an instance restart, not sure what's going on now.

Link to comment
Share on other sites

Oh stupid me ... Of course it won't properly shutdown for you as the shutdown command is issued to the 7dtd process with the netcat (nc) program and it looks like you don't have that installed. I noticed that before but ignored that as not important right now, but obviously shutdowns won't work without it ;) (that's also the reason why you don't see any mention of "Telnet" connection being established and a console command issued in that log)

 

Thanks for the deco file though, maybe we can find what is causing it to fail :)

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...