lancachenet / monolithic

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

Lancache only "MISS" #131

Closed AstroPhysX closed 3 years ago

AstroPhysX commented 3 years ago

Describe the issue you are having

To put it as simply as possible, the lancache server is not caching anything although the traffic seems to be going through it.

How are you running the container(s)

I am running the lancache-monolithic container on a synology nas on a macvlan docker network. Currently I am running lancache-monolithic and lancache-dns. I have also tried running the sniproxy container but I don't really understand very well and from what I read on the website its not really needed if you are running monolithic.

I set up the containers through portainer. Please find the attached pictures of portainer. Monolithic container monolithic Monolithic container ports ports monolithic DNS container dns DNS container ports ports dns And this is how I set up the Macvlan network.

#ssh into nas

# Create a Synology macvlan bridge network attached to the physical ovs_bond0
ip link add macvlan link ovs_bond0 type macvlan mode bridge

# Specify part of the ovs_bond0 scope of macvlan
ip addr add 192.168.1.9/29 dev macvlan

# Bring up the macvlan adapter
ip link set macvlan up

# Create a macvlan Docker network using ovs_bond0
docker network create --driver=macvlan --gateway=192.168.1.254 --subnet=192.168.1.0/24 --ip-range=192.168.1.9/29 -o parent=ovs_bond0 macvlan

DNS Configuration

Each Client computer has its preferred dns set to point to the ip address of the lancache-dns container. Unfortunately I cannot change preferred dns server on the router since it is an AT&T router. I have the ipv6 DHCP service disabled on the AT&T router so the only the dns response comes from ipv4. Hereyou can see that the dns is pointing to the conatiners with the nslookup results which point directly to the container's ip address.

C:\Users\Alvin Leluc>ipconfig /flushdns

Windows IP Configuration

Successfully flushed the DNS Resolver Cache.

C:\Users\Alvin Leluc>nslookup steam.cache.lancache.net
Server:  UnKnown
Address:  192.168.1.12

Name:    steam.cache.lancache.net
Address:  192.168.1.11

C:\Users\Alvin Leluc>nslookup lancache.steamcontent.com
Server:  UnKnown
Address:  192.168.1.12

Non-authoritative answer:
Name:    steam.cache.lancache.net
Address:  192.168.1.11
Aliases:  lancache.steamcontent.com

Output of container(s)

Only outputs misses over and over again in the access.log, when I am respectively downloading the same game same small game from steam. I have also tried downloading 1 game on the epic games launcher couple times to see if it wasn't a steam exclusive thing but same result... The Access logs were kind of long since I tried many solutions that I found online but to no avail.

I am well aware that I could potentially run this on a VM but I am not sure how the networking side of things would work on it as well as it would take a lot of unnecessary resources on my nas. Another way I saw people set up lancache on the nas was by running it through some sort of reverse proxy to avoid ports 80,443 and 53 which synology uses but I don't really understand how that works.

Also here is the guide that I sort of followed but had issues with his network set up process: https://linustechtips.com/topic/1206963-synology-nas-lancachepihole/

portainer's view of monolithic logs lancache-monolithic launch logs.txt portainer's view of dns logs lancache-dns launch logs.txt /data/logs/access.log access.log /data/logs/error.log error.log /data/logs/stream-access.log stream-access.log /data/logs/stream-error.log is empty

AstroPhysX commented 3 years ago

I tried redeploying both the monolithic container and the dns once more and the set the UPSTREAM_DNS environment variable to match one another. In the mean time I also tried to install the zeropingheroes/lancache-autofill inside the monolithic container. I then decided to test if the containers worked and for some reason the lancache is getting "miss" when I've never downloaded the game and a "hit" when I redownload that game. So it finally works but I am unsure what actually fixed it...bc i redeployed its with alot of differences in the environment variables.