CM2Walki / CSGO

Dockerfile for automated build of a CS:GO gameserver: https://hub.docker.com/r/cm2network/csgo/

Home Page:https://CM2.Network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Container exiting with code 127

opened this issue · comments

Hello,

I would like any help troubleshooting the setup of the container on an AWS EC2. Am receiving the error 127

cfg/gamemodes_server.txt
cfg/undo360controller.cfg
cfg/esl1on1awp.cfg
cfg/navedit.cfg
bash: /home/steam/csgo-dedicated/srcds_run: No such file or directory

Attempting to run the container on my local windows machine does not encounter errors.

I have verified and attached a 50gb volume so should have more than enough space.

Mind helping me out?

Thanks

Hey @joelWarrington,

could you post your docker run command or docker-compose file, please?

I am having similar problems with the latest image version.

$ docker images

REPOSITORY        TAG       IMAGE ID       CREATED         SIZE
cm2network/csgo   latest    99a1549d7f64   5 days ago      395MB

I have an env-file in /root/env-file with the following content

SRCDS_RCONPW=<pw>
SRCDS_PW=<pw>
SRCDS_TOKEN=<token>

The data dir was created at /var/csgo-data, is owned by root and has 777 permissions as suggested in the docker hub readme. To start the server is use the following command

docker run -d --net=host --name=csgo-idleserver-001 -v /var/csgo-data:/home/steam/csgo-dedicated/ --env-file env-vars cm2network/csgo

The --env-file parameter does it's job as intended and correctly sets the env vars in the container. I tested this with a plain centos container by printing the env.

I don't think its relevant in this case but I am running docker version 20.10.1, build 831ebea on ubuntu 20.04.

@CM2Walki, thank you for getting back to me, I have ran the following docker command:

docker run -d --net=host --name=csgo-dedicated -e SRCDS_TOKEN=xxxxxxx -e SRCDS_HOSTNAME="Server Name" -e SRCDS_PW="password123" -e SRCDS_RCONPW="password456" cm2network/csgo

The AWS EC2 instance is running on Amazon Linux 2, with Docker client & server version 19.03.13-ce

I have the following image installed and pulled:

$ docker images
REPOSITORY                  TAG                 IMAGE ID            CREATED             SIZE
cm2network/csgo             latest              99a1549d7f64        5 days ago          395MB

I have included the full logs below:

$ docker logs csgo-dedicated

WARNING: setlocale('en_US.UTF-8') failed, using locale: 'C'. International characters may not work.
Redirecting stderr to '/home/steam/Steam/logs/stderr.txt'
[  0%] Checking for available updates...
[----] Downloading update (147 of 51663 KB)...
[  0%] Downloading update (1343 of 51663 KB)...
**removed for brevity**
[100%] Download complete.
[----] Installing update...
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Installing update...
[----] Installing update...
**removed for brevity**
[----] Installing update...
[----] Cleaning up...
[----] Update complete, launching Steamcmd...
CWorkThreadPool::~CWorkThreadPool: work processing queue not empty: 7 items discarded.
WARNING: setlocale('en_US.UTF-8') failed, using locale: 'C'. International characters may not work.
Redirecting stderr to '/home/steam/Steam/logs/stderr.txt'
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK.

Connecting anonymously to Steam Public...Logged in OK
Waiting for user info...OK
 Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
 Update state (0x0) unknown, progress: 0.00 (0 / 12509726144)
Error! App '740' state is 0x202 after update job.
cfg/
cfg/esl3on3.cfg.cfg
cfg/gpu_mem_level_2_pc.ekv
cfg/gamemode_casual.cfg
cfg/listenserver.cfg
cfg/cpu_level_0_pc.ekv
cfg/gamemode_competitive.cfg
cfg/gpu_mem_level_0_pc.ekv
cfg/esl1on1ka.cfg
cfg/server.cfg
cfg/gamemode_demolition.cfg
cfg/esl2on2.cfg
cfg/gamemode_coopmission.cfg
cfg/start.cfg
cfg/cpu_level_2_pc_ss.ekv
cfg/user_default.scr
cfg/esl2on2aim.cfg
cfg/gameps3.cfg
cfg/esl1on1aim.cfg
cfg/lab.cfg
cfg/gamemode_armsrace.cfg
cfg/cpu_level_1_pc_ss.ekv
cfg/controller.vdf
cfg/config_default.cfg
cfg/valve.rc
cfg/config.360.cfg
cfg/gpu_mem_level_1_pc.ekv
cfg/controller.cfg
cfg/thirdperson_joy360.cfg
cfg/esl1on1.cfg
cfg/moddefaults.txt
cfg/coop/
cfg/coop/bot_waves_rush_a.cfg
cfg/modsettings.cfg
cfg/controller_accelerated_hp.cfg
cfg/cpu_level_2_pc.ekv
cfg/nav_bindings.cfg
cfg/steering_wheel.cfg
cfg/entity.cfg
cfg/cpu_level_1_pc.ekv
cfg/thirdperson.cfg
cfg/esl1on1hg.cfg
cfg/gamemode_custom.cfg
cfg/gpu_level_1_pc.ekv
cfg/gamemode_cooperative.cfg
cfg/gamemode_deathmatch.cfg
cfg/moddefaults_mac.txt
cfg/controller.360.cfg
cfg/test.cfg
cfg/default.cfg
cfg/csgo_esl_serverconfig/
cfg/cpu_level_0_pc_ss.ekv
cfg/game360.cfg
cfg/sfm_defaultanimationgroups.txt
cfg/give_all_items.cfg
cfg/mem_level_2_pc.ekv
cfg/mem_level_0_pc.ekv
cfg/buypresetsdefault_ct.vdf
cfg/thirdperson_mayamode.cfg
cfg/game.cfg
cfg/gpu_level_2_pc.ekv
cfg/gamemode_training.cfg
cfg/buypresetsdefault_ter.vdf
cfg/gpu_level_3_pc.ekv
cfg/ai.cfg
cfg/esl2on2awp.cfg
cfg/gpu_level_0_pc.ekv
cfg/eslgotv.cfg
cfg/mem_level_1_pc.ekv
cfg/esl2on2hg.cfg
cfg/esl3on3.cfg
cfg/thirdperson_keypad.cfg
cfg/settings_default.scr
cfg/map_edit.cfg
cfg/esl5on5.cfg
cfg/gamemodes_server.txt
cfg/undo360controller.cfg
cfg/esl1on1awp.cfg
cfg/navedit.cfg
bash: /home/steam/csgo-dedicated/srcds_run: No such file or directory
WARNING: setlocale('en_US.UTF-8') failed, using locale: 'C'. International characters may not work.
Redirecting stderr to '/home/steam/Steam/logs/stderr.txt'
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK.

Connecting anonymously to Steam Public...Logged in OK
Waiting for user info...OK
 Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
Error! App '740' state is 0x202 after update job.
bash: /home/steam/csgo-dedicated/srcds_run: No such file or directory

Looking at the home directory, I only have a few files and none appear to be from the installation.

home $ find .

.
./ec2-user
./ec2-user/.bash_logout
./ec2-user/.bash_profile
./ec2-user/.bashrc
./ec2-user/.ssh
./ec2-user/.ssh/authorized_keys
./ec2-user/.cache
./ec2-user/.cache/amzn2extras
./ec2-user/.cache/amzn2extras/catalog-cache-1000
./ec2-user/.bash_history

In my case the problem actually was that the machine didn't have enough space. It probably is also the issue in your case since the update command in https://github.com/CM2Walki/CSGO/blob/master/etc/entry.sh#L4 errors with

Waiting for user info...OK
 Update state (0x3) reconfiguring, progress: 0.00 (0 / 0)
 Update state (0x0) unknown, progress: 0.00 (0 / 12509726144)
Error! App '740' state is 0x202 after update job.

After that the config gets extracted which prints all the cfg files. This error isn't handled correctly by the entrypoint script, probably because it is run in a new shell.

On my instance it is downloading the server and shows that the server needs > 26 GB, so maybe check if you actually have enough space on your disk.

Thank you @LukasAuerbeck, your suggestion helped me resolve the issue.

It was caused by lack of disk space. I had mistakenly added a second volume of 50GB instead of increasing the default volume from the initial 8GB. When running docker it was trying to install in that default volume which did not have enough space.

Big thanks ♥