Running into issues with steamcmd and screen updating the server

Game mode: [Enter game mode here: Online private
Type of issue: [Enter one of the following: Bug | Performance |
Server type: [Enter one of the following: PvE-Conflict
Region: [America]


[I was using crontab -e to shutdown and update the server along with the workshop maps and now the server is no longer updating correctly. The weird part is if i run the shell script via command line everything works just fine… It’s almost like a problem with cron not executing the scripts.]


Please provide a step-by-step process of how the bug can be reproduced. The more details you provide us with the easier it will be for us to find and fix the bug:

Instead i am going to provide the scripts them selves.
autoupdate.sh

-rwxrwxrwx 1 harby harby 807 Sep 4 15:31 autoupdate.sh

#!/bin/sh
killall 9 ConanSandboxServer.exe
killall 9 ConanSandboxServer-Win64-Test.exe
killall 9 Xvfb
killall 9 screen
sleep 2s
screen -dm steamcmd [email protected] windows +login anonymous +force_install_dir /home/harby/server +app_update 443030 +workshop_download_item 440900 880454836 +workshop_download_item 440900 1763829520 +workshop_download_item 440900 864199675 +workshop_download_item 440900 1598693222 +workshop_download_item 440900 1369802940 +workshop_download_item 440900 1555101525 +workshop_download_item 440900 1389908968 +workshop_download_item 440900 1125427722 +workshop_download_item 440900 1390768358 +workshop_download_item 440900 1212764185 +workshop_download_item 440900 884155321 +workshop_download_item 440900 901911361 +workshop_download_item 440900 1367404881 +exit

Now I am going to provide what Crontab -e looks like.

# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h  dom mon dow   command
@reboot     sh /home/harby/server/start.sh
#34 4 * * * /home/harby/autoupdate.sh >/home/harby/autoupdate.log 2>&1
#52 3 * * *  sh /home/harby/update.sh
#54 3 * * *  sh /home/harby/workshopmapupdate.sh
#51 3 * * *  sh /home/harby/server/start.sh
#00 9 * * *  sh /home/harby/update.sh
#02 9 * * *  sh /home/harby/workshopmapupdate.sh
#10 9 * * *  sh /home/harby/server/start.sh
#00 11 * * * sh /home/harby/update.sh
#02 11 * * * sh /home/harby/workshopmapupdate.sh
#10 11 * * * sh /home/harby/server/start.sh
#00 14 * * * sh /home/harby/update.sh
#02 14 * * * sh /home/harby/workshopmapupdate.sh
#10 14 * * * sh /home/harby/server/start.sh
55 14 * * * /home/harby/autoupdate.sh
#00 20 * * * sh /home/harby/update.sh
#02 20 * * * sh /home/harby/workshopmapupdate.sh
#10 20 * * * sh /home/harby/server/start.sh

Some thing has happened because at one point in time these scripts were working correctly with out issues… I haven’t figured out exactly what yet.

Now the start command works just fine…

Here it is…

#!/bin/sh
killall 9 ConanSandboxServer.exe
killall 9 ConanSandboxServer-Win64-Test.exe
killall 9 Xvfb
sleep 2s
/usr/bin/screen -d -m xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' wine /home/harby/server/ConanSandboxServer.exe -log -MaxPlayers=70

The goal behind killing screen each time is to make sure nothing is overlapping ontop each other.

Any thoughts on this?? I am starting to slowly pull my hair out as i go through each thing line by line…

Again mods are not updating nor is the game updating unless manually run from command line.

Operating system information:
Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-58-generic x86_64)

System information as of Wed Sep 4 02:59:54 CDT 2019

System load: 0.27 Processes: 148
Usage of /: 15.8% of 117.61GB Users logged in: 0
Memory usage: 44% IP address for ens18: 10.10.10.134
Swap usage: 0%

I’ve never tried to run the Windows Exiles Server on Linux, so I’m probably going to be wrong on a bunch of things.

From what I see, it looks like you are updating the Windows version of the Conan Exiles server (probably using Wine?), using the Linux version of SteamCMD, correct?

And at some point your set of scripts was working fine, and then it stopped working?

2 Likes

You are correct I am running Linux version of wine intentionally using Steamcmd to download the windows version of the game so far no issues when the shell scripts are run by command line from the user…

Here is my guess but I have been bashing my head around some how cron from a user perspective is not allowed to run the screen for some reason…

But Toolguy You are right I am kinda hack jobbing it but it was working and at one point in time updated the resource page for the linux dedicate server hosting… Found here https://conanexiles.gamepedia.com/Dedicated_Server_Setup:_Linux_and_Wine

I filled in alot of grey and blank areas there but having issues with the automation side using Cron because of screen not running… What is odd though is the server starts and stops with screen and cron just fine… So i am wondering if its some permission thing with steamcmd… Idk I have been banging my head against the wall since this last update because everything was running smooth up until then…

Problem fixed here is how we now have to update our server and mods.

This is reference for anyone else that is having issues with this in the linux steamcmd…

Take note steamcmd does not like to run in a shell script via cron… However it will run out of cron directly with little issues.

Here is what our crontab -e looks like as an example… Remember to run cron as the user only…

@reboot     DISPLAY=:0.0 /usr/games/steamcmd [email protected] windows +login anonymous +force_install_dir /home/harby/server +app_update 443030 +workshop_download_item 440900 880454836 +workshop_download_item 440900 1763829520 +workshop_download_item 440900 864199675 +workshop_download_item 440900 1598693222 +workshop_download_item 440900 1369802940 +workshop_download_item 440900 1555101525 +workshop_download_item 440900 1389908968 +workshop_download_item 440900 1125427722 +workshop_download_item 440900 1390768358 +workshop_download_item 440900 1212764185 +workshop_download_item 440900 884155321 +workshop_download_item 440900 901911361 +workshop_download_item 440900 1367404881 +exit && /usr/bin/screen -d -m xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' wine /home/harby/server/ConanSandboxServer.exe -log -MaxPlayers=70
00 3 * * * sh /home/harby/killall.sh
01 3 * * * DISPLAY=:0.0 /usr/games/steamcmd [email protected] windows +login anonymous +force_install_dir /home/harby/server +app_update 443030 +workshop_download_item 440900 880454836 +workshop_download_item 440900 1763829520 +workshop_download_item 440900 864199675 +workshop_download_item 440900 1598693222 +workshop_download_item 440900 1369802940 +workshop_download_item 440900 1555101525 +workshop_download_item 440900 1389908968 +workshop_download_item 440900 1125427722 +workshop_download_item 440900 1390768358 +workshop_download_item 440900 1212764185 +workshop_download_item 440900 884155321 +workshop_download_item 440900 901911361 +workshop_download_item 440900 1367404881 +exit && /usr/bin/screen -d -m xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' wine /home/harby/server/ConanSandboxServer.exe -log -MaxPlayers=70
00 9 * * * sh /home/harby/killall.sh
01 9 * * * DISPLAY=:0.0 /usr/games/steamcmd [email protected] windows +login anonymous +force_install_dir /home/harby/server +app_update 443030 +workshop_download_item 440900 880454836 +workshop_download_item 440900 1763829520 +workshop_download_item 440900 864199675 +workshop_download_item 440900 1598693222 +workshop_download_item 440900 1369802940 +workshop_download_item 440900 1555101525 +workshop_download_item 440900 1389908968 +workshop_download_item 440900 1125427722 +workshop_download_item 440900 1390768358 +workshop_download_item 440900 1212764185 +workshop_download_item 440900 884155321 +workshop_download_item 440900 901911361 +workshop_download_item 440900 1367404881 +exit && /usr/bin/screen -d -m xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' wine /home/harby/server/ConanSandboxServer.exe -log -MaxPlayers=70
00 11 * * * sh /home/harby/killall.sh
01 11 * * * DISPLAY=:0.0 /usr/games/steamcmd [email protected] windows +login anonymous +force_install_dir /home/harby/server +app_update 443030 +workshop_download_item 440900 880454836 +workshop_download_item 440900 1763829520 +workshop_download_item 440900 864199675 +workshop_download_item 440900 1598693222 +workshop_download_item 440900 1369802940 +workshop_download_item 440900 1555101525 +workshop_download_item 440900 1389908968 +workshop_download_item 440900 1125427722 +workshop_download_item 440900 1390768358 +workshop_download_item 440900 1212764185 +workshop_download_item 440900 884155321 +workshop_download_item 440900 901911361 +workshop_download_item 440900 1367404881 +exit && /usr/bin/screen -d -m xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' wine /home/harby/server/ConanSandboxServer.exe -log -MaxPlayers=70
00 14 * * * sh /home/harby/killall.sh
01 14 * * * DISPLAY=:0.0 /usr/games/steamcmd [email protected] windows +login anonymous +force_install_dir /home/harby/server +app_update 443030 +workshop_download_item 440900 880454836 +workshop_download_item 440900 1763829520 +workshop_download_item 440900 864199675 +workshop_download_item 440900 1598693222 +workshop_download_item 440900 1369802940 +workshop_download_item 440900 1555101525 +workshop_download_item 440900 1389908968 +workshop_download_item 440900 1125427722 +workshop_download_item 440900 1390768358 +workshop_download_item 440900 1212764185 +workshop_download_item 440900 884155321 +workshop_download_item 440900 901911361 +workshop_download_item 440900 1367404881 +exit && /usr/bin/screen -d -m xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' wine /home/harby/server/ConanSandboxServer.exe -log -MaxPlayers=70
00 20 * * * sh /home/harby/killall.sh
01 20 * * * DISPLAY=:0.0 /usr/games/steamcmd [email protected] windows +login anonymous +force_install_dir /home/harby/server +app_update 443030 +workshop_download_item 440900 880454836 +workshop_download_item 440900 1763829520 +workshop_download_item 440900 864199675 +workshop_download_item 440900 1598693222 +workshop_download_item 440900 1369802940 +workshop_download_item 440900 1555101525 +workshop_download_item 440900 1389908968 +workshop_download_item 440900 1125427722 +workshop_download_item 440900 1390768358 +workshop_download_item 440900 1212764185 +workshop_download_item 440900 884155321 +workshop_download_item 440900 901911361 +workshop_download_item 440900 1367404881 +exit && /usr/bin/screen -d -m xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' wine /home/harby/server/ConanSandboxServer.exe -log -MaxPlayers=70

I hope this helps some one else with this issue…

1 Like

For what it’s worth, it looks like somebody managed to get the entire Dedicated Server Launcher system to run with Wine:

The OS/distro may be a factor for how well it will work with wine. I’m a low information Linux user, and settled on Manjaro because it comes with Steam. I run the dedicated server launcher by r-click and “open with wine windows program loader”

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.