Didstopia / 7dtd-server

Provides a dedicated linux server for 7 Days to Die running inside a Docker container.
MIT License
108 stars 45 forks source link

libcurl issue #26

Closed Andargor closed 4 years ago

Andargor commented 4 years ago

Hello, and thanks for this container.

I am getting the following error messages from the container:

/tmp/dumps/crash_20191231205908_19.dmp

crash_20191231205908_19.dmp[1642]: Finished uploading minidump (out-of-process): success = no

crash_20191231205908_19.dmp[1642]: error: libcurl.so: cannot open shared object file: No such file or directory

crash_20191231205908_19.dmp[1642]: file ''/tmp/dumps/crash_20191231205908_19.dmp'', upload no: ''libcurl.so: cannot open shared object file: No such file or directory''

I am trying to fix with apt update; apt install libcurl4-gnutls-dev inside the container, will let you know if this fixes it.

Andargor commented 4 years ago

That did not fix it. Trying apt update; apt install libcurl3

Nope, I can't seem to get this fixed. The crash dump message appears every few minutes or so, and I don't know the root cause but it seems related to steamcmd.

Dids commented 4 years ago

What's the host OS, architecture and Docker version? I'm currently running this in production, and haven't seen this issue.

By the looks of it, it's crashing and failing to upload the crash information, so your actual issue is likely elsewhere.

Are you sure you have enough resources, especially memory and disk space, for the container?

Andargor commented 4 years ago
Docker version 19.03.5, build 633a0ea838

Distributor ID: Ubuntu
Description:    Ubuntu 18.04.3 LTS
Release:        18.04
Codename:       bionic

I noticed the Dockerfile is based on 16.04, kernel version issue perhaps?

EDIT: There is 32 GB memory on that machine, with a 14K map and other docker containers it has 16GB free. Disk is at 22% of 2 TB SSD.

Andargor commented 4 years ago

As additional info, here is my docker run command, I am mapping to local directories in case that is the issue:

docker run --name 7dtd -d -t \
        -p 26900-26905:26900-26905/tcp \
        -p 26900-26905:26900-26905/udp \
        -p XXXXX:XXXXX/tcp \
        -e SEVEN_DAYS_TO_DIE_UPDATE_CHECKING="1" \
        -e SEVEN_DAYS_TO_DIE_TELNET_PORT=XXXXX \
        -e SEVEN_DAYS_TO_DIE_TELNET_PASSWORD="XXXXX" \
        -e SEVEN_DAYS_TO_DIE_BRANCH="latest_experimental" \
        --restart unless-stopped \
        -v /local/7dtd/server:/steamcmd/7dtd \
        -v /local/7dtd/data:/root/.local/share/7DaysToDie \
        didstopia/7dtd-server
Dids commented 4 years ago

Deploying a fix for this today. :)

Dids commented 4 years ago

More information on the issue: https://dev.to/jake/using-libcurl3-and-libcurl4-on-ubuntu-1804-bionic-184g

Dids commented 4 years ago

Should be fixed now.

Andargor commented 4 years ago

Hi, thanks for the update. I updated today, and it still gives errors, although now they are different:

crash_20200121195053_19.dmp[238]: Uploading dump (out-of-process)
/tmp/dumps/crash_20200121195053_19.dmp

crash_20200121195053_19.dmp[238]: Finished uploading minidump (out-of-process): success = no

crash_20200121195053_19.dmp[238]: error: libcurl.so: wrong ELF class: ELFCLASS64

crash_20200121195053_19.dmp[238]: file ''/tmp/dumps/crash_20200121195053_19.dmp'', upload no: ''libcurl.so: wrong ELF class: ELFCLASS64''

crash_20200121195559_19.dmp[290]: Uploading dump (out-of-process)
/tmp/dumps/crash_20200121195559_19.dmp

crash_20200121195559_19.dmp[290]: Finished uploading minidump (out-of-process): success = no

crash_20200121195559_19.dmp[290]: error: libcurl.so: wrong ELF class: ELFCLASS64

crash_20200121195559_19.dmp[290]: file ''/tmp/dumps/crash_20200121195559_19.dmp'', upload no: ''libcurl.so: wrong ELF class: ELFCLASS64''

crash_20200121200104_19.dmp[342]: Uploading dump (out-of-process)
/tmp/dumps/crash_20200121200104_19.dmp

crash_20200121200104_19.dmp[342]: Finished uploading minidump (out-of-process): success = no

crash_20200121200104_19.dmp[342]: error: libcurl.so: wrong ELF class: ELFCLASS64

crash_20200121200104_19.dmp[342]: file ''/tmp/dumps/crash_20200121200104_19.dmp'', upload no: ''libcurl.so: wrong ELF class: ELFCLASS64''

crash_20200121201119_19.dmp[443]: Uploading dump (out-of-process)
/tmp/dumps/crash_20200121201119_19.dmp

crash_20200121201119_19.dmp[443]: Finished uploading minidump (out-of-process): success = no

crash_20200121201119_19.dmp[443]: error: libcurl.so: wrong ELF class: ELFCLASS64

crash_20200121201119_19.dmp[443]: file ''/tmp/dumps/crash_20200121201119_19.dmp'', upload no: ''libcurl.so: wrong ELF class: ELFCLASS64''

crash_20200121202129_19.dmp[544]: Uploading dump (out-of-process)
/tmp/dumps/crash_20200121202129_19.dmp

crash_20200121202129_19.dmp[544]: Finished uploading minidump (out-of-process): success = no

crash_20200121202129_19.dmp[544]: error: libcurl.so: wrong ELF class: ELFCLASS64

crash_20200121202129_19.dmp[544]: file ''/tmp/dumps/crash_20200121202129_19.dmp'', upload no: ''libcurl.so: wrong ELF class: ELFCLASS64''
Dids commented 4 years ago

Thanks! That's definitely something I should be able to work with. :) I still find the issue very odd, considering the image should be identical for us both, yet I'm no longer seeing any libcurl.so errors (and definitely not the architecture errors you're now seeing).

Dids commented 4 years ago

I think I've finally found a fix, but while this will fix the libcurl issues, it won't fix the internal steamcmd crashes. These are likely bugs in steamcmd itself. The issue with libcurl comes from a missing dependency (or steamcmd unable to locate the correct library), as it uses libcurl for sending crash reports back to Valve.

Dids commented 4 years ago

Should be fixed now, or at least as fixed as I can get it.

Andargor commented 4 years ago

It's still doing it, but it's not a biggie. Things seem to work anyway, and the only annoyance is that the dump files accumulate in /tmp/dumps

The only thing I can see is a kernel issue, maybe i386 support or something.

EDIT: Actually, re-reading the error message, it seems the libcurl function does actually work now! The root cause is still unknown though, but I'll check if dump files still accumulate

Just as reference, if you ever get around to it (no rush), here are a few choice excerpts from the log which may or may not be related:

Success! App '294420' fully installed.
quit
+ '[' 0 -ne 0 ']'
+ '[' '!' -f /steamcmd/7dtd/build.id ']'
++ cat /steamcmd/7dtd/build.id
+ OLD_BUILDID=4584731
+ STRING_SIZE=7
+ '[' 7 -lt 6 ']'
+ '[' 0 = 1 ']'
+ echo 'Starting scheduled task manager..'
Starting scheduled task manager..
+ cd /steamcmd/7dtd
+ '[' '!' -f /steamcmd/7dtd/serverconfig.xml ']'
+ '[' '!' -f /root/.local/share/7DaysToDie/serverconfig.xml ']'
+ child=61
+ wait 61
+ exec /steamcmd/7dtd/7DaysToDieServer.x86_64 -logfile /dev/stdout -quit -batchmode -nographics -dedicated -configfile=/root/.local/share/7DaysToDie/serverconfig.xml
+ node /scheduler_app/app.js
Found path: /steamcmd/7dtd/7DaysToDieServer.x86_64
Mono path[0] = '/steamcmd/7dtd/7DaysToDieServer_Data/Managed'
Mono config path = '/steamcmd/7dtd/7DaysToDieServer_Data/MonoBleedingEdge/etc'
Preloaded 'libMagick.so'
eac_server.so [x64] :: OnLoad()
Preloaded 'libeac_server.so'
Preloaded 'libeasyanticheat.so'
Preloaded 'libgetrss.so'
Preloaded 'libsteam_api.so'
Preloaded 'steamclient.so'
Unable to preload the following plugins:
        libMouseLib.so
        libeac_server.so
        libeasyanticheat.so
        libgetrss.so
        libsteam_api.so
        steamclient.so
        libMouseLib.so
PlayerPrefs - Creating folder: /root/.config/unity3d/The Fun Pimps
PlayerPrefs - Creating folder: /root/.config/unity3d/The Fun Pimps/7 Days To Die - Dedicated
Initialize engine version: 2019.1.0f2 (292b93d75a2c)
Forcing GfxDevice: Null
GfxDevice: creating device client; threaded=0
NullGfxDevice:
    Version:  NULL 1.0 [1.0]
    Renderer: Null Device
    Vendor:   Unity Technologies
Begin MonoManager ReloadAssembly
Fallback handler could not load library /steamcmd/7dtd/7DaysToDieServer_Data/Mono/libKernel32
Fallback handler could not load library /steamcmd/7dtd/7DaysToDieServer_Data/Mono/libKernel32.so
Fallback handler could not load library /steamcmd/7dtd/7DaysToDieServer_Data/Mono/Kernel32
Fallback handler could not load library /steamcmd/7dtd/7DaysToDieServer_Data/Mono/libKernel32
Fallback handler could not load library /steamcmd/7dtd/7DaysToDieServer_Data/Mono/libKernel32.so
Fallback handler could not load library /steamcmd/7dtd/7DaysToDieServer_Data/Mono/libKernel32
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
Setting breakpad minidump AppID = 251570
crash_20200122144844_19.dmp[199]: Uploading dump (out-of-process)
/tmp/dumps/crash_20200122144844_19.dmp

crash_20200122144844_19.dmp[199]: Finished uploading minidump (out-of-process): success = yes

crash_20200122144844_19.dmp[199]: response: Discarded=1

crash_20200122144844_19.dmp[199]: file ''/tmp/dumps/crash_20200122144844_19.dmp'', upload yes: ''Discarded=1''