lancachenet / monolithic

A monolithic lancache service capable of caching all CDNs in a single instance
https://hub.docker.com/r/lancachenet/monolithic
Other
737 stars 73 forks source link

Steam downloads normally, but items in cache disappear immediately. #32

Closed EgonSpengler closed 5 years ago

EgonSpengler commented 5 years ago

Describe the issue you are having

First test of full stack container setup. Steam downloads games normally on the client, and files up to a few hundred KB appear briefly in cache, before disappearing and leaving an empty directory tree.

How are you running the container(s)?

docker run --name steamcache --restart=unless-stopped -d -v /mnt/four/steamcache:/data/cache -v /mnt/four/cachelog:/data/logs -p 80:80 steamcache/monolithic:latest
docker run --name steamcache-dns --restart=unless-stopped -d -p 53:53/udp -e UPSTREAM_DNS=1.1.1.1 -e LANCACHE_IP=192.168.1.133 -e USE_GENERIC_CACHE=true steamcache/steamcache-dns:latest

DNS Configuration

sudo docker run --restart=unless-stopped --name=sniproxy -d -p 443:443 steamcache/sniproxy:lates

Output of container(s)

Queries appear to all be handled normally (except steam has frequent/random problems logging in, eventually it works and fetches updates normally). However, steamcache is giving many chmod() permission errors in its log:

...
2019/05/13 06:08:38 [crit] 1263#1263: *200 chmod() "/data/cache/cache/8c/d3/f3a457e8084161061a5314c4af96d38c.0000000324" failed (1: Operation not permitted) while reading upstream, client: 192.168.1.125, server: , request: "GET /depot/426004/chunk/07bdc03d6bf9e2f57888b1274442ceacbb8d1f45?l=14&e=1558331878&sid=83492896&h=e8042f9033df88b5a63b07f2e2339e5676e16098 HTTP/1.1", upstream: "http://162.254.192.13:80/depot/426004/chunk/07bdc03d6bf9e2f57888b1274442ceacbb8d1f45?l=14&e=1558331878&sid=83492896&h=e8042f9033df88b5a63b07f2e2339e5676e16098", host: "cache21-iad1.steamcontent.com
...

Everything in the host's mapped cache directory (/mnt/four/steamcache) is owned by the primary user (UID=1000) with group root. Steamcache has created a huge empty directory tree under this, and if I spam a find to list all files in it, occasionally one will appear and immediately disappear again, leaving an empty tree again. For instance:

-rwxrwxrwx 1 paul root 20K May 13 02:14 /mnt/four/steamcache/cache/f9/24/154a71d3b7824dd0873875b667e524f9.0000000525*

Please let me know if additional container output is needed to diagnose this. Thanks!

EgonSpengler commented 5 years ago

Sorry, additional note I only just thought of: it's probably worth mentioning that this is an ntfs drive mounted with the following options:

UUID=4A1FD6C759C9F943             /mnt/four ntfs    rw,uid=1000 0 2

Possibly I should give up on having this as a shared drive and just stick with ext4?

VibroAxe commented 5 years ago

Yeah docker is struggling to set permissions, I'd recommend ext4. Certainly don't think NTFS' permissions model is supported by docker/nginx