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
210 stars 42 forks source link

[BUG] Server fails to start with Bepinex enabled #200

Closed RyanHakurei closed 7 months ago

RyanHakurei commented 9 months ago

Describe the bug The server crashes very early on when Bepinex is enabled in my Docker Compose file. This actually renders the server permanently unstartable too until everything in the serverfiles directory (/home/sdtdserver/serverfiles/) is deleted and the startup script is forced to re-download the files.

To Reproduce Steps to reproduce the behavior:

  1. Enable Bepinex
  2. Observe that the server fails to start very early on
  3. Observe that the server is permanently borked until the server files (the ones in /home/sdtdserver/serverfiles/) are deleted and redownloaded.

Expected behavior I expect the server to start.

Screenshots If applicable, add screenshots to help explain your problem.

Versions:

Docker/Docker-compose

# 7 Days to Die Server
    7daysserver:
        restart: always
        container_name: 7-Days-To-Die
        volumes:
            - '/mnt/SSD/Sandbox/7Days/7DaysToDie:/home/sdtdserver/.local/share/7DaysToDie/'
            - '/mnt/SSD/Sandbox/7Days/ServerFiles:/home/sdtdserver/serverfiles/'
            - '/mnt/SSD/Sandbox/7Days/LGSM:/home/sdtdserver/lgsm/config-lgsm/sdtdserver'
            - '/mnt/SSD/Sandbox/7Days/Backups:/home/sdtdserver/lgsm/backup/'
        environment:
            - START_MODE=1
            - VERSION=stable
            - PUID=1000
            - PGID=1000
            - TimeZone=America/New_York
            - TEST_ALERT=NO
            - UPDATE_MODS=YES
            - ALLOC_FIXES=NO
            - UNDEAD_LEGACY=NO
            - DARKNESS_FALLS=NO
            - BACKUP=YES
            - MONITOR=YES
            - BEPINEX=YES
            - BEPINEX_UPDATE=YES
        ports:
            - 26900:26900/tcp
            - 26900:26900/udp
            - 26901:26901/udp
            - 26902:26902/udp
            - 6324:8080/tcp
            - 6667:8082/tcp
        image: vinanrra/7dtd-server

Additional context

Here's the log file:

        =======================================================================
        USER INFO:

        UID: 1000
        GID: 1000

        MORE INFO:

        If you have permission problems remember to use same user UID and GID.
        Check it with id command
        If problem persist check:
        https://github.com/vinanrra/Docker-7DaysToDie/blob/master/README.md
        =======================================================================

 * Starting periodic command scheduler cron
   ...done.
[INFO] Updating/Installing mods
[BepInEx] Downloading release from https://github.com/BepInEx/BepInEx/releases/download/v5.4.22/BepInEx_unix_5.4.22.0.zip
[BepInEx] Downloading files
[BepInEx] Extracting files
[BepInEx] Removing older version
[BepInEx] Installing components
[BepInEx] Editing run_bepinex.sh
[BepInEx] Editing executable_name
[BepInEx] Editing command last execution
[BepInEx] Fixing executable_type
[BepInEx] Replacing start parameters for LinuxGSM
[BepInEx] Replacing executable for LinuxGSM
[BepInEx] Applying executable permssions
[BepInEx] Cleanup
[BepInEx] Finished! ヽ(´▽`)/
[INFO] Updating/Installing mods finished
[INFO] Activated automatic backup at 5AM
[INFO] Activated LinuxGSM server monitoring
[INFO] Starting server...
[ FAIL ] Starting sdtdserver: Could not copy any steamclient.so 64bit for the gameserver
[  OK  ] Starting sdtdserver: Applying steamclient.so sdk64 hardlink fix: 7 Days To Die
[ FAIL ] Starting sdtdserver: Could not copy any steamclient.so 32bit for the gameserver
[  OK  ] Starting sdtdserver: Applying steamclient.so sdk32 link fix: 7 Days To Die
no server running on /tmp/tmux-1000/default
[ FAIL ] Starting sdtdserver: Unable to start <Server Name>
JonnySiHI commented 8 months ago

BepInEx is also failing for me :(

vinanrra commented 8 months ago

There seems to be an issue with BepInEx i will remove the support because isn't working with any version here are the logs:

System.TypeInitializationException: The type initializer for 'HarmonyXInterop.HarmonyInterop' threw an exception. ---> System.ArgumentException: method arguments are incompatible
  at System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method, System.Boolean throwOnBindFailure, System.Boolean allowClosed) [0x002e3] in <b0b74789f1894dcc9a389d6f5a51da7d>:0 
  at System.Delegate.CreateDelegate (System.Type type, System.Reflection.MethodInfo method, System.Boolean throwOnBindFailure) [0x00000] in <b0b74789f1894dcc9a389d6f5a51da7d>:0 
  at System.Delegate.CreateDelegate (System.Type type, System.Reflection.MethodInfo method) [0x00000] in <b0b74789f1894dcc9a389d6f5a51da7d>:0 
  at HarmonyLib.AccessTools.MethodDelegate[DelegateType] (System.Reflection.MethodInfo method, System.Object instance, System.Boolean virtualCall) [0x00021] in <78c1d5ebcc984a739a6da61ee5e07d42>:0 
  at HarmonyXInterop.HarmonyInterop..cctor () [0x0005b] in <291bcc5c6d6d41cd8e7e38b09c8ef294>:0 
   --- End of inner exception stack trace ---
  at BepInEx.Preloader.RuntimeFixes.HarmonyInteropFix.Apply () [0x00005] in <2a40e3e9724c465d90976291a9b865b3>:0

I have found this as alternative, but I have no time to add the support:

https://github.com/OCB7D2D/OcbModCompiler

I haven't tested.

vinanrra commented 7 months ago

need help with this, i'm unable to fix it, if someone know which version works with A21 send me the comands you use or the version

vinanrra commented 7 months ago

Seems there it's an issue with A21 with BepInEx, I will leave the BepInEx installation for older releases A20 (later i will drop support, when A22 it's out)