joedwards32/CS2

Server crash on first connection after entering hibernation

Closed this issue · 4 comments

fluse commented

if you add more than one server in my case (sv_lan 1)

  • Connect to one of them
  • Open Server Browser
  • Connect do an different
  • now the previous server is crashed

Has someone same problems? Has someone a fix for this?

here yaml for testing:

version: '3.7'
services:
  ehrenfeld:
    image: joedwards32/cs2
    container_name: ehrenfeld
    restart: always
    environment:
      - CS2_SERVERNAME=5vs5 Ehrenfeld     # (Set the visible name for your private server)
      - CS2_PORT=27015              # (CS2 server listen port tcp_udp)
      - CS2_LAN=1                  # (0 - LAN mode disabled, 1 - LAN Mode enabled)
      - CS2_RCONPW=test         # (RCON password)
      - CS2_PW=             # (CS2 server password)
      - CS2_MAXPLAYERS=12           # (Max players)
      - CS2_ADDITIONAL_ARGS         # (Optional additional arguments to pass into cs2)
      # Game modes
      - CS2_GAMEALIAS=competitive               # (Game type, e.g. casual, competitive, deathmatch. See https://developer.valvesoftware.com/wiki/Counter-Strike_2/Dedicated_Servers)
      - CS2_MAPGROUP=mg_active      # (Map pool)
      - CS2_STARTMAP=de_inferno     # (Start map)
      # Bots
      - CS2_BOT_DIFFICULTY          # (0 - easy, 1 - normal, 2 - hard, 3 - expert)
      - CS2_BOT_QUOTA               # (Number of bots)
      - CS2_BOT_QUOTA_MODE          # (fill, competitive)
      # TV
      - TV_AUTORECORD=0             # Automatically records all games as CSTV demos: 0=off, 1=on.
      - TV_ENABLE=1                 # Activates CSTV on server: 0=off, 1=on.
      - TV_PORT=27020               # Host SourceTV port
      - TV_PW=watch              # CSTV password for clients
      - TV_RELAY_PW=watch        # CSTV password for relay proxies
      - TV_MAXRATE=0                # World snapshots to broadcast per second. Affects camera tickrate.
      - TV_DELAY=0                  # Max CSTV spectator bandwidth rate allowed, 0 == unlimited
    ports:
      - "27015:27015/tcp"
      - "27015:27015/udp"
      - "27020:27020/udp"
    volumes:
      - ehrenfeld:/home/steam/cs2-dedicated/  # (Change /mnt/cs2 according to your volume location)
  nippes:
    image: joedwards32/cs2
    container_name: nippes
    restart: always
    environment:
      - CS2_SERVERNAME=5vs5 Nippes     # (Set the visible name for your private server)
      - CS2_PORT=27016              # (CS2 server listen port tcp_udp)
      - CS2_LAN=1                  # (0 - LAN mode disabled, 1 - LAN Mode enabled)
      - CS2_RCONPW=test         # (RCON password)
      - CS2_PW=             # (CS2 server password)
      - CS2_MAXPLAYERS=12           # (Max players)
      - CS2_ADDITIONAL_ARGS         # (Optional additional arguments to pass into cs2)
      # Game modes
      - CS2_GAMEALIAS=competitive               # (Game type, e.g. casual, competitive, deathmatch. See https://developer.valvesoftware.com/wiki/Counter-Strike_2/Dedicated_Servers)
      - CS2_MAPGROUP=mg_active      # (Map pool)
      - CS2_STARTMAP=de_inferno     # (Start map)
      # Bots
      - CS2_BOT_DIFFICULTY          # (0 - easy, 1 - normal, 2 - hard, 3 - expert)
      - CS2_BOT_QUOTA               # (Number of bots)
      - CS2_BOT_QUOTA_MODE          # (fill, competitive)
      # TV
      - TV_AUTORECORD=0             # Automatically records all games as CSTV demos: 0=off, 1=on.
      - TV_ENABLE=1                 # Activates CSTV on server: 0=off, 1=on.
      - TV_PORT=27021               # Host SourceTV port
      - TV_PW=watch              # CSTV password for clients
      - TV_RELAY_PW=watch        # CSTV password for relay proxies
      - TV_MAXRATE=0                # World snapshots to broadcast per second. Affects camera tickrate.
      - TV_DELAY=0                  # Max CSTV spectator bandwidth rate allowed, 0 == unlimited
    volumes:
      - nippes:/home/steam/cs2-dedicated/  # (Change /mnt/cs2 according to your volume location)
    ports:
      - "27016:27016/tcp"           # TCP
      - "27016:27016/udp"           # UDP
      - "27021:27021/udp"           # UDP
  ballerbude:
    image: joedwards32/cs2
    container_name: ballerbude
    restart: always
    environment:
      - CS2_SERVERNAME=Ballerbude     # (Set the visible name for your private server)
      - CS2_PORT=27017              # (CS2 server listen port tcp_udp)
      - CS2_LAN=1                  # (0 - LAN mode disabled, 1 - LAN Mode enabled)
      - CS2_RCONPW=test         # (RCON password)
      - CS2_PW=             # (CS2 server password)
      - CS2_MAXPLAYERS=16           # (Max players)
      - CS2_ADDITIONAL_ARGS         # (Optional additional arguments to pass into cs2)
      # Game modes
      - CS2_GAMEALIAS=casual               # (Game type, e.g. casual, competitive, deathmatch. See https://developer.valvesoftware.com/wiki/Counter-Strike_2/Dedicated_Servers)
      - CS2_MAPGROUP=mg_active      # (Map pool)
      - CS2_STARTMAP=de_nuke     # (Start map)
      # Bots
      - CS2_BOT_DIFFICULTY          # (0 - easy, 1 - normal, 2 - hard, 3 - expert)
      - CS2_BOT_QUOTA               # (Number of bots)
      - CS2_BOT_QUOTA_MODE          # (fill, competitive)
      # TV
      - TV_AUTORECORD=0             # Automatically records all games as CSTV demos: 0=off, 1=on.
      - TV_ENABLE=0                 # Activates CSTV on server: 0=off, 1=on.
      - TV_PORT=27022               # Host SourceTV port
      - TV_PW=changeme              # CSTV password for clients
      - TV_RELAY_PW=changeme        # CSTV password for relay proxies
      - TV_MAXRATE=0                # World snapshots to broadcast per second. Affects camera tickrate.
      - TV_DELAY=0                  # Max CSTV spectator bandwidth rate allowed, 0 == unlimited
    volumes:
      - ballerbude:/home/steam/cs2-dedicated/  # (Change /mnt/cs2 according to your volume location)
    ports:
      - "27017:27017/tcp"           # TCP
      - "27017:27017/udp"           # UDP
      - "27022:27022/udp"           # UDP
volumes:
  ehrenfeld:
  nippes:
  ballerbude:                                                                                                                                                                                         108,14        

This is a bug with connecting a server which has gone into hibernation (no players connected).

I've been looking into it and I think I will disable hibernation by default and add an environment variable to toggle it off/on.

fluse commented

Nice thank you. I am currently preparing a Lanparty that will take place in January. That reassures me that it is solvable.

I am currently programming a nice RCON interface. Maybe that is also interesting for you:

https://github.com/fluse/rcon-io

If you like it, you can also note it in your README

@fluse please give it a go with the latest version of the container. See #73

fluse commented

thanks. i have tested it now and it works. good work. many thanks