vinanrra / Docker-7DaysToDie

7 days to die server using LinuxGSM in Docker with backups, monitor, auto-installable mods and more
GNU General Public License v3.0
233 stars 46 forks source link

[BUG] Server Does not Start: Error when fetching GitHub core_modules.sh #265

Closed ericdeering closed 2 months ago

ericdeering commented 2 months ago

Problem When attempting to start the server its fails to start.

Steps to Recreate Attempt to start the docker container using the compose file provided via the usage page.

Expectation I expected the server to be downloaded and launched.

Screenshots image

Versions:

Docker/Docker-compose docker compose up -d --force-recreate

services:
  7dtdserver:
    image: vinanrra/7dtd-server:latest
    container_name: 7dtdserver
    environment:
      - START_MODE=1                  # Change between START MODES
      - VERSION=stable                # Change between 7 days to die versions
      - PUID=1000                     # Remember to use same as your user
      - PGID=1000                     # Remember to use same as your user
      - TimeZone=America/Indianapolis # Optional - Change Timezone
      - TEST_ALERT=NO                 # Optional - Send a test alert
      - UPDATE_MODS=NO                # Optional - This will allow mods to be update on start, each mod also need to have XXXX_UPDATE=YES to update on start
      - MODS_URLS=""                  # Optional - Mods urls to install, must be ZIP or RAR.
      - ALLOC_FIXES=NO                # Optional - Install ALLOC FIXES
      - ALLOC_FIXES_UPDATE=NO         # Optional - Update Allocs Fixes before server start
      - UNDEAD_LEGACY=NO              # Optional - Install Undead Legacy mod, if DARKNESS_FALLS it's enable will not install anything
      - UNDEAD_LEGACY_VERSION=stable  # Optional - Undead Legacy version
      - UNDEAD_LEGACY_UPDATE=NO       # Optional - Update Undead Legacy mod before server start
      - DARKNESS_FALLS=NO             # Optional - Install Darkness Falls mod, if UNDEAD_LEGACY it's enable will not install anything
      - DARKNESS_FALLS_UPDATE=NO      # Optional - Update Darkness Falls mod before server start
      - DARKNESS_FALLS_URL=False      # Optional - Install the provided Darkness Falls url
      - CPM=NO                        # Optional - CSMM Patron's Mod (CPM)
      - CPM_UPDATE=NO                 # Optional - Update CPM before server start
      - BEPINEX=NO                    # Optional - BepInEx
      - BEPINEX_UPDATE=NO             # Optional - Update BepInEx before server start
      - BACKUP=NO                     # Optional - Backup server
      - BACKUP_HOUR=5                 # Optional - Backup hour 0-23
      - BACKUP_MAX=7                  # Optional - Max backups to keep
      - MONITOR=NO                    # Optional - Keeps server up if crash
    volumes:
      - /**myPath**/7DaysToDieNew/worlds:/home/sdtdserver/.local/share/7DaysToDie/     # 7 Days To Die world saves
      - /**myPath**/7DaysToDieNew/lgsm-config:/home/sdtdserver/lgsm/config-lgsm/sdtdserver # LGSM config folder
      - /**myPath**/7DaysToDieNew/server-files:/home/sdtdserver/serverfiles/                # Optional - serverfiles folder
      - /**myPath**/7DaysToDieNew/logs:/home/sdtdserver/log/                                # Optional - Logs folder
      - /**myPath**/7DaysToDieNew/backups:/home/sdtdserver/lgsm/backup/                    # Optional - If BACKUP=NO, backups folder
    ports:
      - 26900:26900/tcp # Default game ports
      - 26900:26900/udp # Default game ports
      - 26901:26901/udp # Default game ports
      - 26902:26902/udp # Default game ports
      #- 8080:8080/tcp   # OPTIONAL - WEBADMIN
      #- 8081:8081/tcp   # OPTIONAL - TELNET
      #- 8082:8082/tcp   # OPTIONAL - WEBSERVER https://7dtd.illy.bz/wiki/Server%20fixes
    restart: unless-stopped # INFO - NEVER USE WITH START_MODE=4 or START_MODE=0
    networks:
      - proxy

networks:
  proxy:
    external: true

Additional context Only things changed in docker compose were my adding the paths to my volumes and commenting out ports I didn't plan to use.

schuettec commented 2 months ago

Same here... Any workarounds/fixes?

vinanrra commented 2 months ago

Same here... Any workarounds/fixes?

Hi, I'm on vacations when I come back I will give a check

schuettec commented 2 months ago

Hi, thank you very much. And thank you for your efforts in this project. It saved me a lot of time.

Have a nice time!

erdoking commented 2 months ago

I have try to debug the problem...

this is an error of linuxgsm.sh which is run by the docker image https://linuxgsm.com/servers/sdtdserver/

All of the files download in the docker container outsite of the volumes (very nice!)

Please try to cleanup the image and container and start from scratch. Maybe there was a mistake of linuxgsm itself during installation.

Here a debug run of linuxgsm.sh inside my container (allready installed!)

sdtdserver@gameserver-7days:~/lgsm$ bash -x  tmp/linuxgsm.sh
+ '[' -f .dev-debug ']'
+ version=v24.2.3
+ shortname=core
+ gameservername=core
+ commandname=CORE
+++ readlink -f tmp/linuxgsm.sh
++ dirname /home/sdtdserver/lgsm/tmp/linuxgsm.sh
+ rootdir=/home/sdtdserver/lgsm/tmp
+++ readlink -f tmp/linuxgsm.sh
++ basename /home/sdtdserver/lgsm/tmp/linuxgsm.sh
+ selfname=linuxgsm.sh
+ lgsmdir=/home/sdtdserver/lgsm/tmp/lgsm
+ '[' -n '' ']'
+ logdir=/home/sdtdserver/lgsm/tmp/log
+ lgsmlogdir=/home/sdtdserver/lgsm/tmp/log/lgsm
+ steamcmddir=/home/sdtdserver/.steam/steamcmd
+ '[' -n '' ']'
+ serverfiles=/home/sdtdserver/lgsm/tmp/serverfiles
+ modulesdir=/home/sdtdserver/lgsm/tmp/lgsm/modules
+ tmpdir=/home/sdtdserver/lgsm/tmp/lgsm/tmp
+ '[' -n '' ']'
+ datadir=/home/sdtdserver/lgsm/tmp/lgsm/data
+ lockdir=/home/sdtdserver/lgsm/tmp/lgsm/lock
+ sessionname=linuxgsm.sh
+ '[' -f /home/sdtdserver/lgsm/tmp/lgsm/data/linuxgsm.sh.uid ']'
+ serverlist=/home/sdtdserver/lgsm/tmp/lgsm/data/serverlist.csv
+ serverlistmenu=/home/sdtdserver/lgsm/tmp/lgsm/data/serverlistmenu.csv
+ '[' -n '' ']'
+ configdir=/home/sdtdserver/lgsm/tmp/lgsm/config-lgsm
+ configdirserver=/home/sdtdserver/lgsm/tmp/lgsm/config-lgsm/core
+ configdirdefault=/home/sdtdserver/lgsm/tmp/lgsm/config-default
+ userinput=
+ userinput2=
+ '[' -n '' ']'
+ githubuser=GameServerManagers
+ '[' -n '' ']'
+ githubrepo=LinuxGSM
+ '[' -n '' ']'
+ githubbranch=master
++ command -v curl
+ '[' '!' /usr/bin/curl ']'
++ whoami
+ '[' sdtdserver == root ']'
+ '[' core == core ']'
+ fn_bootstrap_fetch_file_github lgsm/data serverlist.csv /home/sdtdserver/lgsm/tmp/lgsm/data nochmodx norun forcedl nomd5
+ github_file_url_dir=lgsm/data
+ github_file_url_name=serverlist.csv
+ '[' master == master ']'
+ '[' GameServerManagers == GameServerManagers ']'
+ '[' CORE '!=' UPDATE-LGSM ']'
+ remote_fileurl=https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/v24.2.3/lgsm/data/serverlist.csv
+ remote_fileurl_backup=https://bitbucket.org/GameServerManagers/LinuxGSM/raw/v24.2.3/lgsm/data/serverlist.csv
+ remote_fileurl_name=GitHub
+ remote_fileurl_backup_name=Bitbucket
+ local_filedir=/home/sdtdserver/lgsm/tmp/lgsm/data
+ local_filename=serverlist.csv
+ chmodx=nochmodx
+ run=norun
+ forcedl=forcedl
+ md5=nomd5
+ fn_bootstrap_fetch_file https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/v24.2.3/lgsm/data/serverlist.csv https://bitbucket.org/GameServerManagers/LinuxGSM/raw/v24.2.3/lgsm/data/serverlist.csv GitHub Bitbucket /home/sdtdserver/lgsm/tmp/lgsm/data serverlist.csv nochmodx norun forcedl nomd5
+ remote_fileurl=https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/v24.2.3/lgsm/data/serverlist.csv
+ remote_fileurl_backup=https://bitbucket.org/GameServerManagers/LinuxGSM/raw/v24.2.3/lgsm/data/serverlist.csv
+ remote_fileurl_name=GitHub
+ remote_fileurl_backup_name=Bitbucket
+ local_filedir=/home/sdtdserver/lgsm/tmp/lgsm/data
+ local_filename=serverlist.csv
+ chmodx=nochmodx
+ run=norun
+ forcedl=forcedl
+ md5=nomd5
+ '[' '!' -f /home/sdtdserver/lgsm/tmp/lgsm/data/serverlist.csv ']'
+ '[' -n https://bitbucket.org/GameServerManagers/LinuxGSM/raw/v24.2.3/lgsm/data/serverlist.csv ']'
+ counter=0
+ remote_fileurls_array=(remote_fileurl remote_fileurl_backup)
+ for remote_fileurl_array in "${remote_fileurls_array[@]}"
+ '[' remote_fileurl == remote_fileurl ']'
+ fileurl=https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/v24.2.3/lgsm/data/serverlist.csv
+ fileurl_name=GitHub
+ counter=1
+ '[' '!' -d /home/sdtdserver/lgsm/tmp/lgsm/data ']'
+ mkdir -p /home/sdtdserver/lgsm/tmp/lgsm/data
+ trap fn_fetch_trap INT
+ echo -en 'fetching GitHub serverlist.csv...\c'
fetching GitHub serverlist.csv...++ curl --connect-timeout 10 -s --fail -L -o /home/sdtdserver/lgsm/tmp/lgsm/data/serverlist.csv https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/v24.2.3/lgsm/data/serverlist.csv
+ curlcmd=
+ local exitcode=0
+ '[' -f /home/sdtdserver/lgsm/tmp/lgsm/data/serverlist.csv ']'
++ head /home/sdtdserver/lgsm/tmp/lgsm/data/serverlist.csv
++ grep DOCTYPE
+ '[' -n '' ']'
+ '[' 0 '!=' 0 ']'
+ echo -en OK
OK+ sleep 0.3
+ echo -en '\033[2K\r'
+ '[' -f '' ']'
+ '[' nochmodx == chmodx ']'
+ trap - INT
+ break
+ '[' -f /home/sdtdserver/lgsm/tmp/lgsm/data/serverlist.csv ']'
+ '[' norun == run ']'
+ '[' '!' -f /home/sdtdserver/lgsm/tmp/lgsm/data/serverlist.csv ']'
+ '[' '' == list ']'
+ '[' '' == l ']'
+ '[' '' == install ']'
+ '[' '' == i ']'
+ '[' '' ']'
+ fn_install_getopt
+ userinput=empty
+ echo -e 'Usage: tmp/linuxgsm.sh [option]'
Usage: tmp/linuxgsm.sh [option]
+ echo -e ''

+ echo -e 'Installer - Linux Game Server Managers - Version v24.2.3'
Installer - Linux Game Server Managers - Version v24.2.3
+ echo -e https://linuxgsm.com
https://linuxgsm.com
+ echo -e ''

+ echo -e Commands
Commands
+ echo -e 'install\t\t| Select server to install.'
install         | Select server to install.
+ echo -e 'servername\t| Enter name of game server to install. e.g tmp/linuxgsm.sh csgoserver.'
servername      | Enter name of game server to install. e.g tmp/linuxgsm.sh csgoserver.
+ echo -e 'list\t\t| List all servers available for install.'
list    | List all servers available for install.
+ exit

Normally core_modules.sh is downloaded during fresh installation see line 113/114 of linuxgsm.sh

        echo -en "fetching ${fileurl_name} ${local_filename}...\c"
        curlcmd=$(curl --connect-timeout 10 -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}" 2>&1)
ericdeering commented 2 months ago

Looks like this issue was on my end. For some reason my docker containers were unable to connect to the internet. I reinstalled ubuntu server 24.04 LTS and its working correctly again. Thank you for the assistance.

schuettec commented 1 month ago

Removing the container and images did the trick :)