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

Ark instance won't start #1107

Closed Sc0r closed 4 years ago

Sc0r commented 4 years ago

I've just created my first Ark instances on my debian server with this tool and I'd like to get it running somehow. Later on I might try to create a cluster. Instances @main and @crystal Does @main need to run so I could start crystal?

When I try to launch it, it always re-downloads 3 of about 9 mods and claims it starting. But it is not for some reason. Unfortunately I can't find a way to launch it

urd@yggdrasil://home/gameservers$ arkmanager start @crystal
Running command 'start' for instance 'crystal'
Checking for updates before starting
Checking for update; PID: 11091
Downloading mod 2024119790 ... Mod 2024119790 downloaded
Downloading mod 2112724006 ... Mod 2112724006 downloaded
Downloading mod 731604991 ... Mod 731604991 downloaded
Your server is already up to date! The most recent version is 5159009.
The server is starting...
The server is now running, and should be up within 10 minutes
urd@yggdrasil://home/gameservers$ arkmanager status @crystal
Running command 'status' for instance 'crystal'
 Server running:   No
 Server listening:   No
 Server build ID:   5159009
 Server version:   311.94
urd@yggdrasil://home/gameservers$

here's my arkserver.cfg

arkstChannel="master"                                               # change it to a different branch to get non-stable versions
install_bindir="/usr/local/bin"
install_libexecdir="/usr/local/libexec/arkmanager"
install_datadir="/usr/local/share/arkmanager"

# config SteamCMD
steamcmdroot="/usr/games"                                 # path of your steamcmd instance - change this to "/usr/games" on Debian/Ubuntu/CentOS if you have the steamcmd package installed
steamcmdexec="steamcmd"                                          # name of steamcmd executable - change this to "steamcmd" on Debian/Ubuntu/CentOS if you have the steamcmd package installed
steamcmd_user="urd"                                               # name of the system user who own steamcmd folder
steamcmd_appinfocache="/home/urd/.steam/appcache/appinfo.vdf"      # cache of the appinfo command - change this to "/home/steam/.steam/appcache/appinfo.vdf" on Debian/Ubuntu/CentOS if you have the steamcmd package installed
steamcmd_workshoplog="/home/steam/.steam/logs/workshop_log.txt"      # Steam workshop log - change this to "/home/steam/.steam/logs/workshop_log.txt" on Debian/Ubuntu/CentOS if you have the steamcmd package installed
#steamlogin="anonymous"                                             # Uncomment this to specify steam login instead of using anonymous login
steamcmdhome=/home/urd/steam                                           # Uncomment this to override steamcmd home directory

# config environment
arkserverexec="ShooterGame/Binaries/Linux/ShooterGameServer"        # name of ARK server executable
arkbackupdir="/home/urd/ARK-Backups"                              # path to backup directory
arkwarnminutes="15"                                                 # number of minutes to warn players when using update --warn
arkprecisewarn="false"                                              # set this to true to obey warnminutes even if no players are connected (recommended for clusters)
arkautorestartfile="ShooterGame/Saved/.autorestart"                 # path to autorestart file
arkAutoUpdateOnStart="true"                                        # set this to true if you want to always update before startup
arkBackupPreUpdate="false"                                          # set this to true if you want to perform a backup before updating
#arkBackupPostCommand='aws s3 cp "$backupfile" "s3://bucket_name/backups"'  # Set this if you want a command to run after performing a backup
#arkStartDelay=20                                                   # set this to change the maximum delay between server starts - 0 or unser for no delay, will continue immediately when server is up
#defaultinstance_max=20                                             # Same as above, for v1.6.43 compatibility
#arkStagingDir="/home/urd/ARK-Staging"                            # Uncomment to enable updates to be fully downloaded before restarting the server (reduces downtime while updating)

# Options to automatically remove old backups to keep backup size in check
# Each compressed backup is generally about 1-2MB in size.
arkMaxBackupSizeMB="500"                                            # Set to automatically remove old backups when size exceeds this limit
#arkMaxBackupSizeGB="2"                                             # Uncomment this and comment the above to specify the limit in whole GB

# 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"

#broadcastcmd="serverchat"                                          # Uncomment to use serverchat instead of broadcast

# Notifications
# discordWebhookURL="https://discordapp.com/api/webhooks/{webhook.id}/{webhook.token}"
# notifyMsgShuttingDown="Shutting down"
# notifyMsgStarting="Starting"
# notifyMsgServerUp="Server is up"
# notifyMsgStoppedListening="Server has stopped listening - restarting"
# notifyMsgServerTerminated="Server exited - restarting"
# notifyTemplate="Message from instance {instance} on server {server}: {msg}"
# noNotifyWarning=true
# notifyCommand='echo "$msg" | mailx -s "Message from instance ${instance} on server ${HOSTNAME}" "email@domain.com"'

# 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"                                               # server map (default TheIsland)
#serverMapModId="469987622"                                         # Uncomment this to specify the Map Mod Id (<fileid> in http://steamcommunity.com/sharedfiles/filedetails/?id=<fileid>)
#ark_TotalConversionMod="496735411"                                 # Uncomment this to specify a total-conversion mod
ark_RCONEnabled="True"                                              # Enable RCON Protocol
ark_ServerPassword=""                                               # ARK server password, empty: no password required to login
ark_ServerAdminPassword="MeowTheMangoKitten"                        # ARK server admin password, KEEP IT SAFE!
ark_MaxPlayers="70"
ark_GameModIds="2047318996,2112724006,731604991,1587892307,539464369,558651608,618916953,679529026,741203089,804312798,880871931,1091147617,1404697612,1846109576,1928871727,1963444664,2053416662,1409757911,783163029,821530042,1207157150,2024119790"                     # Uncomment to specify additional mods by Mod Id separated by commas
#ark_AltSaveDirectoryName="SotF"                                    # Uncomment to specify a different save directory name

# ARK server flags - use arkflag_<optionname>=true
#arkflag_OnlyAdminRejoinAsSpectator=true                            # Uncomment to only allow admins to rejoin as spectator
#arkflag_DisableDeathSpectator=true                                 # Uncomment to disable players from becoming spectators when they die

# ARK server options - i.e. for -optname=val, use arkopt_optname=val
#arkopt_StructureDestructionTag=DestroySwampSnowStructures

# config Service
logdir="/var/log/arktools"                                          # Logs path (default /var/log/arktools)

# steamdb specific
appid=376030                                                        # Linux server App ID
mod_appid=346110                                                    # App ID for mods

# Mod OS Selection
mod_branch=Windows
# Add mod-specific OS selection below:
#mod_branch_496735411=Windows

# alternate configs
# example for config name "ark1":
#configfile_ark1="/path/to/config/file"

defaultinstance="main"                                              # See /etc/arkmanager/instances/main.cfg - Instance config options will overide the Global option in this file.

crystal.cfg

# config environment
arkserverroot="/home/gameservers/TheArk/crystal"                                   # path of your ARK server files (default ~/ARK)

# ARK server options - use ark_<optionname>=<value>
# comment out these values if you want to define them
# inside your GameUserSettings.ini file
serverMap="CrystalIsles"                                               # server map (default TheIsland)
#serverMapModId="469987622"                                         # Uncomment this to specify the Map Mod Id (<fileid> in http://steamcommunity.com/sharedfiles/filedetails/?id=<fileid>)
#ark_TotalConversionMod="496735411"                                 # Uncomment this to specify a total-conversion mod
ark_RCONEnabled="True"                                              # Enable RCON Protocol
ark_RCONPort="32330"                                                # RCON Port
ark_SessionName="Mangoland Crystal Isles"                                  # if your session name needs special characters please use the .ini instead
ark_Port="7779"                                                     # ARK server port (default 7778)
ark_QueryPort="27016"                                               # ARK query port (default 27015)
ark_ServerPassword=""                                               # ARK server password, empty: no password required to login
ark_ServerAdminPassword="MeowLaserMango"                               # ARK server admin password, KEEP IT SAFE!
ark_MaxPlayers="70"
#ark_GameModIds="487516323,487516324,487516325"                     # Uncomment to specify additional mods by Mod Id separated by commas
#ark_AltSaveDirectoryName="SotF"                                    # Uncomment to specify a different save directory name

# ARK server flags - use arkflag_<optionname>=true
#arkflag_OnlyAdminRejoinAsSpectator=true                            # Uncomment to only allow admins to rejoin as spectator
#arkflag_DisableDeathSpectator=true                                 # Uncomment to disable players from becoming spectators when they die

# ARK server options - i.e. for -optname=val, use arkopt_optname=val
#arkopt_StructureDestructionTag=DestroySwampSnowStructures

#arkPreStart="/etc/arkmanager/instances/instance.start"              # Set this to override the start script; defaults to config file name with .cfg replaced by .start
arkmod_2024119790=game
arkmod_2047318996=game
arkmod_2053416662=game
arkmod_2112724006=game
arkmod_539464369=game
arkmod_558651608=game
arkmod_618916953=game
arkmod_679529026=game
arkmod_731604991=game
arkmod_741203089=game
arkmod_783163029=game
arkmod_804312798=game
arkmod_821530042=game
arkmod_880871931=game

GameUserSettings.ini

[ServerSettings]
ActiveMods=2047318996,2112724006,731604991,1587892307,539464369,558651608,618916953,679529026,741203089,804312798,880871931,1091147617,1404697612,1846109576,1928871727,1963444664,2053416662,1409757911,783163029,821530042,1207157150,2024119790
serverPVE=1
MaxNumbersofPlayersInTribe=10
ShowMapPlayerLocation=True
AllowThirdPersonPlayer=True
ServerCrosshair=True
ServerPassword=
ServerAdminPassword=MeowLaserMango
RCONEnabled=True
RCONPort=32330
TheMaxStructuresInRange=10500.000000
OxygenSwimSpeedStatMultiplier=1.000000
StructurePreventResourceRadiusMultiplier=1.000000
TribeNameChangeCooldown=15.000000
PlatformSaddleBuildAreaBoundsMultiplier=1.000000
StructurePickupTimeAfterPlacement=30.000000
StructurePickupHoldDuration=0.500000
AllowIntegratedSPlusStructures=True
AllowHideDamageSourceFromLogs=True
RaidDinoCharacterFoodDrainMultiplier=1.000000
PvEDinoDecayPeriodMultiplier=1.000000
KickIdlePlayersPeriod=7200.000000
PerPlatformMaxStructuresMultiplier=1.000000
AutoSavePeriodMinutes=15.000000
ListenServerTetherDistanceMultiplier=1.000000
MaxTamedDinos=5000.000000
ItemStackSizeMultiplier=1.000000
RCONServerGameLogBuffer=600.000000
AllowHitMarkers=True
HarvestAmountMultiplier=6.00000
PlayerCharacterFoodDrainMultiplier=0.80000
PlayerCharacterHealthRecoveryMultiplier=2.00000
PlayerCharacterStaminaDrainMultiplier=0.80000
PlayerCharacterWaterDrainMultiplier=0.80000
XPMultiplier=7.00000
EnablePVPGamma=0
EnablePVEGamma=1
MaxPlatformSaddleStructureLimit=100
PreventOfflinePvP=1
AllowFlyingStaminaRecovery=1
AllowMultipleAttachedC4=0
DifficultyOffset=1.00000
OverrideOfficialDifficulty=6.0

[/Script/ShooterGame.ShooterGameUserSettings]
MasterAudioVolume=1.000000
MusicAudioVolume=1.000000
SFXAudioVolume=1.000000
VoiceAudioVolume=1.000000
UIScaling=1.000000
UIQuickbarScaling=0.650000
CameraShakeScale=0.650000
bFirstPersonRiding=False
bThirdPersonPlayer=False
bShowStatusNotificationMessages=True
TrueSkyQuality=0.000000
FOVMultiplier=1.000000
GroundClutterDensity=0.000000
bFilmGrain=False
bMotionBlur=False
bUseDistanceFieldAmbientOcclusion=False
bUseSSAO=False
bShowChatBox=True
bCameraViewBob=True
bInvertLookY=False
bFloatingNames=True
bChatBubbles=True
bHideServerInfo=False
bJoinNotifications=False
bCraftablesShowAllItems=False
bLocalInventoryItemsShowAllItems=False
bLocalInventoryCraftingShowAllItems=True
bRemoteInventoryItemsShowAllItems=False
bRemoteInventoryCraftingShowAllItems=False
bRemoteInventoryShowEngrams=True
LookLeftRightSensitivity=1.000000
LookUpDownSensitivity=1.000000
GraphicsQuality=1
ActiveLingeringWorldTiles=1
ClientNetQuality=3
LastServerSearchType=0
LastServerSort=2
LastPVESearchType=-1
LastDLCTypeSearchType=-1
LastServerSortAsc=True
LastAutoFavorite=True
LastServerSearchHideFull=False
LastServerSearchProtected=False
LastServerSearchIncludeServersWithActiveMods=True
HideItemTextOverlay=True
bQuickToggleItemNames=True
bDistanceFieldShadowing=False
LODScalar=0.780000
bToggleToTalk=False
HighQualityMaterials=True
HighQualitySurfaces=True
bTemperatureF=False
bDisableTorporEffect=False
bChatShowSteamName=False
bChatShowTribeName=True
bReverseTribeLogOrder=False
EmoteKeyBind1=0
EmoteKeyBind2=0
bNoBloodEffects=False
bLowQualityVFX=False
bSpectatorManualFloatingNames=False
bSuppressAdminIcon=False
bUseSimpleDistanceMovement=False
bDisableMeleeCameraSwingAnims=False
bHighQualityAnisotropicFiltering=False
bUseLowQualityLevelStreaming=True
bPreventInventoryOpeningSounds=False
bPreventItemCraftingSounds=False
bPreventHitMarkers=False
bPreventCrosshair=False
bPreventColorizedItemNames=False
bHighQualityLODs=False
bExtraLevelStreamingDistance=False
bEnableColorGrading=True
DOFSettingInterpTime=0.000000
bDisableBloom=False
bDisableLightShafts=False
LastJoinedSessionPerCategory=" "
LastJoinedSessionPerCategory=" "
LastJoinedSessionPerCategory=" "
LastJoinedSessionPerCategory=" "
LastJoinedSessionPerCategory=" "
LastJoinedSessionPerCategory=" "
LastJoinedSessionPerCategory=" "
LastJoinedSessionPerCategory=" "
LastJoinedSessionPerCategory=" "
bDisableMenuTransitions=False
bEnableInventoryItemTooltips=True
bRemoteInventoryShowCraftables=False
bNoTooltipDelay=False
LocalItemSortType=0
LocalCraftingSortType=0
RemoteItemSortType=0
RemoteCraftingSortType=0
VersionMetaTag=1
ShowExplorerNoteSubtitles=False
DisableMenuMusic=False
DisableDefaultCharacterItems=False
bHideFloatingPlayerNames=False
bHideGamepadItemSelectionModifier=False
bToggleExtendedHUDInfo=False
PlayActionWheelClickSound=True
CompanionReactionVerbosity=3
EnableEnvironmentalReactions=True
EnableRespawnReactions=True
EnableDeathReactions=True
EnableSayHelloReactions=True
EnableEmoteReactions=True
EnableMovementSounds=True
CompanionSubtitleVerbosityLevel=3
CompanionIsHiddenState=False
MaxAscensionLevel=0
bHostSessionHasBeenOpened=False
bForceTPVCameraOffset=False
bDisableTPVCameraInterpolation=False
bFPVClimbingGear=False
bFPVGlidingGear=False
Gamma1=2.200000
Gamma2=3.000000
AmbientSoundVolume=1.000000
bAllowAnimationStaggering=True
bUseOldThirdPersonCameraTrace=False
bUseOldThirdPersonCameraOffset=False
bLowQualityAnimations=True
bShowedGenesisDLCBackground=False
bUseVSync=False
MacroCtrl0=
MacroCtrl1=
MacroCtrl2=
MacroCtrl3=
MacroCtrl4=
MacroCtrl5=
MacroCtrl6=
MacroCtrl7=
MacroCtrl8=
MacroCtrl9=
ResolutionSizeX=1280
ResolutionSizeY=720
LastUserConfirmedResolutionSizeX=1280
LastUserConfirmedResolutionSizeY=720
WindowPosX=-1
WindowPosY=-1
bUseDesktopResolutionForFullscreen=False
FullscreenMode=2
LastConfirmedFullscreenMode=2
Version=5

[ScalabilityGroups]
sg.ResolutionQuality=100
sg.ViewDistanceQuality=3
sg.AntiAliasingQuality=3
sg.ShadowQuality=3
sg.PostProcessQuality=3
sg.TextureQuality=3
sg.EffectsQuality=3
sg.TrueSkyQuality=3
sg.GroundClutterQuality=3
sg.IBLQuality=1
sg.HeightFieldShadowQuality=3
sg.GroundClutterRadius=10000

[SessionSettings]
SessionName=Mangoland Crystal Isles

[/Script/Engine.GameSession]
MaxPlayers=70
klightspeed commented 4 years ago

Instances should be independent, so any instance should not depend on any other instances to start.

Does /var/log/arktools/arkserver.log give any indication why it would have exited?

Sc0r commented 4 years ago

Heh just realised I posted the admin passwords public. Smooth move.

thank you, didnt know there actually is something to work with.

I can make no sense of that errormessage and filepath though.

2020-06-14 11:29:01: [crystal] 2020-06-14 11:29:01: start
2020-06-14 11:29:01: [crystal] 2020-06-14 11:29:01: Running /home/gameservers/TheArk/crystal/ShooterGame/Binaries/Linux/ShooterGameServer CrystalIsles\?RCONEnabled=True\?RCONPort=32330\?SessionName=Mangoland\ Crystal\ Isles\?Port=7778\?QueryPort=27016\?ServerPassword\?ServerAdminPassword=MeowLaserMango\?MaxPlayers=70\?GameModIds=2047318996\,2112724006\,731604991\,1587892307\,539464369\,558651608\,618916953\,679529026\,741203089\,804312798\,880871931\,1091147617\,1404697612\,1846109576\,1928871727\,1963444664\,2053416662\,1409757911\,783163029\,821530042\,1207157150\,2024119790\,2024119790\,2047318996\,2053416662\,2112724006\,539464369\,558651608\,618916953\,679529026\,731604991\,741203089\,783163029\,804312798\,821530042\,880871931\?ServerPassword\?listen
2020-06-14 11:29:01: [crystal] 2020-06-14 11:29:01: Server PID: 25686
2020-06-14 11:29:02: [crystal] [S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
2020-06-14 11:29:02: [crystal] Setting breakpad minidump AppID = 346110
2020-06-14 11:29:02: [crystal] LowLevelFatalError [File:F:\build\Live311Jenkins\Engine\Source\Runtime\Core\Private\Linux\LinuxPlatformProcess.cpp] [Line: 652]
2020-06-14 11:29:02: [crystal] FLinuxPlatformProcess::WaitForProc: waitid for pid -1 failed (errno=22, Invalid argument)
2020-06-14 11:29:02: [crystal] Signal 11 caught.
2020-06-14 11:29:06: [crystal] /usr/local/bin/arkmanager: line 1189: 25686 Segmentation fault      "$arkserverroot/$arkserverexec" "$arkserveropts" "${arkextraopts[@]}"
2020-06-14 11:29:06: [crystal] 2020-06-14 11:29:06: Bad PID ''; expected '25686'
2020-06-14 11:29:06: [crystal] 2020-06-14 11:29:06: exited with status 0

I found a forumpost regarding this, I should execute it from the ShooterGameServer folder.. but doesn't arkmanager do that automatically?

to avoid this issues you have to enter the directory of "ShooterGameServer" first:

Like:
#!/bin/sh

cd ~/games/ark/ShooterGame/Binaries/Linux && ./ShooterGameServer TheIsland?listen?RCONEnabled=True?RCONPort=32330?ServerAdminPassword=123 -automanagemods

another post here with the same issue resolved it by removing automanagemods from GameUserSettings. but as you can see, I dont have that. odd.

klightspeed commented 4 years ago

The first thing doRun does is cd "${arkserverroot}/${arkserverexec%/*}", which changes the working directory to that in which the ShooterGameServer executable is in.

I strongly suspect that it now defaults to always having AutoManagedMods enabled, and tries to execute steamcmd to update its mods. If steamcmd is not present, then executing it will fail, and so I suspect a call that should have never returned will return, resulting in it calling waitpid(-1).

It seems that if any mods needed to be updated it then forks and re-executes itself, which will break any monitors (including arkmanager).

Sc0r commented 4 years ago

oof ok sounds about right. I've copied the entire SteamCMD from my user to //home/gameservers/TheArk/Engine/Binaries/ThirdParty/SteamCMD/Linux

CORRECTION I was a muppet, I put it in the wrong instance. it seems to boot up!