Coder Social home page Coder Social logo

Container fails to start about csgo HOT 22 CLOSED

cm2walki avatar cm2walki commented on May 14, 2024
Container fails to start

from csgo.

Comments (22)

CM2Walki avatar CM2Walki commented on May 14, 2024 2

Change has been applied, everything should work as intended now. I also added a section in the README.md that explains how to host a server with a bind mount. The previous in Dockerfile volume approach is back as well.

from csgo.

Nuc1eoN avatar Nuc1eoN commented on May 14, 2024 1

Actually I need to re-open the issue. I now let the whole CSGO download finish and at the very end I am getting an error:

 Update state (0x61) downloading, progress: 99.50 (24667192413 / 24791608158)
 Update state (0x61) downloading, progress: 99.75 (24729197944 / 24791608158)
 Update state (0x61) downloading, progress: 99.98 (24787358363 / 24791608158)
Success! App '740' fully installed.
sed: can't read /home/steam/csgo-dedicated/csgo/cfg/server.cfg: No such file or directory
ERROR: Invalid game type 'csgo' sepecified.
Sat Aug 22 18:31:25 UTC 2020: Server Failed

Using the cm2network/csgo:sourcemod image.

Do you know what it could be?

from csgo.

xoryouyou avatar xoryouyou commented on May 14, 2024 1
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...
[  0%] Downloading update...
[  0%] Checking for available updates...
[----] Download complete.
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Cleaning up...
[----] Update complete, launching Steamcmd...
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
Success! App '740' already up to date.
sed: can't read /home/steam/csgo-dedicated/csgo/cfg/server.cfg: No such file or directory
ERROR: Invalid game type 'csgo' sepecified.
Sat Aug 22 20:37:38 UTC 2020: Server Failed

Same here when trying to mount the csgo directory via a volume bind. -v $(pwd)/dedicated/:/home/steam/csgo-dedicated/

from csgo.

CM2Walki avatar CM2Walki commented on May 14, 2024 1

I found a solution myself. This will add the missing files if you use a bind mount, it just repeats the Dockerfile steps if the server.cfg is missing.

CSGO/etc/entry.sh

Lines 9 to 25 in 73f84a0

# Handle config being missing if we use a bind mount
if [ ! -f "${STEAMAPPDIR}/${STEAMAPP}/cfg/server.cfg" ]; then
# Download & extract the config
wget -qO- "${DLURL}/master/etc/cfg.tar.gz" | tar xvzf - -C "${STEAMAPPDIR}/${STEAMAPP}"
# Are we in a metamod container?
if [ ! -z "$METAMOD_VERSION" ]; then
LATESTMM=$(wget -qO- https://mms.alliedmods.net/mmsdrop/"${METAMOD_VERSION}"/mmsource-latest-linux)
wget -qO- https://mms.alliedmods.net/mmsdrop/"${METAMOD_VERSION}"/"${LATESTMM}" | tar xvzf - -C "${STEAMAPPDIR}/${STEAMAPP}"
fi
# Are we in a sourcemod container?
if [ ! -z "$SOURCEMOD_VERSION" ]; then
LATESTSM=$(wget -qO- https://sm.alliedmods.net/smdrop/"${SOURCEMOD_VERSION}"/sourcemod-latest-linux)
wget -qO- https://sm.alliedmods.net/smdrop/"${SOURCEMOD_VERSION}"/"${LATESTSM}" | tar xvzf - -C "${STEAMAPPDIR}/${STEAMAPP}"
fi
fi

I'm currently testing the solution.

from csgo.

Nuc1eoN avatar Nuc1eoN commented on May 14, 2024

It was definitely an error on my side as -v /home/steam/csgo-dedicated/ resolved the issue.

I wonder, how would I bind /home/steam/csgo-dedicated/ to a specific directory on my file system though?
With other images that I use, commands like -v ~/podman.d/volumes/csgo/:/home/steam/csgo-dedicated/ work fine to bind a guest directory to a host directory.

from csgo.

CM2Walki avatar CM2Walki commented on May 14, 2024

This is a known issue, I'm currently propagating through my game server images. The entrypoint's entry.sh is in that volume, so if you do a bind mount, you also obscure the entry.sh inside the container. This is fixed by moving the entry.sh outside the steam app dir, see CM2Walki/TF2#6.

I'll do the change now and trigger a new build, this should fix the issue.

from csgo.

CM2Walki avatar CM2Walki commented on May 14, 2024

Can you repull the image and try again?

from csgo.

Nuc1eoN avatar Nuc1eoN commented on May 14, 2024

Thanks!
It seems there are still some errors left

Connecting anonymously to Steam Public...Logged in OK
Waiting for user info...OK
ERROR! Failed to install app '740' (Disk write failure)
sed: can't read /home/steam/csgo-dedicated/csgo/cfg/server.cfg: No such file or directory
bash: /home/steam/csgo-dedicated/srcds_run: No such file or directory

from csgo.

CM2Walki avatar CM2Walki commented on May 14, 2024

This seems to be an issue with your machine, are you sure you have enough disk space and that the volume is writeable?

EDIT: nvm, I'm experiencing a similar issue on my end, hang on.

from csgo.

Nuc1eoN avatar Nuc1eoN commented on May 14, 2024

Hey so on my end, it only fails in podman rootless mode.

I managed to get it working by passing the --userns=keep-id parameter in rootless mode.

EDIT: I wonder why you've had a similar issue? Are you on rootless podman?

from csgo.

CM2Walki avatar CM2Walki commented on May 14, 2024

Sorry for the delay @Nuc1eoN. Could you try to pull & relaunch the container? Everything should be working as intended now, thanks for helping me debug the issue.

from csgo.

Nuc1eoN avatar Nuc1eoN commented on May 14, 2024

Hey @CM2Walki so for me the fix was (and still is) to add --userns=keep-id to my rootless container.

I am not sure what your issue was but maybe I would have faced it at a later stage.

Thanks for the help!

from csgo.

CM2Walki avatar CM2Walki commented on May 14, 2024

Thanks guys. I had build caching enabled on docker hub, so the fix I did to the entry.sh didn't get built. The issue is resolved now, I tested it myself.

For anyone coming across this issue in relation to:

ERROR: Invalid game type 'csgo' sepecified.

This happens if you execute the srcds_run whilst being in a different directory. Just cd to it before you call it and you'll be fine.

from csgo.

Nuc1eoN avatar Nuc1eoN commented on May 14, 2024

@CM2Walki hey bro thanks for the ongoing maintenance and support for your images!

The server starts fine! Although it seems there's still one error left for me:

sed: can't read /home/steam/csgo-dedicated/csgo/cfg/server.cfg: No such file or directory

I don't think that is expected, is it?

from csgo.

CM2Walki avatar CM2Walki commented on May 14, 2024

I don't receive this error. Can you give me a bit more log context? Is the server.cfg missing on your end for whatever reason?

from csgo.

Nuc1eoN avatar Nuc1eoN commented on May 14, 2024

Is the server.cfg missing on your end for whatever reason?

Correct, the server.cfg is missing in my setup out of some reason.

EDIT: some log context

 Update state (0x61) downloading, progress: 99.40 (24642117514 / 24791608158)
 Update state (0x61) downloading, progress: 99.62 (24697960993 / 24791608158)
 Update state (0x61) downloading, progress: 99.88 (24762002245 / 24791608158)
Success! App '740' fully installed.
sed: can't read /home/steam/csgo-dedicated/csgo/cfg/server.cfg: No such file or directory
Server will auto-restart if there is a crash.
Updating server using Steam.
----------------------------
/home/steam/csgo-dedicated/srcds_run: line 301: ./steam.sh: No such file or directory
----------------------------
Setting breakpad minidump AppID = 740
Using breakpad crash handler
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
[S_API] SteamAPI_Init(): SteamAPI_IsSteamRunning() did not locate a running instance of Steam.
[S_API] SteamAPI_Init(): Loaded '/home/steam/.steam/sdk32/steamclient.so' OK.
[S_API FAIL] SteamAPI_Init() failed; create pipe failed.LD_LIBRARY_PATH=/home/steam/csgo-dedicated/bin:/home/steam/csgo-dedicated:/home/steam/csgo-dedicated/bin:
#
#Console initialized.
#Using breakpad minidump system 740/13764.1176.DC
#Loading VPK file hashes for pure server operation.

from csgo.

CM2Walki avatar CM2Walki commented on May 14, 2024

I think I know what the issue is, the initial config gets hidden by the bind mount. That might be a bit iffy to fix.

from csgo.

Nuc1eoN avatar Nuc1eoN commented on May 14, 2024

@CM2Walki yeah I see... Upon further looking into the issue I've noticed that metamod/sourcemopd does not get installed either, when using the csgo:sourcemod variant. There is no addons folder under csgo/.

EDIT: Maybe it would be worth looking at https://github.com/kaimallea/csgo as it seems to explicitly support bind mounts (according to the readme) and also installing plugins.

from csgo.

Nuc1eoN avatar Nuc1eoN commented on May 14, 2024
 	# Are we in a metamod container? 
 	if [ ! -z "$METAMOD_VERSION" ]; then 
 		LATESTMM=$(wget -qO- https://mms.alliedmods.net/mmsdrop/"${METAMOD_VERSION}"/mmsource-latest-linux) 
 		wget -qO- https://mms.alliedmods.net/mmsdrop/"${METAMOD_VERSION}"/"${LATESTMM}" | tar xvzf - -C "${STEAMAPPDIR}/${STEAMAPP}"	 
 	fi 

Does it even makes sense to bake stuff like server.cfg/metamod/sourcemod into the image then?
If I understand correctly this would download metamod/sourcemod no matter if it's in the file system or not.

Probably some kind of check could also be implemented as you did with server,cfg. But on the other side it could be done purely in the entry.sh without baking it into the image, too.

I'm no docker guru though. Just throwing out some stuff that came to my mind.

from csgo.

CM2Walki avatar CM2Walki commented on May 14, 2024

It still makes sense if you don't use a bind mount. I have to admit though that this is not the best solution. I guess we could get rid of the Dockerfile bit and just save the space.

from csgo.

Nuc1eoN avatar Nuc1eoN commented on May 14, 2024

It still makes sense if you don't use a bind mount.

It would simply move the server customization process from build to initialization time.

Do you think there would be any drawbacks?

from csgo.

Nuc1eoN avatar Nuc1eoN commented on May 14, 2024

@CM2Walki Love the simplicity of the solution.. awesome!

Everything seems to work as expected now. Closing.

from csgo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.