Soren90 / cs2-docker

Dockerized cs2 server
MIT License
32 stars 6 forks source link

Starting Container #10

Closed jpcapone closed 2 months ago

jpcapone commented 10 months ago

When I start the container I get the error listed below:

/mnt/server/cs2/game/cs2.sh: No such file or directory

here is my compose file

`version: "3.7"

services:
  cs2:
    image: soren90/cs2:latest
    container_name: cs2-ds

    environment:
      SERVER_HOSTNAME: "XXXXX"
      RCON_PASSWORD: "XXXXXX" 
      IP: 0.0.0.0 
      PORT: 27015
      GAME_TYPE: 0
      GAME_MODE: 1
      MAP: de_inferno
      MAXPLAYERS: 12
      MAPGROUP: mg_active
      GSLT: XXXXXXXXXXXXXXXXXXXXX
      EXTRAARG: #Extra Launch options

    volumes:
      - /var/lib/docker/volumes/cstrike2:/mnt/server

    network_mode: "host"

    restart: unless-stopped
    stdin_open: true
    tty: true
  rconpanel:
    image: soren90/rcon-panel
    ports:
      - "3000:3000"
    restart: unless-stopped`

I would appreciate any suggestions.

Soren90 commented 10 months ago

Most likely the update of the game didn't go through. Could you share your log from this?

Soren90 commented 10 months ago

Also. This seems a little strange to me:

volumes:
  - /var/lib/docker/volumes/cstrike2:/mnt/server

That's not where you are supposed to put things. (Especially considering that all volume data is put into a _data folder and not directly in the folder you use)

I don't know what the consequences are to use bind mount on the volume path, but that is not how you are supposed to do it. Either you use volume mount as I've documented, or you use bind mount in a separate folder (haven't tested this scenario, but I don't see why it shouldn't work)

Soren90 commented 10 months ago

Did you figure it out?

jpcapone commented 10 months ago

Did you figure it out?

Naaa. I switched over to joedwards32/cs2.....

Soren90 commented 10 months ago

Did you figure it out?

Naaa. I switched over to joedwards32/cs2.....

All right. I'm running this container locally myself and it should work fine.

Are you planning on doing more troubleshooting or can I consider this solved?

jpcapone commented 10 months ago

Did you figure it out?

Naaa. I switched over to joedwards32/cs2.....

All right. I'm running this container locally myself and it should work fine.

Are you planning on doing more troubleshooting or can I consider this solved?

I would be willing to try it again to help you out but every single one of my containers uses the same format for bind mounts. i.e.


volumes:
  - /var/lib/docker/volumes/cstrike2:/mnt/server
    volumes:
      - type: volume
        source: cs2-data
        target: /mnt/server

Ill try it the way you suggest right now.

Soren90 commented 10 months ago

the thing is that you are using the bind mount for the folder that is used with volume mount. Not sure if that is your issue, but that's the first thing I would suspect. Because when you use volume mount it will use this folder:

/var/lib/docker/volumes/cstrike2/_data

But the fact that you use bind mount with that + doing it on the wrong folder might cause some kind of bug, which I haven't tested for.

If you test again, please provide me with your logs, that makes it a lot easier for me to help you.

jpcapone commented 10 months ago

the thing is that you are using the bind mount for the folder that is used with volume mount. Not sure if that is your issue, but that's the first thing I would suspect. Because when you use volume mount it will use this folder:

/var/lib/docker/volumes/cstrike2/_data

But the fact that you use bind mount with that + doing it on the wrong folder might cause some kind of bug, which I haven't tested for.

If you test again, please provide me with your logs, that makes it a lot easier for me to help you.

Took me a minute to understand your point but I am there now. I followed your example and everything appears to be fine. For RCON connection on port 3000, what should I use for username/password?

_cs2-ds_logs.txt

also I am using portainer so I can see that the host path is /var/lib/docker/volumes/cs2-data/_data Shouldn't i be able to use those paths to throw metamod in there?

Soren90 commented 10 months ago

the thing is that you are using the bind mount for the folder that is used with volume mount. Not sure if that is your issue, but that's the first thing I would suspect. Because when you use volume mount it will use this folder: /var/lib/docker/volumes/cstrike2/_data But the fact that you use bind mount with that + doing it on the wrong folder might cause some kind of bug, which I haven't tested for. If you test again, please provide me with your logs, that makes it a lot easier for me to help you.

Took me a minute to understand your point but I am there now. I followed your example and everything appears to be fine. For RCON connection on port 3000, what should I use for username/password?

_cs2-ds_logs.txt

also I am using portainer so I can see that the host path is /var/lib/docker/volumes/cs2-data/_data Shouldn't i be able to use those paths to throw metamod in there?

The rcon panel is from another project. (Not done by me) But the defaults are:

default_username = 'cspanel'; default_password = 'v67ic55x4ghvjfj';

Yeah throwing in metamod in that folder should be fine. Haven't been working with that yet, but I plan to add some kind of scrim mod to this project when I find something stable. But I just haven't had the time yet.

Glad that it works.

escaparrac commented 10 months ago

the thing is that you are using the bind mount for the folder that is used with volume mount. Not sure if that is your issue, but that's the first thing I would suspect. Because when you use volume mount it will use this folder: /var/lib/docker/volumes/cstrike2/_data But the fact that you use bind mount with that + doing it on the wrong folder might cause some kind of bug, which I haven't tested for. If you test again, please provide me with your logs, that makes it a lot easier for me to help you.

Took me a minute to understand your point but I am there now. I followed your example and everything appears to be fine. For RCON connection on port 3000, what should I use for username/password? _cs2-ds_logs.txt also I am using portainer so I can see that the host path is /var/lib/docker/volumes/cs2-data/_data Shouldn't i be able to use those paths to throw metamod in there?

The rcon panel is from another project. (Not done by me) But the defaults are:

default_username = 'cspanel'; default_password = 'v67ic55x4ghvjfj';

Yeah throwing in metamod in that folder should be fine. Haven't been working with that yet, but I plan to add some kind of scrim mod to this project when I find something stable. But I just haven't had the time yet.

Glad that it works.

You might want to check this project, I think you can both take good contributions from each project :D

https://github.com/kus/cs2-modded-server#running-on-linux

Soren90 commented 10 months ago

the thing is that you are using the bind mount for the folder that is used with volume mount. Not sure if that is your issue, but that's the first thing I would suspect. Because when you use volume mount it will use this folder: /var/lib/docker/volumes/cstrike2/_data But the fact that you use bind mount with that + doing it on the wrong folder might cause some kind of bug, which I haven't tested for. If you test again, please provide me with your logs, that makes it a lot easier for me to help you.

Took me a minute to understand your point but I am there now. I followed your example and everything appears to be fine. For RCON connection on port 3000, what should I use for username/password? _cs2-ds_logs.txt also I am using portainer so I can see that the host path is /var/lib/docker/volumes/cs2-data/_data Shouldn't i be able to use those paths to throw metamod in there?

The rcon panel is from another project. (Not done by me) But the defaults are: default_username = 'cspanel'; default_password = 'v67ic55x4ghvjfj'; Yeah throwing in metamod in that folder should be fine. Haven't been working with that yet, but I plan to add some kind of scrim mod to this project when I find something stable. But I just haven't had the time yet. Glad that it works.

You might want to check this project, I think you can both take good contributions from each project :D

https://github.com/kus/cs2-modded-server#running-on-linux

Yeah that seems great! That was basically what I planned to do when mod support was ready. 😊 I guess I could add it when I have time.