noice Posted August 23, 2015 Share Posted August 23, 2015 Hello, I just created a dedicated server but I can't update the mods through command line update_dst.sh. It returns DownloadMods(0) whereas there's updates (I can confirm there's updates by going into the DST GUI Mods menu). Since mods can't be updated, new users can't join. I am using modoverrides.lua to define the server mods list & options. I understand it's the only way to define dedicated servers mod options. Since I used this file - and I guess it's normal - it reset the dedicated_server_mods_setup.lua to an empty file (except dev comments). Environment: I am running Ubuntu Desktop 15 and put the dedicated server bin file inside the GUI folder, so I can use both. modoverrides.lua:return { ["workshop-379619995"] = { enabled = true, -- Chester Recipe configuration_options = { RecipeCost = "medium", } },... etc ... ["workshop-375859599"] = { enabled = true } -- Health info}update_dst.sh#!/bin/shcd "/home/steam/.local/share/Steam/steamapps/common/Don't Starve Together/bin"/home/steam/steamcmd/steamcmd.sh +@ShutdownOnFailedCommand 1 +@NoPromptForPassword 1 +login anonymous +force_install_dir "/home/steam/.local/share/Steam/steamapps/common/Don't Starve Together" +app_update 343050 validate +quit"/home/steam/.local/share/Steam/steamapps/common/Don't Starve Together/bin/dontstarve_dedicated_server_nullrenderer" -only_update_server_modsupdate_dst.sh result:steam@***-SERVER:~$ ./update_dst.shRedirecting stderr to '/home/steam/.local/share/Steam/logs/stderr.txt'Looks like steam didn't shutdown cleanly, scheduling immediate update check[ 0%] Checking for available updates...[----] Verifying installation...Steam Console Client (c) Valve Corporation-- type 'quit' to exit --Loading Steam API...OK."@ShutdownOnFailedCommand" = "1""@NoPromptForPassword" = "1"Connecting anonymously to Steam Public...Logged in OKWaiting for license info...OKlocal (potentially out of sync) copy of roaming config loaded - 0 bytes. Update state (0x5) validating, progress: 0,00 (0 / 495425859) Update state (0x5) validating, progress: 87,54 (433672907 / 495425859)Success! App '343050' fully installed.Starting UpVersion: 147566Current time: Sun Aug 23 23:21:19 2015System Name: LinuxHost Name: ***-SERVERRelease(Kernel) Version: 3.19.0-26-genericKernel Build Timestamp: #28-Ubuntu SMP Tue Aug 11 14:16:32 UTC 2015Machine Arch: x86_64Don't Starve Together: 147566 LINUXNNN Build Date: 2015-08-21_14-57-45Parsing command lineCommand Line Arguments: -only_update_server_modsTHREAD - started 'GAClient' (4133477184)HttpClient2::ClientThread::Main()ProfileIndex:7.52Network tick rate: U=15(2), D=0Network tick rate: U=30(1), D=0OnLoadPermissionList: /home/steam/.klei/DoNotStarveTogether/save/blocklist.txt (Failure)OnLoadPermissionList: /home/steam/.klei/DoNotStarveTogether/save/adminlist.txt (Failure)OnLoadUserIdList: /home/steam/.klei/DoNotStarveTogether/save/whitelist.txt (Failure)Server token retrieved from: server_token.txtcGame::InitializeOnMainThreadRenderer initialize: OkayAnimManager initialize: OkayBuffers initialize: OkaycDontStarveGame::DoGameSpecificInitialize()FMOD Error: An invalid object handle was used.GameSpecific initialize: OkaycGame::StartPlayingLOADING LUADoLuaFile scripts/main.luaDoLuaFile loading buffer scripts/main.luascripts/main.lua(169,1) running main.lua loaded modindex ModIndex: Beginning normal load sequence for dedicated server. DownloadMods(0)Mods were initially downloaded through update_dst.sh using dedicated_server_mods_setup.lua. They might have been re-downloaded by the GUI DST version since then. My intuition: using modoverrides.lua reset dedicated_server_mods_setup.lua. file. update_dst.sh finds an empty dedicated_server_mods_setup.lua and considers there's no mod to download. But if that's the case, why am I the only one to have this problem? I guess I'm not the only one that uses modoverrides.lua. Otherwise could it be a conflict between GUI version and dedicated server version since they are using the same folders? The workaround is to use the GUI to do the updates, but I'd really prefer to do it through CLI. Thanks for your help. Link to comment Share on other sites More sharing options...
ToNiO55 Posted August 24, 2015 Share Posted August 24, 2015 Hi @noice, Since I used this file - and I guess it's normal - it reset the dedicated_server_mods_setup.lua to an empty file (except dev comments).i think that's your problem server DST can't update if your dedicated_server_mods_setup.lua is empty so i have not find solution about this problem (i have change permission with chmod but that's same) but when i update my server, still new dedicated_server_mods_setup.lua and he is empty but now i have my solution, i use simple script for copy my dedicated_server_mods_setup.lua in same folder of my mods example of my update.sh: ./steamcmd.sh +login anonymous +force_install_dir /home/youruser/server +app_update 343050 validate +quitcd /home/youruser/server/mods/save_mods/cp -R dedicated_server_mods_setup.lua /home/youruser/server/mods/sh /home/youruser/server/bin/restart.sh so in folder save_mods, i have my dedicated_server_mods_setup.lua with good configurationnow after update your dedicated_server_mods_setup.lua is not empty and you can update your modsrestart.sh just going restart my server for download or update your mods i know that's not great, but it's the only solution I have found for bypassed this problem maybe you can't find better solution, but i just share my solution i hope that's help you Link to comment Share on other sites More sharing options...
noice Posted August 25, 2015 Author Share Posted August 25, 2015 OK you're right @ToNiO55, steamcmd.sh resets the file. It's probably due to sync with Steam server (as the game updates, it replicates online content, which is an empty file). So we have to recover a "dedicated_server_mods_setup.lua" file backup just before launching dontstarve_dedicated_server_nullrenderer. Here's my new update_dst.sh :#!/bin/shcd "/home/steam/.local/share/Steam/steamapps/common/Don't Starve Together/bin"/home/steam/steamcmd/steamcmd.sh +@ShutdownOnFailedCommand 1 +@NoPromptForPassword 1 +login anonymous +force_install_dir "/home/steam/.local/share/Steam/steamapps/common/Don't Starve Together" +app_update 343050 validate +quitcp "../mods/dedicated_server_mods_setup.bkp.lua" "../mods/dedicated_server_mods_setup.lua"cp "../mods/modsettings.lua" "../mods/modsettings.bkp.lua"./dontstarve_dedicated_server_nullrenderer -only_update_server_modsBackups have to be named "dedicated_server_mods_setup.lua" and "modsettings.bkp.lua".The latter file is probably useless if you're using mod options, as modoverrides.lua is used to enable the mods. Link to comment Share on other sites More sharing options...
noice Posted August 25, 2015 Author Share Posted August 25, 2015 And also updated start_dst.sh:#!/bin/shcd "/home/steam/.local/share/Steam/steamapps/common/Don't Starve Together/bin"cp "../mods/dedicated_server_mods_setup.bkp.lua" "../mods/dedicated_server_mods_setup.lua"cp "../mods/modsettings.lua" "../mods/modsettings.bkp.lua"/usr/bin/screen -S "DST" /bin/sh -c './dontstarve_dedicated_server_nullrenderer -console' Link to comment Share on other sites More sharing options...
ToNiO55 Posted August 25, 2015 Share Posted August 25, 2015 @noice, happy to see that's help you Link to comment Share on other sites More sharing options...
noice Posted August 28, 2015 Author Share Posted August 28, 2015 Thanks. Now, it would be great if we can detect when the server has outdated mod/game versions AND no players connected, in order to automatically launch a server shutdown+update+restart. Link to comment Share on other sites More sharing options...
ToNiO55 Posted August 28, 2015 Share Posted August 28, 2015 @noice, unfortunatly i think it's not possible, for me the better solution it's used web server for download mods and not with steam workshop you can see that's system with web server on lot of game server (Killing Floor,Insurgency,Counter Strike,TF2 and more...) https://support.steampowered.com/kb_article.php?ref=9717-HMAP-7066 This allows each server to have it own version and the server is not stuck about this problem but i don't know if Klei want put this system Link to comment Share on other sites More sharing options...
noice Posted September 5, 2015 Author Share Posted September 5, 2015 Thanks. I'm investigating jacklul proposal for now. I know where the base overwrite issue comes from: From https://developer.valvesoftware.com/wiki/SteamCMD#Validate ValidatevalidateValidate is a command that will check all the server files to make sure they match the SteamCMD files. This command is useful if you think that files may be missing or corrupted. Note:Validation will overwrite any files that have been changed. This may cause issues with customized servers. For example, if you customize mapcycle.txt, this file will be overwritten to the server default. Any files that are not part of the default installation will not be affected.It is recommended you use this command only on initial installation and if there are server issues. I don't know if it will still update correctly without "validate". I'm not trying since our workaround works great. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.