arkmanager / ark-server-tools

Set of server tools used to manage ARK: Survival Evolved servers on Linux
MIT License
679 stars 143 forks source link

Ubuntu server won't go online / show up in server list #77

Closed timelf123 closed 9 years ago

timelf123 commented 9 years ago

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
Atriusftw commented 9 years ago

Nothing wrong with your configurations as far as my eye can tell. How long have you waited? It may take up to 10~ minutes before it binds to steam servers.

Is your server connected to a router? If so, did you forward the ports there aswell?

Also, have you manually defined ports in your GameUserSettings.ini? If so, remove those.

If you give me the IP address of your server i'll check if i can reach it from here.

FezVrasta commented 9 years ago

how much ram does it take?

timelf123 commented 9 years ago
steam@playark:~$ ps aux |grep steam
steam    13954 99.9 18.9 557544 191788 pts/0   Rl   13:21   1:13 /home/steam/ark/ShooterGame/Binaries/Linux/ShooterGameServer TheIsland?MaxPlayers=70?Port=7776?QueryPort=27016?ServerAdminPassword=test?SessionName=test?listen

Note the port 7776 above, even though my settings in /etc/arkmanager/arkmanager.cfg were 7778.

RAM:

root@playark:~# pmap  -x PID
13308:   /home/steam/ark/ShooterGame/Binaries/Linux/ShooterGameServer TheIsland?MaxPlayers=70?Port=7776?QueryPort=27016?ServerAdminPassword=test?SessionName=test?listen
Address           Kbytes     RSS   Dirty Mode  Mapping
0000000000400000   50648   32948       0 r-x-- ShooterGameServer
0000000003775000    1020     640      48 rwx-- ShooterGameServer
0000000003874000    1416    1176    1176 rwx--   [ anon ]
0000000004b6e000  103236  102004  102004 rwx--   [ anon ]
00007f425c000000   61280   59972   59972 rwx--   [ anon ]
00007f425fbd8000    4256       0       0 -----   [ anon ]
00007f4263e56000   67240    3748    3748 rwx--   [ anon ]
00007f4268000000     148     128     128 rwx--   [ anon ]
00007f4268025000   65388       0       0 -----   [ anon ]
00007f426c000000   65424   62356   62356 rwx--   [ anon ]
00007f426ffe4000     112       0       0 -----   [ anon ]
00007f4270000000     300     228     228 rwx--   [ anon ]
00007f427004b000   65236       0       0 -----   [ anon ]
00007f427485d000       4       0       0 -----   [ anon ]
00007f427485e000    8192       8       8 rwx--   [ anon ]
00007f427505e000       4       0       0 -----   [ anon ]
00007f427505f000    1024       8       8 rwx--   [ anon ]
00007f427515f000       4       0       0 -----   [ anon ]
00007f4275160000    1024      20      20 rwx--   [ anon ]
00007f4275260000       4       0       0 -----   [ anon ]
00007f4275261000    1024      12      12 rwx--   [ anon ]
00007f4275361000       4       0       0 -----   [ anon ]
00007f4275362000    1024      12      12 rwx--   [ anon ]
00007f4275462000       4       0       0 -----   [ anon ]
00007f4275463000    8840    7844    7844 rwx--   [ anon ]
00007f4275d05000   17448   10476       0 r-x-- steamclient.so
00007f4276e0f000    2048       0       0 ----- steamclient.so
00007f427700f000     812     812     812 r-x-- steamclient.so
00007f42770da000     104     104     104 rwx-- steamclient.so
00007f42770f4000     268     256     256 rwx--   [ anon ]
00007f4277137000    2852     340       0 r-x-- locale-archive
00007f4277400000    4096    2048    2048 rwx--   [ anon ]
00007f4277822000    1792    1512       0 r-x-- libc-2.21.so
00007f42779e2000    2048       0       0 ----- libc-2.21.so
00007f4277be2000      16      16      16 r-x-- libc-2.21.so
00007f4277be6000       8       8       8 rwx-- libc-2.21.so
00007f4277be8000      16      12      12 rwx--   [ anon ]
00007f4277bec000      88      76       0 r-x-- libgcc_s.so.1
00007f4277c02000    2044       0       0 ----- libgcc_s.so.1
00007f4277e01000       4       4       4 rwx-- libgcc_s.so.1
00007f4277e02000     960     756       0 r-x-- libstdc++.so.6.0.20
00007f4277ef2000    2048       0       0 ----- libstdc++.so.6.0.20
00007f42780f2000      32      32      32 r-x-- libstdc++.so.6.0.20
00007f42780fa000       8       8       8 rwx-- libstdc++.so.6.0.20
00007f42780fc000      84      16      16 rwx--   [ anon ]
00007f4278111000    1052     496       0 r-x-- libm-2.21.so
00007f4278218000    2044       0       0 ----- libm-2.21.so
00007f4278417000       4       4       4 r-x-- libm-2.21.so
00007f4278418000       4       4       4 rwx-- libm-2.21.so
00007f4278419000      64      64       0 r-x-- libsteam_api.so
00007f4278429000    2048       0       0 ----- libsteam_api.so
00007f4278629000       4       4       4 r-x-- libsteam_api.so
00007f427862a000       4       4       4 rwx-- libsteam_api.so
00007f427862b000       4       4       4 rwx--   [ anon ]
00007f427862c000      28      28       0 r-x-- librt-2.21.so
00007f4278633000    2044       0       0 ----- librt-2.21.so
00007f4278832000       4       4       4 r-x-- librt-2.21.so
00007f4278833000       4       4       4 rwx-- librt-2.21.so
00007f4278834000      12      12       0 r-x-- libdl-2.21.so
00007f4278837000    2044       0       0 ----- libdl-2.21.so
00007f4278a36000       4       4       4 r-x-- libdl-2.21.so
00007f4278a37000       4       4       4 rwx-- libdl-2.21.so
00007f4278a38000      96      96       0 r-x-- libpthread-2.21.so
00007f4278a50000    2048       0       0 ----- libpthread-2.21.so
00007f4278c50000       4       4       4 r-x-- libpthread-2.21.so
00007f4278c51000       4       4       4 rwx-- libpthread-2.21.so
00007f4278c52000      16       4       4 rwx--   [ anon ]
00007f4278c56000     144     144       0 r-x-- ld-2.21.so
00007f4278c7a000       4       0       0 -----   [ anon ]
00007f4278c7b000     128       8       8 rwx--   [ anon ]
00007f4278c9b000       4       0       0 -----   [ anon ]
00007f4278c9c000     128       8       8 rwx--   [ anon ]
00007f4278cbc000       4       0       0 -----   [ anon ]
00007f4278cbd000     752     492     492 rwx--   [ anon ]
00007f4278d7b000       4       0       0 -----   [ anon ]
00007f4278d7c000     128      12      12 rwx--   [ anon ]
00007f4278d9c000       4       0       0 -----   [ anon ]
00007f4278d9d000     128       8       8 rwx--   [ anon ]
00007f4278dbd000      28      28       0 r-xs- gconv-modules.cache
00007f4278dc4000     688     680     680 rwx--   [ anon ]
00007f4278e75000      16      16      16 rwx--   [ anon ]
00007f4278e79000       4       4       4 r-x-- ld-2.21.so
00007f4278e7a000       4       4       4 rwx-- ld-2.21.so
00007f4278e7b000       4       4       4 rwx--   [ anon ]
00007ffdb9f2b000     192     192     192 rwx--   [ stack ]
00007ffdb9f70000       8       0       0 r----   [ anon ]
00007ffdb9f72000       8       4       0 r-x--   [ anon ]
ffffffffff600000       4       0       0 r-x--   [ anon ]
---------------- ------- ------- -------
total kB          557584  289928  242356
timelf123 commented 9 years ago

I can't reach the server on 7776 or 27015 Following up with host, but it's an unmanaged VPS. I have not changed anything in the INI files

# nmap 74.91.119.157 -p 7776-7778,27015-27020

Starting Nmap 6.47 ( http://nmap.org ) at 2015-06-27 14:32 CDT
Nmap scan report for v-74-91-119-157.unman-vds.internap-chicago.nfoservers.com (74.91.119.157)
Host is up (0.000028s latency).
PORT      STATE  SERVICE
7776/tcp  closed unknown
7777/tcp  closed cbt
7778/tcp  closed interwise
27015/tcp closed unknown
27016/tcp closed unknown
27017/tcp closed unknown
27018/tcp closed unknown
27019/tcp closed unknown
27020/tcp closed unknown

Turn off firewall:

root@playark:~# ufw disable
Firewall stopped and disabled on system startup

On server itself, scan ports:

root@playark:~# nmap localhost -p 27015

Starting Nmap 6.47 ( http://nmap.org ) at 2015-06-27 15:01 CDT
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000047s latency).
Other addresses for localhost (not scanned): 127.0.0.1
PORT      STATE  SERVICE
27015/tcp closed unknown

Nmap done: 1 IP address (1 host up) scanned in 0.28 seconds

On server, see what is listening:

root@playark:~# netstat -tuln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
udp    19968      0 0.0.0.0:27015           0.0.0.0:*

Does the 7778 port ever listen on a box that works?

klightspeed commented 9 years ago

The server will just hang with 100% CPU while loading if you haven't increased the maximum number of open files (which defaults to 1024).

What is the output of ulimit -n?

Also, do you have a /home/steam/.arkmanager.cfg file?

Note that you need to either:

Atriusftw commented 9 years ago

Maybe your host have closed ports in their network infrastructure? Port 7777 is especially known for trojan attacks in the past.

Nmap scan report for v-74-91-119-157.unman-vds.internap-chicago.nfoservers.com (74.91.119.157)
Host is up (0.093s latency).
PORT      STATE         SERVICE
7776/udp  open|filtered unknown
7777/udp  closed        unknown
7778/udp  closed        interwise
27015/udp open|filtered halflife
27016/udp closed        unknown
27017/udp open|filtered unknown
Nmap scan report for v-74-91-119-157.unman-vds.internap-chicago.nfoservers.com (74.91.119.157)
Host is up (0.093s latency).
PORT      STATE    SERVICE
7776/tcp  filtered unknown
7777/tcp  filtered cbt
7778/tcp  closed   interwise
27015/tcp closed   unknown
27016/tcp closed   unknown
27017/tcp filtered unknown
timelf123 commented 9 years ago

@klightspeed I fixed my /etc/security/limits.conf and verified the ulimit worked on the steam user.

steam@playark:~$ ulimit -n
100000

I can't seem to get the server to stay online for more than a few minutes. It fails silently.

steam@playark:~$ arkmanager status
 Server running:   Yes
 Server online:   No
 Server version:   674165

root@playark:~# netstat -puln | grep ShooterGame
udp        0      0 0.0.0.0:27016           0.0.0.0:*                           15884/ShooterGameSe

A few min later...

steam@playark:~$ arkmanager status
 Server running:   No
 Server online:   No
 Server version:   674165

root@playark:~# netstat -puln | grep ShooterGame
steam@playark:~$ cat /var/log/arktools/arkserver.log
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
Setting breakpad minidump AppID = 346110
klightspeed commented 9 years ago

If you run the server directly, what do you get? Does it abort, or is it killed? Also, are there any errors (such as OOM errors) in your kernel logs?

(Enhancement idea: perhaps we should have a "run" command that doesn't background the server, and have that backgrounded and logged by the start command?)

Do you have at least 4GB of RAM plus some swap on that server? The server uses about 3.3GB of RAM when running.

Atriusftw commented 9 years ago

@klightspeed If you're thinking of logs from the actual server, that's placed in arkserver.log. Sadly, there isnt too much logged from it.

FezVrasta commented 9 years ago

I was wondering if we should allow users to post here about problems not related with ARK Server Tools...

Atriusftw commented 9 years ago

@FezVrasta OP thought the issue was related to ARK Server Tools. I'd be happy to help with any issues regarding Linux server for ARK, but you are correct that this isn't the place to post such issues.

I'll just refer to this thread for those.

OT - Maybe you could add some people as collaborators in the repository to help with labeling and closing issues?

klightspeed commented 9 years ago

@Atriusftw The logs I mean are /var/log/messages or the output of dmesg. See http://linux-mm.org/OOM_Killer - if you don't have enough RAM, and the kernel can't swap out pages to make room, it will kill the process that has been allocating the most memory (in this case the ARK server), and log in the kernel log that it has done so.

In any case, this is an issue with the ARK server itself or with the host configuration, and not with the ARK server tools.

In the case of the open files limit, until the developers combine their assets into .u files, perhaps we should add ulimit -n 100000 before the start and restart actions in the init scripts.

FezVrasta commented 9 years ago

@klightspeed the ulimit -n 100000 is already implemented in 1.2

klightspeed commented 9 years ago

@FezVrasta the implementation in 10a6b21 won't work, as unprivileged users can't increase their limits, they can only reduce them.

$ ulimit -n
1024
$ ulimit -n 100000
bash: ulimit: open files: cannot modify limit: Operation not permitted
FezVrasta commented 9 years ago

Ah I never tried it, woops

timelf123 commented 9 years ago

This turned out to be too little memory, thanks for the help everyone.

I agree this is not the place for general server questions but I initially thought the problem was related to ark-server-tools. +1 to the ulimit stuff. I had the wrong syntax in my /etc/security/limits.conf at first.