lancachenet / generic

Generic LAN Download Content Cache
https://hub.docker.com/r/lancachenet/generic/
MIT License
424 stars 57 forks source link

Setup on fresh Debian 9 doesnt work #37

Closed Cronus89 closed 6 years ago

Cronus89 commented 6 years ago

I previously had mine working great on a raspberrypi using a NAS as storage, pushing full 100Mbit

I moved to a VM setup now, and i cant get the generic cache nor the sniproxy to act right.

My Blizzard docker steamcache/generic gets me the below in error.log

2018/07/18 03:56:59 [error] 19#19: *172 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 172.17.0.1, server: , request: "GET /tpr/bnt001/config/b5/49/b549cde7f3a27e4aed8b09f3661dfa41 HTTP/1.0", upstream: "http://10.0.0.83:80/tpr/bnt001/config/b5/49/b549cde7f3a27e4aed8b09f3661dfa41", host: "level3.blizzard.com"

JasonRivers commented 6 years ago

the upstream address of 10.0.0.83 does not look correct. Please could you post how you're starting your containers, and what DNS the cache is looking at, you should see the real IP of level3.blizzard.com and not 10.0.0.83 in here.

mintopia commented 6 years ago

Please re-open this issue if you're able to provide more information.

Cronus89 commented 6 years ago

I just tried wiping and starting a brand new Debian VM, and i still get the below error

2018/10/13 03:14:37 [error] 27#27: *1 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 10.0.0.102, server: , request: "GET /tpr/bnt001/config/c4/3f/c43fee44e433e2102e8ddd75bd33b29b?offset%3d0%26size%3d18446744073709551615 HTTP/1.1", upstream: "http://10.0.0.83:80/tpr/bnt001/config/c4/3f/c43fee44e433e2102e8ddd75bd33b29b?offset%3d0%26size%3d18446744073709551615", host: "blzddist1-a.akamaihd.net"

I am starting with the below cmds, My VM has 3 addresses assigned to it, .81 for the VM, and .82 and .83 for steam and blizzard caches respectively. Also I run sniproxy on all IP's on this docker VM

docker run --restart always --name sniproxy -p 443:443 steamcache/sniproxy:latest docker run --restart always --name cache-steam -v /mnt/remotenfs/steam/data:/data/cache -v /mnt/remotenfs/steam/logs:/data/logs -p 10.0.0.82:80:80 steamcache/generic:latest docker run --restart always --name cache-blizzard -v /mnt/remotenfs/blizzard/data:/data/cache -v /mnt/remotenfs/blizzard/logs:/data/logs -p 10.0.0.83:80:80 steamcache/generic:latest

I am using pihole for my DNS, therefore I have setup dnsmasq rules for the domains to proxy/cache

deploy@pihole:~$ cat /etc/dnsmasq.d/05-custom.conf address=/content.steampowered.com/10.0.0.82 address=/content1.steampowered.com/10.0.0.82 address=/content2.steampowered.com/10.0.0.82 address=/content3.steampowered.com/10.0.0.82 address=/content4.steampowered.com/10.0.0.82 address=/content5.steampowered.com/10.0.0.82 address=/content6.steampowered.com/10.0.0.82 address=/content7.steampowered.com/10.0.0.82 address=/content8.steampowered.com/10.0.0.82 address=/cs.steampowered.com/10.0.0.82 address=/steamcontent.com/10.0.0.82 address=/client-download.steampowered.com/10.0.0.82 address=/hsar.steampowered.com.edgesuite.net/10.0.0.82 address=/akamai.steamstatic.com/10.0.0.82 address=/content-origin.steampowered.com/10.0.0.82 address=/clientconfig.akamai.steamtransparent.com/10.0.0.82 address=/steampipe.akamaized.net/10.0.0.82 address=/edgecast.steamstatic.com/10.0.0.82 address=/steam.apac.qtlglb.com.mwcloudcdn.com/10.0.0.82 address=/cs.steampowered.com/10.0.0.82 address=/edgecast.steamstatic.com/10.0.0.82 address=/steamcontent.com/10.0.0.82 address=/cdn1-sea1.valve.net/10.0.0.82 address=/cdn2-sea1.valve.net/10.0.0.82 address=/steam-content-dnld-1.apac-1-cdn.cqloud.com/10.0.0.82 address=/steam.apac.qtlglb.com/10.0.0.82

address=/dist.blizzard.com/10.0.0.83 address=/dist.blizzard.com.edgesuite.net/10.0.0.83 address=/llnw.blizzard.com/10.0.0.83 address=/edgecast.blizzard.com/10.0.0.83 address=/blizzard.vo.llnwd.net/10.0.0.83 address=/blzddist1-a.akamaihd.net/10.0.0.83 address=/blzddist2-a.akamaihd.net/10.0.0.83 address=/blzddist3-a.akamaihd.net/10.0.0.83 address=/blzddist4-a.akamaihd.net/10.0.0.83 address=/level3.blizzard.com/10.0.0.83 address=/nydus.battle.net/10.0.0.83 address=/edge.blizzard.top.comcast.net/10.0.0.83

Cronus89 commented 6 years ago

Figured it out, my docker host wasnt using a seperate dns to get the actual ip addresses of the blizzard hosts etc