arkmanager / ark-server-tools Goto Github PK
View Code? Open in Web Editor NEWSet of server tools used to manage ARK: Survival Evolved servers on Linux
License: MIT License
Set of server tools used to manage ARK: Survival Evolved servers on Linux
License: MIT License
It seems to be necessary
in /etc/sysctl.conf add
fs.file-max=100000
in /etc/security/limits.conf add
* soft nofile 100000
* hard nofile 100000
in /etc/pam.d/common-session add
session required pam_limits.so
your script cant start the server
you are trying to start it with
"thejob="$arkserverroot/$arkserverexec $arkserveropts"
but it should be like this:
thejob="$arkserverroot/ShooterGame/Binaries/Linux/$arkserverexec $arkserveropts"
but anyway screen isn't starting with your script, don't know why..
it looks like maxplayers in ini file does'nt work, but as a start param.
you should add a new variable to arkmanager.cfg to define the playerlimit and add
?MaxPlayers=$arkservermaxplayers
to the arkserveropts in /usr/bin/arkmanager
Spoted in arkmanager script
"376030"
In /etc/arkmanager/arkmanager.cfg I have:
sessioname="[The Saurian Isles][PvE]"
If I let this go through, my server name in game will be "[The".
Instead what I've been doing, is putting the Session Name in my INI file:
[SessionSettings]
SessionName=[The Saurian Isles][PvE]
This seems to work fine. However whenver I update ark-server-tools I manually edit /usr/bin/arkmanager after install, and remove the session name parameters from the doStart() section.
hi,
after "arkmanager install" ShooterGameServer is missing
$ find /home/steam/ARK/
/home/steam/ARK/
/home/steam/ARK/steamclient.so
/home/steam/ARK/steamapps
/home/steam/ARK/steamapps/appmanifest_376030.acf
/home/steam/ARK/steamapps/downloading
/home/steam/ARK/steamapps/temp
/home/steam/ARK/steamapps/libraryfolders.vdf
/home/steam/ARK/linux64
/home/steam/ARK/linux64/steamclient.so
currently our daemons are quite useless, I think we should add a feature to allow crashed servers to start over if needed.
I see that upstart has the respawn stanza for this. I think other systems have their methods.
Hi there,
Awesome little server manager, getting it all ready to go on my VPS.
I see in the files that it checks for an update hourly, and if it finds one, broadcasts a reboot warning to the server, and then reboots the server on the next hourly check.
Any option to configure this? I'd prefer the server check for updates perhaps every 30 minutes, and then once an update is found, Broadcast a server message saying an update is coming in 15 minutes, (and if I'm asking for awesome stuff, perhaps an additional broadcast message 5 minutes before the update happens).
I'd like to make this a little more quick to respond to available server updates.
Cheers,
Levi
Broadcast not working.
Not sure if it's a limitation in the script or a limitation of the game, but we can't add spaces into the server name.
I think we should add support for command concatenation.
This would allow users to run commands like:
arkmanager stop update start
And in future it could be used to prepare one line commands like:
arkmanager update broadcast "Server is again up!"
arkmanager start or stop
/usr/bin/arkmanager: line 44: [665073: command not found
Server appears to start/stop even with this error
Both have to call the start function of arkmanager on the server statup
There's no input or commands that can be written into the server as of now, just an output of data. They might change that in the linux version, but I highly doubt it's going to happen any time soon.
What are your thoughts on either having an info command or integrating into the status command basic server info (i.e. server name including version, and number of players)?
So far, the only cross-distribution way that doesn't involve compiling a program uses either python or perl. Both can take their scripts as multi-line strings arguments.
I looked at bash networking, but it's compiled out on a lot of distributions.
nc isn't universal, and sometimes ncat will be installed instead of nc.
If python or perl are not present, then the distribution must be very limited indeed.
python:
python -c "
import socket
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.settimeout(1.0)
sock.sendto('\xff\xff\xff\xffTSource Engine Query\x00', ('127.0.0.1', ${ark_QueryPort}))
data, addr = sock.recvfrom(1400)
servername, mapname, game, fullname, rest = data[6:-1].split('\0', 4)
players = ord(rest[2])
maxplayers = ord(rest[3])
print('Server Name: {0}'.format(servername))
print('Players: {0} / {1}'.format(players, maxplayers))
except:
print('Unable to query server')
"
perl:
perl -e "my \$port = ${ark_QueryPort}" -e '
use Socket;
socket(my $socket, PF_INET, SOCK_DGRAM, 0);
setsockopt($socket, SOL_SOCKET, SO_RCVTIMEO, pack("i4", 1, 0, 0, 0));
my $sockaddr = pack_sockaddr_in($port, inet_aton("127.0.0.1"));
send($socket, "\xff\xff\xff\xffTSource Engine Query\x00", 0, $sockaddr);
my $data = "";
recv($socket, $data, 1400, 0) or (print "Unable to query server\n" and exit(1));
my ($servername, $mapname, $game, $fullname, $rest) = split(/\x00/, substr($data, 6), 5);
my $players = ord(substr($rest, 2, 1));
my $maxplayers = ord(substr($rest, 3, 1));
print "Server Name: $servername\n";
print "Players: $players / $maxplayers\n";
'
While updating today, i noticed that the updatelog had two identical entries in terms of version.
atrius@natrium:~/ARK$ cat /var/log/arktools/update.log
~
Jun 26, 11:49:46: update to 672599 complete
Jun 27, 02:26:15: update to 673532 complete
Jun 27, 08:56:04: update to 673532 complete
At 02:26 i updated to 180.2 successfully, and now at 08:56 - 180.4.
setCurrentVersion seems to work just fine;
atrius@natrium:~/ARK$ cat arkversion
674165
We should add a command to automatic upgrade ark server tools to the most recent version.
Assigned to me.
If I edit:
home/steam/ARK/ShooterGame/Saved/Config/LinuxServer/GameUserSettings.ini
then, when I start the server, this file is overwritten by default values.
How can I fix it?
Why don't we add
ulimit -n 100000
before the startup command in arkmanager
instead of asking user to edit his system files?
Heya
OS: Debian 64
I used ur script, i install and downloading the game ~17 GB
i wanna start the game server, but the game server wanna start the server, no error logs nothing, no session is running.
I wanna stop the server
arkmanager stop
No screen session found.
what is wrong ?
cya
betaman
http://steamcommunity.com/app/346110/discussions/0/594820656471833280/
You can now remove steam login and password.
Looks like the ARK server have very specific requirements, to simplify everything you can follow this guide, I'll add it later in the documentation of the repo.
install docker using yum or apt-get
service docker start
docker pull ubuntu # downloads ubuntu 14.04
docker run --name ark -t -i -v /home/steam:/home/steam ubuntu /bin/bash
now you are in the ubuntu 14.04 shell, with the host /home/steam
directory mounted inside the docker container as /home/steam
.
We do so because docker size limit is 10gb, and we need 17gb just for the server.
Doing in this way, we'll use the host file system to store the server, but we'll run it from docker.
dpkg --add-architecture i386 # enable x86 support ONLY if you are on X64 server
apt-get update
apt-get install unzip wget nano # needed dependencies and tools
Then you can use the ark-server-tools to setup your server.
Hi,
I'm not able to stop the server using arkmanager stop.
I'm not very familiar with screen, but when I try to retach the session it fails.
screen -r arkserv or screen -r
We should add the iptables rules inside the install script, to open the ports automatically.
or at least write a little tutorial in the README to do so.
Credits:
http://steamcommunity.com/app/346110/discussions/0/594820656473094010/
I'm following this thread and trying to report here every problem I get running these scripts, so you can just follow my commands and hopefully everything will work.
yum groupinstall "Development tools"
yum install glibc-devel.i686 glibc-i686
cd /tmp
wget http://ftp.gnu.org/gnu/glibc/glibc-2.16.0.tar.gz
tar -xvzf glibc-2.16.0.tar.gz
cd glibc-2.16.0
mkdir glibc-build
cd glibc-build
../configure --prefix='/usr'
We have to fix a little typo, so run:
nano +171 ../scripts/test-installation.pl
and replace if (/$ld_so_name/) {
with if (/\Q$ld_so_name\E/) {
then install it:
make
sudo make install
This operation takes a lot of space! be sure to have enough!
cd /tmp
wget ftp://ftp.gwdg.de/pub/misc/gcc/releases/gcc-4.6.4/gcc-4.6.4.tar.gz
tar -xvzf gcc-4.6.4.tar.gz
cd gcc-4.6.4
./contrib/download_prerequisites
mkdir objdir
cd objdir
../configure --prefix=/opt/gcc-4.6.4
make
make install
mv /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6.bak
mv /opt/gcc-4.6.4/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6
mv /opt/gcc-4.6.4/lib64/libstdc++.so.6.0.16 /usr/lib64/libstdc++.so.6.0.16
Hi
You have make an update of your script.
how i can make this update ?
Thanks for your help
it returns always false even if the server is online.
From this remote repo
arkmanager checkupdate
Querying Steam database for latest version...
/usr/local/bin/arkmanager: line 136: parseSteamAppVer: command not found
/usr/local/bin/arkmanager: line 81: [: : integer expression expected
Current version: 672599
Available version:
Your server needs to be restarted in order to receive the latest update.
Run "arkmanager update" to do so
ping @klightspeed
Looks like the latest version is 179.4 but arkmanager says I'm already on the most recent version, even if I'm on 179.3.
Any info?
Hi,
When I start my server, no message it's OK but when i try to look status the server is not running
steam@:~/cmd$ arkmanager start
17:48:12: start
steam@:~/cmd$ arkmanager status
Server running: No
Server online: No
Server version: 672599
I have a create new folder and i have new install, i just copy my saved data => #56
my conf :
# config SteamCMD
steamcmdroot="/home/steam/cmd" # path of your steamcmd instance
steamcmdexec="steamcmd.sh" # name of steamcmd executable
steamcmd_user="steam" # name of the system user who own steamcmd folder
# config Server
sessioname=YourLinuxSessionName
arkserverroot="/home/steam/ark" # path of your ARK server files (default ~/ARK)
arkserverexec="/home/steam/ark/ShooterGame/Binaries/Linux/ShooterGameServer" # name of ARK server executable
arkqueryport="27016" # ARK query port (default 27016)
arkserverport="7778" # ARK server port (default 7778)
arkserverpass="" # ARK server password, empty: no password required to login
arkserverapass="****" # ARK server admin password, KEEP IT SAFE!
# config Service
servicename="arkserv" # Name of the service (don't change if you don't know what are you doing)
logdir="/var/log/arktools" # Logs path (default /var/log/arktools)
# steamdb specific
appid=376030 # Linux server App ID
# admin information
servermail="" # Log email, leave blank if you dont want to receive mail
Update.log :
12:24:34: update to complete
12:25:55: update to complete
15:24:05: No update needed.
17:46:52: No update needed.
Arkserver.log :
12:28:21: start
12:42:00: stop
17:47:36: start
17:48:12: start
I start my server with this command it's OK :
/home/steam/ark/ShooterGame/Binaries/Linux/ShooterGameServer TheIsland?listen?SessionName=[FR/PVE][24/7]Super54-SRV?ServerAdminPassword=**** -server -log
Thanks for your help
I use Centos 7 and I can't seem to start the daemon at all.
I noticed it wouldn't start after running 'arkmanager start' and just getting the start line print in the log and no screen session.
After that I tried running ''/etc/init.d/arkdaemon start" and it printed out
Starting ARK manager daemon used to start the server and keep it updated: /etc/init.d/arkdaemon: line 22: daemon: command not found
I noticed that since I'm using centos I needed to add the following to '/etc/init.d/arkdaemon'
. /etc/init.d/functions
After doing that I now get the following when trying to run ''/etc/init.d/arkdaemon start" or "systemctl start arkdaemon"
Job for arkdaemon.service failed. See 'systemctl status arkdaemon.service' and 'journalctl -xn' for details.
I ran 'systemctl status arkdaemon.service' and the output was: http://pastebin.com/raw.php?i=sjSCCCzv
I realize using centos seems to be non-standard, but any help would be greatly appreciated.
you need to change some stuff
don't use the variable "update" rename it to "patch" or someting and fix this
from:
case "$bnumber" in
*$instver*)
update=0
;; esac
to:
if ["$bnumber" = "$instver"]; then
patch=0
fi
and
# update function
doUpdate() {
if (($update == 1))
change to:
# update function
doUpdate() {
if (($patch== 1))
this doesnt work correctly:
cd $steamcmdroot
bnumber=`./$steamcmdexec +login anonymous +app_info_print "$appid" +quit | grep -EA 5 "^\s+\"public\"$" | grep -E "^\s+\"buildid\"\s+" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -f3 | sed 's/^ //' | cut -c9-14`
better use:
bnumber=`$steamcmdroot/$steamcmdexec +login anonymous +app_info_print "376030" +quit | grep -EA 5 "^\s+\"public\"$" | grep -E "^\s+\"buildid\"\s+" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -f3 | sed 's/^ //' | cut -c9-14`
and think about the changes to doStop()!
you cant enter Y when you update via crontab
I leave empty the password but my server appear protected in steam list.
Can we add an option in the .arkmanager.cfg to append command line arguments for launch?
I've gone in and manually changed /usr/bin/arkmanager, but this is probably not the best solution.
arkserveropts="TheIsland?SessionName=[ The Saurian Isles ]?QueryPort=$arkserverport?ServerPassword=$arkserverpass?ServerAdminPassword=$arkserverapass?listen?MaxPlayers=30?AllowThirdPersonPlayer=True?ServerCrosshair=True?ServerPVE=True?MapPlayerLocation=True?DifficultyOffset=0"
It would be nice if I could put the part that I'm appending, "?MaxPlayers=30?AllowThirdPersonPlayer=True?ServerCrosshair=True?ServerPVE=True?MapPlayerLocation=True?DifficultyOffset=0?SessionName=[ The Saurian Isles ]", in the .arkmanager.cfg so that it will carry over once the main arkmanager is updated.
Cheers!
When I run an update, i have this :
My script is in /home/steam/steamcmd, i have configure .cfg
arkmanager.cfg :
# config SteamCMD
steamcmdroot="/home/steam/steamcmd" # path of your steamcmd instance
steamcmdexec="steamcmd.sh" # name of steamcmd executable
steamcmd_user="steam" # name of the system user who own steamcmd folder
# config Server
sessioname=YourLinuxSessionName
arkserverroot="/home/steam/steamcmd" # path of your ARK server files (default ~/ARK)
arkserverexec="ShooterGame/Binaries/Linux/ShooterGameServer" # name of ARK server executable
ERROR :
arkmanager update
/usr/bin/arkmanager: ligne 70 : [: : nombre entier attendu comme expression
The server is already stopped
Redirecting stderr to '/root/Steam/logs/stderr.txt'
[ 0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API.../home/buildbot/buildslave/steam_rel_client_linux/build/src/clientdll/applicationmanager.cpp (3030) : Assertion Failed: CApplicationManager::GetMountVolume: invalid index
/home/buildbot/buildslave/steam_rel_client_linux/build/src/clientdll/applicationmanager.cpp (3030) : Assertion Failed: CApplicationManager::GetMountVolume: invalid index
/home/buildbot/buildslave/steam_rel_client_linux/build/src/clientdll/applicationmanager.cpp (3181) : Assertion Failed: m_vecInstallBaseFolders.Count() > 0
/home/buildbot/buildslave/steam_rel_client_linux/build/src/steamconsole/../common/steam/client_api.cpp (393) : Assertion Failed: ClientAPI_Init(GlobalInstance): GetIClientRemoteControlManager returned NULL.
FAILED.
Thank you for your responce
When checking for new updates, it always prints that there isn't any updates available.
It only works when updating manually with steamcmd first.
I cannot get my server to show up in the server list or steam server browser
steam@playark:~$ arkmanager status
Server running: Yes
Server online: No
Server version: 674165
Iptables:
root@playark:~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:27015
ACCEPT udp -- anywhere anywhere udp dpt:27015
ACCEPT udp -- anywhere anywhere udp dpt:7777
ACCEPT udp -- anywhere anywhere udp dpt:7777
ACCEPT tcp -- anywhere anywhere tcp dpt:7778
ACCEPT udp -- anywhere anywhere udp dpt:7778
ACCEPT tcp -- anywhere anywhere tcp dpt:27016
ACCEPT udp -- anywhere anywhere udp dpt:27016
Netstat does not show anything listening on 7778
root@playark:~# netstat -puln | grep ShooterGame
udp 0 0 0.0.0.0:27016 0.0.0.0:* 13308/ShooterGameSe
Config /etc/arkmanager/arkmanager.cfg
# config SteamCMD
steamcmdroot="/home/steam/steamcmd" # path of your steamcmd instance
steamcmdexec="steamcmd.sh" # name of steamcmd executable
steamcmd_user="steam" # name of the system user who own steamcmd folder
steamcmd_appinfocache="/home/steam/Steam/appcache/appinfo.vdf" # cache of the appinfo command
# config environment
arkserverroot="/home/steam/ark" # path of your ARK server files (default ~/ARK)
arkserverexec="ShooterGame/Binaries/Linux/ShooterGameServer" # name of ARK server executable
# ARK server options - use ark_<optionname>=<value>
# comment out these values if you want to define them
# inside your GameUserSettings.ini file
serverMap="TheIsland" # server map (default TheIsland)
ark_SessionName="Test" # if your session name needs special characters please use the .ini instead
ark_Port="7778" # ARK server port (default 7778)
ark_QueryPort="27016" # ARK query port (default 27016)
ark_ServerPassword="" # ARK server password, empty: no password required to login
ark_ServerAdminPassword="test" # ARK server admin password, KEEP IT SAFE!
ark_MaxPlayers="70"
# config Service
servicename="arkserv" # Name of the service (don't change if you don't know what are you doing)
logdir="/var/log/arktools" # Logs path (default /var/log/arktools)
# steamdb specific
appid=376030 # Linux server App ID
# admin information
servermail="" # Log email, leave blank if you dont want to receive mail
Create a deb and RPM package instead of the current install script.
For RPM it's really easy with maven RPM plugin.
Hi,
I installed the server on my Debian server. I upped the openfile limit (checked with ulimit -a), opened the firewall ports, re-routed some ports to an internal IP as a tutorial somewhere said, etc.
After quite some time trying to get it to work, it doesn't. Here is the error I get :
Setting breakpad minidump AppID = 346110
LowLevelFatalError [File:F:\UE4\UnrealEngine\Projects\ShooterGame\Source\ShooterGame\Private\ShooterGameMode.cpp] [Line: 439]
Can't load world save file, and can't find a valid backup.
Signal 11 caught.
/var/log/arktools/arkserver.log (END)
If anyone had a similar error and fixed it or know how to fix it, I'd be glad to try the solution out.
Thanks !
Heya
great work, now dl time.
Pre question, any server config files for player limits etc ?
[ServerSettings]
DifficultyOffset=0.200000
GlobalVoiceChat=False
ServerPVE
ServerHardcore
ServerCrosshair
ServerForceNoHUD
AltSaveDirectoryName
GlobalVoiceChat
NoTributeDownloads
AlwaysNotifyPlayerLeft
DontAlwaysNotifyPlayerJoined
AllowThirdPersonPlayer
MapPlayerLocation
Perhaps had u a good config file for PvE server, thx
regards
Betaman
I think we could log the output of the ShooterGame session, so users can see the log and see what the server is currently displaying.
This will be particularly useful once we'll release 1.1 where screen was replaced by nohup
It will be very nice if you can add the option MultiHome
here:
https://github.com/FezVrasta/ark-server-tools/blob/master/tools/arkmanager#L125
It would be very nice if you could add an option to run multiple game servers and use only one arkmnanager.
I think we should keep the master branch stable. It's best practice that can help us a lot.
What to do:
When a dev branch is ready and tested we can merge it into the master.
It's currently hardcoded --> [email protected]
Today I updated arkmanager via curl -s https://raw.githubusercontent.com/FezVrasta/ark-server-tools/master/netinstall.sh | sudo bash -s steam
then
$ arkmanager update
"Your server is already up to date! The most recent version is 673532."
That was 1 h ago, I knew there was an update, so I did it manually via steamcmd and finally got "Your server is already up to date! The most recent version is 674165."
This is my update.log:
08:30:17: update to 669428 complete
20:16:34: No update needed.
20:17:17: No update needed.
09:11:33: No update needed.
09:13:01: No update needed.
09:17:17: No update needed.
09:45:38: No update needed.
When I now start ShooterGame via "arkmanager start" with my arkmanager.cfg, I get a Signal11 crash.
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
Setting breakpad minidump AppID = 346110
Signal 11 caught.
I can start the server manually but can't get it to start via arkmanager. Worked fine until the last ShooterGame Update.
Can you point me in the right direction where to find some logs to the problem?
Heya
OS: Debian 8 with 64 bit
First great script xD
second small bug, if u wanna use arkmanager status
u get this message
Server running: Yes
Server online: No <<<<<<< Server ist online and u can join the server
Server version: 666499
regards
Betaman
What we should have
Server running: No
Server online: No
Server version: 665994
What we really have
root@nas:/home/steam/ark-server-tools/tools# /etc/init.d/arkdaemon status
โ arkdaemon.service - LSB: ARK manager deamon
Loaded: loaded (/etc/init.d/arkdaemon)
Active: inactive (dead) since mer. 2015-06-24 19:31:37 CEST; 1min 5s ago
Process: 765 ExecStop=/etc/init.d/arkdaemon stop (code=exited, status=0/SUCCESS)
Tested on the last revision of 1.1 banch on Debian 8. I think it's the same on CentOS7 and other distro who used systemd.
This branch is 27 commits ahead, 37 commits behind master.
This branch should have nothing behind the master.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.