arkmanager / ark-server-tools

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

Server running but not listening #881

Closed ghost closed 4 years ago

ghost commented 7 years ago

Hi all,

I just installed arkmanager and created a new instance with basic settings. The server is running but is not listening.

I used Ark Manager for months before with a cluster of 3 instances, and it was working like a charm. I stopped playing Ark so I uninstalled everything, and can't get it working properly now... :'(

Running command 'status' for instance 'main'
Server running:   Yes
Server PID:   7716
Server listening:   No
Server build ID:   2258335
Server version:   273.63

When looking at the server in Steam, I can see it but there is no map / no max players:

image

And when trying to connect:

image

I tried with basic settings in order to prevent settings errors or stuffs like that.

My arkmanager.cfg:

arkstChannel="master"
install_bindir="/usr/local/bin"
install_libexecdir="/usr/local/libexec/arkmanager"
install_datadir="/usr/local/share/arkmanager"

# config SteamCMD
steamcmdroot="/home/steam/steamcmd"    
steamcmdexec="steamcmd.sh"
steamcmd_user="steam"   
steamcmd_appinfocache="/home/steam/Steam/appcache/appinfo.vdf"  
steamcmd_workshoplog="/home/steam/Steam/logs/workshop_log.txt"     
#steamlogin="anonymous" 

# config environment
arkserverexec="ShooterGame/Binaries/Linux/ShooterGameServer" 
arkbackupdir="/home/steam/ARK-Backups"
arkwarnminutes="60"
arkautorestartfile="ShooterGame/Saved/.autorestart" 
arkAutoUpdateOnStart="false" 
arkBackupPreUpdate="false"
#arkStagingDir="/home/steam/ARK-Staging"

# Options to automatically remove old backups to keep backup size in check
arkMaxBackupSizeMB="500" 

# Update warning messages
# Modify as desired, putting the %d replacement operator where the number belongs
msgWarnUpdateMinutes="This ARK server will shutdown for an update in %d minutes"
msgWarnUpdateSeconds="This ARK server will shutdown for an update in %d seconds"
msgWarnRestartMinutes="This ARK server will shutdown for a restart in %d minutes"
msgWarnRestartSeconds="This ARK server will shutdown for a restart in %d seconds"
msgWarnShutdownMinutes="This ARK server will shutdown in %d minutes"
msgWarnShutdownSeconds="This ARK server will shutdown in %d seconds"
msgWarnCancelled="Restart cancelled by player request"

# Restart cancel chat command
#chatCommandRestartCancel="/cancelupdate"

# ARK server common options - use ark_<optionname>=<value>
# comment out these values if you want to define them
# inside your GameUserSettings.ini file
serverMap="TheIsland" 

ark_RCONEnabled="False"                    
ark_MaxPlayers="70"

# config Service
logdir="/var/log/arktools"   

# steamdb specific
appid=376030                                            
mod_appid=346110                          

# Mod OS Selection
mod_branch=Windows

# alternate configs
defaultinstance="main"

My main.cfg:

# config environment
arkserverroot="/home/steam/ARK" 

# ARK server options - use ark_<optionname>=<value>
# comment out these values if you want to define them
# inside your GameUserSettings.ini file
serverMap="TheIsland"  
ark_RCONEnabled="False" 
ark_RCONPort="32330"
ark_SessionName="ARK Server Tools"
ark_Port="7777" 
ark_QueryPort="27015"
ark_MultiHome="46.105.***.***" 
ark_ServerPassword=""
ark_ServerAdminPassword="****"
ark_MaxPlayers="70"

As you can see, I'm using the MultiHome option as I have several IP on this machine and would like to use a specific one for my Ark server. It shouldn't be a probelm, right?

My firewall settings (iptables):

# ARK
iptables -t filter -A INPUT -p udp --dport 27015 -j ACCEPT
iptables -t filter -A INPUT -p tcp --dport 27015 -j ACCEPT
iptables -t filter -A INPUT -p udp --dport 7778 -j ACCEPT
iptables -t filter -A INPUT -p tcp --dport 7778 -j ACCEPT
iptables -t filter -A INPUT -p udp --dport 7777 -j ACCEPT
iptables -t filter -A INPUT -p tcp --dport 7777 -j ACCEPT
iptables -t filter -A INPUT -p udp --dport 7776 -j ACCEPT
iptables -t filter -A INPUT -p tcp --dport 7776 -j ACCEPT
iptables -t filter -A INPUT -p tcp --dport 32330 -j ACCEPT

netstat:

steam@**********:/etc/arkmanager/instances$ sudo netstat -tunlp | grep 'ShooterGame'
udp        0      0 46.105.***.***:7777      0.0.0.0:*                           7716/ShooterGameSer
udp        0      0 46.105.***.***:27015     0.0.0.0:*                           7716/ShooterGameSer

I don't know what to do next... Does anyone has an idea?

Regards ^^

klightspeed commented 7 years ago

That looks like it hasn't reached the stage of opening the RCON port. Is anything else bound to TCP port 32330?

ghost commented 7 years ago

Thank you for your quick reply!

Unfortunately, if you look at my min.cfg file, you'll see RCON is disabled. If I re-enable it, I get this:

main.cfg:

ark_RCONEnabled="True" 
ark_RCONPort="32330"

netstat:

steam@**********:~$ sudo netstat -tunlp | grep 'ShooterGame'
tcp        0      0 46.105.***.***:32330     0.0.0.0:*               LISTEN      16662/ShooterGameSe
udp        0      0 46.105. ***.***:7777      0.0.0.0:*                           16662/ShooterGameSe
udp        0      0 46.105. ***.***:27015     0.0.0.0:*                           16662/ShooterGameSe

Tail of my arkserver.log file:

2017-11-05 18:37:17: [main] 2017-11-05 18:37:17: Running /home/steam/ARK/ShooterGame/Binaries/Linux/ShooterGameServer TheIsland\?RCONEnabled=True\?RCONPort=32330\?SessionName=ARK\ Server\ Tools\?Port=7776\?QueryPort=27015\?MultiHome=46.105.***.***\?ServerPassword\?ServerAdminPassword=*******\?MaxPlayers=70\?listen
2017-11-05 18:37:17: [main] 2017-11-05 18:37:17: Server PID: 16662
2017-11-05 18:37:18: [main] [S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
2017-11-05 18:37:18: [main] Setting breakpad minidump AppID = 346110
ghost commented 6 years ago

Hi,

I tried a lsof -i as steam user, the command returns nothing.

Trying a sudo lsof -i | grep Shooter returns this:

ShooterGa 29430               steam   11u  IPv4 1672285383      0t0  UDP *:27015
ShooterGa 29430               steam   16u  IPv4 1672289385      0t0  TCP *:32330 (LISTEN)
ShooterGa 29430               steam   18u  IPv4 1672286915      0t0  UDP *:7777

Any idea?

klightspeed commented 6 years ago

The fact that lsof -i as the steam user returns nothing, while running it as root shows it should return something, suggests that this is a similar issue to #135, where a custom patch has been added to the kernel to make /proc/net/udp and /proc/net/tcp only readable by root. This shouldn't affect the ARK server's ability to open those ports or start up.

Does the script ever log server is up in arkserver.log?

Does the server write any .ark files in ShooterGame/Saved/SavedArks

ghost commented 6 years ago

My server (Debian 8.9) was running a patched OVH kernel v3.14.32 with GRSec with prevent acces to /proc/ and others stuffs for "security reasons".

I updated kernel to a vanilla one, version 4.9.58.

lsof -ias steam user now answers correctly on the 3 ports.

arkmanager statussends more data but server isn't up:

Running command 'status' for instance 'main'
 Server running:   Yes
 Server PID:   17213
 Server listening:   Yes
Server Name: ARK Server Tools - (v273.67)
Players: 0 / 0
Active Players: 0
 Server online:   No
 Server build ID:   2267000
 Server version:   273.64

Here all wat I can see in arkserver.log :

2017-11-12 16:16:03: [main] 2017-11-12 16:16:03: start
2017-11-12 16:16:03: [main] 2017-11-12 16:16:03: Running /home/steam/ARK/ShooterGame/Binaries/Linux/ShooterGameServer TheIsland\?RCONEnabled=True\?RCONPort=32330\?SessionName=ARK\ Server\ Tools\?Port=7776\?QueryPort=27015\?MultiHome=37.59.45.93\?ServerPassword\?ServerAdminPassword=keyboardcat\?MaxPlayers=70\?listen
2017-11-12 16:16:03: [main] 2017-11-12 16:16:03: Server PID: 17213
2017-11-12 16:16:04: [main] [S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
2017-11-12 16:16:04: [main] Setting breakpad minidump AppID = 346110

Files are correctly written in ShooterGame/Saved/SavedArks:

steam@xxxxxxxx:~$ ls /home/steam/ARK/ShooterGame/Saved/SavedArks/
TheIsland_10.11.2017_20.57.47.ark  TheIsland_11.11.2017_05.37.47.ark  TheIsland_11.11.2017_14.17.47.ark  TheIsland_11.11.2017_22.57.47.ark  TheIsland_12.11.2017_07.37.47.ark  TheIsland_AntiCorruptionBackup.bak
TheIsland_10.11.2017_23.07.47.ark  TheIsland_11.11.2017_07.47.47.ark  TheIsland_11.11.2017_16.27.47.ark  TheIsland_12.11.2017_01.07.47.ark  TheIsland_12.11.2017_09.47.47.ark  TheIsland.ark
TheIsland_11.11.2017_01.17.47.ark  TheIsland_11.11.2017_09.57.47.ark  TheIsland_11.11.2017_18.37.47.ark  TheIsland_12.11.2017_03.17.47.ark  TheIsland_12.11.2017_11.57.47.ark  TheIsland_NewLaunchBackup.bak
TheIsland_11.11.2017_03.27.47.ark  TheIsland_11.11.2017_12.07.47.ark  TheIsland_11.11.2017_20.47.47.ark  TheIsland_12.11.2017_05.27.47.ark  TheIsland_12.11.2017_14.07.47.ark
klightspeed commented 6 years ago

So it's able to bind to all 3 ports, and is writing ark files and backups, yet it's getting stuck on 0/0 players.

So it's getting stuck at a point just before it's able to accept player connections.

Just to check, is it possible to do an arkmanager update --validate to make sure nothing's corrupt.

Also, do you have any mods installed? Mods that are installed but not activated can sometimes cause problems.

ghost commented 6 years ago

Still the same:

steam@xxxxxxxx:/var/log$ arkmanager update --validate
Running command 'update' for instance 'main'
Checking for update; PID: 27554
Stopping server; reason: update
The server has been stopped
\033[0;39m Saved arks directory is /home/steam/ARK/ShooterGame/Saved/SavedArks
 Copying ARK world file (TheIsland)                                [   OK   ]
 Copying ARK profile files
 Copying ARK tribe files
 Copying ARK tribute tribe files
 Copying GameUserSettings.ini                                      [   OK   ]
 Copying Game.ini                                                  [   OK   ]
 Compressing Backup                                                [   OK   ]
 Created Backup:  2017-11-12_16.48.59.tar.bz2
Performing ARK update ... Update to 2267000 complete
The server is starting...
The server is now running, and should be up within 10 minutes
steam@xxxxxxxx:/var/log$ arkmanager status
Running command 'status' for instance 'main'
 Server running:   Yes
 Server PID:   27948
 Server listening:   Yes
Server Name: ARK Server Tools - (v273.67)
Players: 0 / 0
Active Players: 0
 Server online:   No
 Server build ID:   2267000
 Server version:   273.64

There is no mod installed, when I saw the server wasn't going up, I tried with vanilla settings.

Should I try to uninstall arkmanager/steamcmd, delete my steam user and start again?

klightspeed commented 6 years ago

I didn't see you mention how much memory you have. The ARK server requires at least 4GB of RAM.

ghost commented 6 years ago

There is 32GB of RAM.

Kernel | Linux 4.9.58-xxxx-std-ipv6-64 sur x86_64
Informations CPU | Intel(R) Xeon(R) CPU E3-1245 V2 @ 3.40GHz, 8 cœurs
Mémoire réelle | 30.59 GB total / 4.94 GB utilisé
Mémoire virtuelle | 7.81 GB total / 0 bytes utilisé

It was working fine months ago, maybe should I try a fresh install?

klightspeed commented 6 years ago

If it was previously working, it's possible it's a problem with the saved map.

ghost commented 6 years ago

Well... This is a new-saved-map. I didn"t played for a while so I uninstalled everything. The problem occured when I reinstalled the tool and the gamle a few days ago.

animalillo commented 4 years ago

I'm finding a similar issue but with a brand new server, fully formatted from scratch an ubuntu18.04 and no saved games