jrcichra / lancache-autofill-docker

1 stars 1 forks source link

Exit code 0 on any run. #1

Open gryan315 opened 4 years ago

gryan315 commented 4 years ago

Let me apologize for being a complete docker noob, but I got your lancache docker files up and running on my RPI4 and would like to preload some games into the cache. I ran the qus container with an x86_64 target, then ran this autofill container, but it immediately exits on 0. I noticed that the command for this one is "bash" while the command for the other lancache containers is "/bin/bash" so I wondered if that was the issue. How is this lancache-autofill container meant to be ran, am I missing some flags or options? Is there a better solution than this container for loading files onto the cache and keeping them up to date?

Thanks.

gryan315 commented 4 years ago

Once again, sorry for the beginner questions, but I ran the image with the -it flags to get it working, but does a new container need to be created every time I need to use this app? The start command doesn't allow passing the t flag, right?

Also, since I'm running this on the pi, should I be passing a directory on my NAS folder into the container for the /tmp/lancache-autofill to prevent problems with my SD card?

jrcichra commented 4 years ago

No problem! If you create a container like this:

docker run -it -d --name=lancache-autofill jrcichra/lancache-autofill

That will keep it running in the background. If you want to bash into it, you can run this:

docker exec -it lancache-autofill bash

So you can keep one container around with your games. Just don't docker rm lancache-autofill unless you're okay clearing it out.

Sure, whatever volume you want to pass into the container can be done with docker run -v "srcpath:dstpath" at runtime. This can be a path on the host and a desired path into the container with whatever paths make sense.

gryan315 commented 4 years ago

Yeah, I managed to get that far, but it doesn't seem to have full functionality. First when attempting to authorize my steam account, no locale was present, so I installed the locale package into the container, then the error just changed to a segmentation fault, during the debug step of the steamcmd.sh script.

jrcichra commented 4 years ago

Go ahead and docker pull jrcichra/lancache-autofill again. I've updated the image, doing a build today.

I've ignored the locale warning, you'll also see some 64bit assertions fail. These are fine. We're running an x86 closed source program on a pi. Our options are limited.

In the container if you go to /home/steam/lancache-autofill you should be able to use that interface (or steamCMD) itself to get things prepared on your pi, as if it was a x86 steam environment.

gryan315 commented 4 years ago

Thanks for the help, still no good, however: Redirecting stderr to '/root/Steam/logs/stderr.txt' [ 0%] Checking for available updates... /root/steam/steamcmd.sh: line 38: 88 Segmentation fault (core dumped) $DEBUGGER "$STEAMEXE" "$@" Failed to authorise Steam account

the stderr.txt reads: qemu: uncaught target signal 11 (Segmentation fault) - core dumped

I reran the qus image without the target architecture thinking maybe I needed more than the x86_64 emulation since steam is using 32bit libraries, but that didn't help either. I've noticed that without the locale, the number preceding the seg fault is 2 or 3 digits, and with the locale, it's (so far) always 4 digits. No idea if that's relevant at all.

jrcichra commented 4 years ago

I ran dbhi/qus with this line: docker run --rm --privileged aptman/qus -s -- -p

uname -a outside containers: Linux raspberrypi 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l GNU/Linux

This is running on a 4GB model of a Raspberry Pi 4.

docker version
Client:
 Version:           18.09.1
 API version:       1.39
 Go version:        go1.11.6
 Git commit:        4c52b90
 Built:             Fri, 13 Sep 2019 10:45:43 +0100
 OS/Arch:           linux/arm
 Experimental:      false

Server:
 Engine:
  Version:          18.09.1
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.11.6
  Git commit:       4c52b90
  Built:            Fri Sep 13 09:45:43 2019
  OS/Arch:          linux/arm
  Experimental:     false
docker images
REPOSITORY                   TAG                 IMAGE ID            CREATED             SIZE
jrcichra/lancache-autofill   latest              **e1430e17e47b**        10 hours ago        592MB
aptman/qus                   latest              **55ccb2c9cf62**        3 days ago          200MB
docker exec -it lancache-autofill  bash
root@dd78c4f150d7:/home/steam/steamcmd# ls
linux32  linux64  package  public  siteserverui  steamcmd.sh
root@dd78c4f150d7:/home/steam/steamcmd# ./steamcmd.sh 
WARNING: setlocale('en_US.UTF-8') failed, using locale: 'C'. International characters may not work.
Redirecting stderr to '/root/Steam/logs/stderr.txt'
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API.../data/src/clientdll/applicationmanager.cpp (4137) : Assertion Failed: CApplicationManager::GetMountVolume: invalid index
/data/src/clientdll/applicationmanager.cpp (4137) : Assertion Failed: CApplicationManager::GetMountVolume: invalid index
/data/src/clientdll/applicationmanager.cpp (4300) : Assertion Failed: m_vecInstallBaseFolders.Count() > 0
Warning: failed to init SDL thread priority manager: SDL not found
OK.

Steam>login jrcichra
Logging in user 'jrcichra' to Steam Public ...

password: 
Enter the current code from your Steam Guard Mobile Authenticator app
Two-factor code:v6r74
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
Logged in OK
Waiting for user info.../data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/clientdll/ClientJobRemoteStorageSync.cpp (2180) : Assertion Failed: Failed to write file after download (2)

/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
OK
Steam>/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
/data/src/common/friendsuihelpers.cpp (54) : Assertion Failed: Is64BitOS()
Steam>

I was able to login and use 2 factor authentication to get into my steam account.

gryan315 commented 4 years ago

Sorry I didn't think of posting my setup, I'm also using a 4gb pi4 but with ubuntu server 64 bit rather than raspbian.

 -> % uname -a
Linux ubuntu 5.4.0-1011-raspi #11-Ubuntu SMP Fri May 8 07:43:33 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux

-> % docker version                   
Client: Docker Engine - Community
 Version:           19.03.11
 API version:       1.40
 Go version:        go1.13.10
 Git commit:        42e35e6
 Built:             Mon Jun  1 09:13:07 2020
 OS/Arch:           linux/arm64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.11
  API version:      1.40 (minimum version 1.12)
 Go version:       go1.13.10
  Git commit:       42e35e6
  Built:            Mon Jun  1 09:11:40 2020
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

And my directory structure is different as well, I thought docker containers were all supposed to be the same so they could run anywhere. I was using the ./lancache-autofill steam: execution method from the usage guide on the zeropingheroes git page, but running the steamcmd.sh like you showed still gets the segmentation fault:

root@6031d037325e:/home/steam/steamcmd# ls
linux32  package  qemu_steamcmd_20200608-235510_108.core  steamcmd.sh

root@6031d037325e:/home/steam/steamcmd# ./steamcmd.sh
Redirecting stderr to '/root/Steam/logs/stderr.txt'
ILocalize::AddFile() failed to load file "public/steambootstrapper_english.txt".
[  0%] Checking for available update...
./steamcmd.sh: line 38:   131 Segmentation fault      (core dumped) $DEBUGGER "$STEAMEXE" "$@"
jrcichra commented 4 years ago

Ok - I have an install laying around with Ubuntu 20.04 on a Pi4. I've only tried it on 32bit Raspbian. That may be the issue.

I see the file difference. You might need to docker stop <container-name> and docker rm <container-name>, then do docker run like before. docker pull alone won't update your container, you'd have to recreate it.

docker ps -a would say which container sha you're currently running. You can compare that to the sha in docker images

jrcichra commented 4 years ago

The better docker practice (for me as a maintainer) is to tag docker containers with different versions (not having latest be the only option). If I did daily builds, we would be in sync by doing docker pull jrcichra/lancache-autofill:2020_06_08_01. Something I'll implement going forward.

jrcichra commented 4 years ago

Yep. I can confirm I got a segfault running this on a 64 bit raspberry pi os:

ubuntu@justinpi:~$ docker exec -it lancache-autofill bash
root@70561ceecd68:/home/steam/steamcmd# ls
linux32  steamcmd.sh
root@70561ceecd68:/home/steam/steamcmd# ./steamcmd.sh 
Redirecting stderr to '/root/Steam/logs/stderr.txt'
ILocalize::AddFile() failed to load file "public/steambootstrapper_english.txt".
[  0%] Checking for available update...
./steamcmd.sh: line 38:    28 Segmentation fault      (core dumped) $DEBUGGER "$STEAMEXE" "$@"
root@70561ceecd68:/home/steam/steamcmd# exit
ubuntu@justinpi:~$ uname -a
Linux justinpi 5.4.0-1011-raspi #11-Ubuntu SMP Fri May 8 07:43:33 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
ubuntu@justinpi:~$ 
gryan315 commented 4 years ago

Thanks for all the help. Your lancache containers have been working great so far for the past couple days. I have my RPI4 running the server with a mounted NFS directory on my netgear readynas. The only one that's been giving me trouble is the autofill one. It seems to be hanging on the steamcmd install/initialize for some reason:

Initialising SteamCMD
steamcmd.sh
linux32/steamcmd
linux32/steamerrorreporter
linux32/libstdc++.so.6
linux32/crashhandler.so
Redirecting stderr to '/root/Steam/logs/stderr.txt'
Looks like steam didn't shutdown cleanly, scheduling immediate update check
ILocalize::AddFile() failed to load file "public/steambootstrapper_english.txt".
[  0%] Checking for available update...
/root/steam/steamcmd.sh: line 38:   358 Segmentation fault      (core dumped) $DEBUGGER "$STEAMEXE" "$@"
Error initialising SteamCMD

How does steamcmd initially get included?

jrcichra commented 4 years ago

https://hub.docker.com/r/cm2network/steamcmd is my base image, where valve/someone put steamcmd in a docker container (see here: https://developer.valvesoftware.com/wiki/SteamCMD#Docker)

I get steamcmd in a container for free by using this as my starting point. How they do it is here: https://hub.docker.com/r/cm2network/steamcmd/dockerfile

jrcichra commented 4 years ago

My Dockerfile that expands on this: https://github.com/jrcichra/lancache-autofill-docker/blob/master/Dockerfile installs lancache-autofill's php dependencies, grabs the latest copy at docker build time, and installs it.