Renegade-Master / zomboid-dedicated-server

Linux based Docker image containing a Dedicated Server for Project Zomboid.
https://hub.docker.com/r/renegademaster/zomboid-dedicated-server
Other
174 stars 59 forks source link

/home/steam/steamcmd.sh: line 38: 20 Segmentation fault (core dumped) $DEBUGGER "$STEAMEXE" "$@" and more! #24

Closed DoomOfMax97 closed 2 years ago

DoomOfMax97 commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Cloned repository.
  2. Built image with "docker compose up --build
  3. Started image using "docker compose up --build
  4. See attached error: See end of post.

Expected behavior The Server to launch properly

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

Desktop (please complete the following information):

Client: Docker Engine - Community Version: 20.10.17 API version: 1.41 Go version: go1.17.11 Git commit: 100c701 Built: Mon Jun 6 23:02:57 2022 OS/Arch: linux/amd64 Context: default Experimental: true

Server: Docker Engine - Community Engine: Version: 20.10.17 API version: 1.41 (minimum version 1.12) Go version: go1.17.11 Git commit: a89b842 Built: Mon Jun 6 23:01:03 2022 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.6 GitCommit: 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1 runc: Version: 1.1.2 GitCommit: v1.1.2-0-ga916309 docker-init: Version: 0.19.0 GitCommit: de40ad0 ]

Additional context

Add any other context about the problem here. Installed docker using "curl -fsSL https://get.docker.com -o get-docker.sh" (And running it)

zomboid-dedicated-server-zomboid-server-1 | zomboid-dedicated-server-zomboid-server-1 | ### Setting variables... zomboid-dedicated-server-zomboid-server-1 | /home/steam/run_server.sh: line 187: /home/steam/Zomboid/ip.txt: Permission denied zomboid-dedicated-server-zomboid-server-1 | zomboid-dedicated-server-zomboid-server-1 | ### Updating Folder Permissions... zomboid-dedicated-server-zomboid-server-1 | chown: changing ownership of '/home/steam/ZomboidDedicatedServer': Operation not permitted zomboid-dedicated-server-zomboid-server-1 | chown: changing ownership of '/home/steam/Zomboid': Operation not permitted zomboid-dedicated-server-zomboid-server-1 | zomboid-dedicated-server-zomboid-server-1 | ### Folder Permissions updated. zomboid-dedicated-server-zomboid-server-1 | zomboid-dedicated-server-zomboid-server-1 | ### Applying Pre Install Configuration... zomboid-dedicated-server-zomboid-server-1 | zomboid-dedicated-server-zomboid-server-1 | ### Pre Install Configuration applied. zomboid-dedicated-server-zomboid-server-1 | zomboid-dedicated-server-zomboid-server-1 | ### Updating Project Zomboid Server... zomboid-dedicated-server-zomboid-server-1 | /home/steam/steamcmd.sh: line 38: 20 Segmentation fault (core dumped) $DEBUGGER "$STEAMEXE" "$@" zomboid-dedicated-server-zomboid-server-1 | zomboid-dedicated-server-zomboid-server-1 | ### Project Zomboid Server updated. zomboid-dedicated-server-zomboid-server-1 | zomboid-dedicated-server-zomboid-server-1 | ### Checking if this is the first run... zomboid-dedicated-server-zomboid-server-1 | zomboid-dedicated-server-zomboid-server-1 | ### This is the first run. zomboid-dedicated-server-zomboid-server-1 | Starting server for 60 seconds zomboid-dedicated-server-zomboid-server-1 | zomboid-dedicated-server-zomboid-server-1 | ### Starting Project Zomboid Server... zomboid-dedicated-server-zomboid-server-1 | timeout: failed to run command '/home/steam/ZomboidDedicatedServer/start-server.sh': No such file or directory zomboid-dedicated-server-zomboid-server-1 | zomboid-dedicated-server-zomboid-server-1 | ### Project Zomboid Server stopped. zomboid-dedicated-server-zomboid-server-1 | zomboid-dedicated-server-zomboid-server-1 | ### First run check complete. zomboid-dedicated-server-zomboid-server-1 | zomboid-dedicated-server-zomboid-server-1 | ### Applying Post Install Configuration... zomboid-dedicated-server-zomboid-server-1 | /home/steam/Zomboid/Server/ZomboidServer.ini not found! zomboid-dedicated-server-zomboid-server-1 | /home/steam/Zomboid/Server/ZomboidServer.ini not found! zomboid-dedicated-server-zomboid-server-1 | /home/steam/Zomboid/Server/ZomboidServer.ini not found! zomboid-dedicated-server-zomboid-server-1 | /home/steam/Zomboid/Server/ZomboidServer.ini not found! zomboid-dedicated-server-zomboid-server-1 | /home/steam/Zomboid/Server/ZomboidServer.ini not found! zomboid-dedicated-server-zomboid-server-1 | /home/steam/Zomboid/Server/ZomboidServer.ini not found! zomboid-dedicated-server-zomboid-server-1 | /home/steam/Zomboid/Server/ZomboidServer.ini not found! zomboid-dedicated-server-zomboid-server-1 | /home/steam/Zomboid/Server/ZomboidServer.ini not found! zomboid-dedicated-server-zomboid-server-1 | /home/steam/Zomboid/Server/ZomboidServer.ini not found! zomboid-dedicated-server-zomboid-server-1 | /home/steam/Zomboid/Server/ZomboidServer.ini not found! zomboid-dedicated-server-zomboid-server-1 | /home/steam/Zomboid/Server/ZomboidServer.ini not found! zomboid-dedicated-server-zomboid-server-1 | /home/steam/Zomboid/Server/ZomboidServer.ini not found! zomboid-dedicated-server-zomboid-server-1 | zomboid-dedicated-server-zomboid-server-1 | ### Post Install Configuration applied. zomboid-dedicated-server-zomboid-server-1 | sed: can't read /home/steam/ZomboidDedicatedServer/ProjectZomboid64.json: No such file or directory zomboid-dedicated-server-zomboid-server-1 | zomboid-dedicated-server-zomboid-server-1 | ### Starting Project Zomboid Server... zomboid-dedicated-server-zomboid-server-1 | timeout: failed to run command '/home/steam/ZomboidDedicatedServer/start-server.sh': No such file or directory zomboid-dedicated-server-zomboid-server-1 | zomboid-dedicated-server-zomboid-server-1 | ### Project Zomboid Server stopped. zomboid-dedicated-server-zomboid-server-1 exited with code 0

Renegade-Master commented 2 years ago

Hello!

Looks like a permissions issue.

If you type

ls -lan

are the folders ZomboidConfig, and ZomboidDedicatedServer listed as belonging to your user?

DoomOfMax97 commented 2 years ago

Yep I think so

michael@michael:~/ProjectZomboid/zomboid-dedicated-server$ ls -lan total 96 drwxrwxr-x 8 1000 1000 4096 Jun 23 19:28 . drwxrwxr-x 3 1000 1000 4096 Jun 23 19:28 .. drwxrwxr-x 2 1000 1000 4096 Jun 23 19:31 docker -rw-rw-r-- 1 1000 1000 2024 Jun 23 19:28 docker-compose.yaml -rw-rw-r-- 1 1000 1000 27 Jun 23 19:28 .dockerignore drwxrwxr-x 8 1000 1000 4096 Jun 23 19:28 .git drwxrwxr-x 4 1000 1000 4096 Jun 23 19:28 .github -rw-rw-r-- 1 1000 1000 2616 Jun 23 19:28 .gitignore -rw-rw-r-- 1 1000 1000 35413 Jun 23 19:28 LICENSE -rw-rw-r-- 1 1000 1000 15836 Jun 23 19:28 README.md drwxrwxr-x 2 1000 1000 4096 Jun 23 19:28 src drwxrwxr-x 2 1000 1000 4096 Jun 23 19:28 ZomboidConfig drwxrwxr-x 2 1000 1000 4096 Jun 23 19:28 ZomboidDedicatedServer

Renegade-Master commented 2 years ago

Strange.

Out of interest, were you using docker-compose up or docker compose up

I use the standalone Docker-Compose. I am not sure if there is complete feature parity between docker-compose and docker compose.

Apart from that though, I can't see why this isn't working.

Do the issues persist?

corp-0 commented 2 years ago

I have the same exact issue, I'm running with the new docker compose command in Ubuntu 22.04. What do you mean not using sudo when invoking docker compose commands? docker requires sudo

DoomOfMax97 commented 2 years ago

@Renegade-Master I was using 'docker compose up', without sudo, I installed docker from here: https://docs.docker.com/engine/install/ubuntu/

[x] Make sure you are not the root user, or using sudo * [x] Make sure that you do not run any Docker or Docker-Compose commands with sudo [x] Delete ZomboidConfig, and ZomboidDedicatedServer directories and recreate them manually [x] Run docker-compose down; docker-compose up --detach; docker-compose logs --follow * I am the user I created during the ubuntu install, but I need to run commands with sudo to run them as an admin. had to use 'docker compose' instead of 'docker-compose'. log.txt

@corp-0 You can and you should for security reasons, but as far as I can tell for now it's a bit of a hassle. (As in I haven't found an easy way that works flawlessly yet, but haven't looked that much either.)

Renegade-Master commented 2 years ago

@corp-0 @DoomOfMax97

So, you run Docker at least without having to type sudo by following the "Post Installation Steps". Basically this means adding your user (who is not the root user) to the "docker" group (or more accurately: whatever group the /var/run/docker.sock socket is assigned to). Alternatively, you have to install Docker in "rootless-mode", which is a bit more work.

docker compose is not docker-compose. Functionality was somewhat merged recently, but they are not the exact same thing (as far a I know). You get the Docker-Compose binaries from the Docker-Compose Releases page.

DoomOfMax97 commented 2 years ago

I also installed the rootless-mode-package, if they are different that would explain it, I am currently setting up a new debian vm anyways, so I'll use the binary you mentioned directly and see how it goes.

Renegade-Master commented 2 years ago

I hope it works. Make sure to clone the repo down into a new folder to really start from scratch.

Aside from that, I really can't tell what is causing your issue.

DoomOfMax97 commented 2 years ago

It seems like it is an issue with the steam-cmd-image, since I tried it on a fresh install and I still get the same issue (Segmention fault). Is it possible that it is an issue with the steam-cmd-image itself? Are you able to run the container from scratch? The permission issues seem to be fixed now, creating the docker user, or more precisely adding and joining the group was actually necessary, I thought I could just run the rootless script, thx for the tip. log.txt

Renegade-Master commented 2 years ago

Are you able to run the container from scratch?

Every commit actually runs through a pipeline here. A VM is created from scratch. Docker/-Compose is installed, and my repository is cloned down. Then the server is started with a custom configuration, and the configuration is validated at the end.

The only things I can see about SegFaults from the SteamCMD script seem to have been caused by running on ARM architecture, or trying to use SteamCMD without having installed the prerequisites first.

The LinuxGSM (which is a pretty popular server manager) has this advice, but I don't think that applies to this situation too well.

DoomOfMax97 commented 2 years ago

I created yet another vm (Ubuntu Server 12.04) from scratch, this is the complete ssh log (minus installing the server) Is there a full version of the minimal-steam-cmd docker? Maybe it is an issue with bhyve and for some reason it requires slightly different binarys. Bhyve is running on a FreeBSD server, but that shouldn't really be an issue. log.txt

Renegade-Master commented 2 years ago

I notice that you printed your user and group IDs, but you didn't appear to change them in the docker-compose.yaml file.

dz@dangerzonelinux:~/zomboid-dedicated-server$ printf "UID: %s\nGID: %s\n" $(id -u) $(id -g)
UID: 1000
GID: 999

You need to change the values at the following keys to your UID and GID:

services:
  zomboid-server:
    build:
      ...
      args:
        USER_ID: 1000
-        GROUP_ID: 1000
+        GROUP_ID: 999
    ...
-    user: "1000:1000"
+    user: "1000:999"

I also notice that for some reason, the src, ZomboidConfig, ZomboidDedicatedServer directories don't seem to be present:

dz@dangerzonelinux:~/zomboid-dedicated-server$ mkdir ZomboidConfig ZomboidDedicatedServer
dz@dangerzonelinux:~/zomboid-dedicated-server$ ls
docker  docker-compose.yaml  LICENSE  README.md

I don't know if any of these are your problem, but they look wrong to me.

Is there a full version of the minimal-steam-cmd docker?

Also, no. That is an image I made. It is here. It is just an simple installation of SteamCMD with some unnedded bits ripped out. I'd be surprised if you actually needed one of the bits. The reason for that is that Steam requires libsdl2-2.0-0:i386, but only some bits of it. That package is massive, so I only use the bits that Steam actually requires.

DoomOfMax97 commented 2 years ago

Ah I see, I changed the docker-compose.yaml with nano, wasn't on the console anymore I guess. Just tried deleting the ZomboidConfig and ZomboidDedicatedServer folders, and recreating them, same result. log.txt

I don't know how hard it would be, but would it be possible to quickly create a non-minimal-steamcmd-image, which copies all the library files, or can you tell me how I do it? (Since it is currently being pulled from the docker hub, can I replace it with a local file?)

Renegade-Master commented 2 years ago

If you want to bypass my starting image, you would probably need to do the following:

  1. Clone down the zomboid-dedicated-server and steamcmd-minimal repos.
  2. Download the following two Dockerfiles, and replace the ones in the repos with these modified versions. zomboid-dedicated-server.dockerfile steamcmd-minimal.dockerfile
  3. Build the steamcmd-minimal image with the following command:
    docker build -f docker/steamcmd-minimal.Dockerfile -t renegademaster/steamcmd-minimal:1.0.0-dirty --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) .

You shouldn't have to change anything in the docker-compose.yaml file because it just builds whatever is in the repo, and you should have changed the docker/steamcmd-minimal.Dockerfile.

I didn't actually test those changes, but if you can't get it to work, I will go back and make something so it does.

Renegade-Master commented 2 years ago

In theory, you could use anyone's SteamCMD image as long as you remember to put this line near the top of the zomboid-dedicated-server.dockerfile

ENV STEAM_PATH=<path/to/steamcmd.sh>

That way the zomboid-dedicated-server container can find the SteamCMD executable.

DoomOfMax97 commented 2 years ago

Hi, sorry for the late reply, was quite busy myself, when I try to build the SteamCMD image, after replacing the file, I get the following error: error.log UPDATE: I replaced "impish" with "jammy" now the SteamCMD Image almost builds. error.log UPDATE2: I added "--no-check-certificate" after WGET, now it fails with this: error.log

Renegade-Master commented 2 years ago

Oh hey, I didn't expect you to come back. I was just trying to fix the ticket 😅

Have you tried with the new SteamCMD image (1.1.1)? https://github.com/Renegade-Master/steamcmd-minimal/pkgs/container/steamcmd-minimal

Edit: Also if you try building the new Zomboid Image (2.0.0) from this PR, the only thing currently not working is rcon.

DoomOfMax97 commented 2 years ago

Hi :)

Neato, I'll give it a shot in ~16h, for some reason I couldn't even get steamcmd to run on my vm (no docker), tbh my plan B is to just give up and use a windows VM bc installing SteamCMD (no docker) works there for some reason.

Renegade-Master commented 2 years ago

Very strange indeed. I actually switched over to Buildah for building and Podman for running recently. Although I noticed yesterday that because of that, my images seem to be missing a lot of metadata information that building using Docker apparently provides. Still use Docker in the GitHub Action tests to ensure compatibility though. I do all of my development in either a Fedora or Ubuntu VM.

SteamCMD does have some weird dependency issues. You have to manually enable 32-bit libraries for example because SteamCMD was never updated to use 64-bit architectures.

Renegade-Master commented 2 years ago

Please comment or reopen if your issue still exists in the most recent version: 2.0.0