lancachenet / monolithic

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

lancache not working. Logs: Permission Error #127

Closed LeoBuron closed 3 years ago

LeoBuron commented 3 years ago

Describe the issue you are having

Lancache isnt working.

=> Configure your router to serve lancache-dns

How are you running the container(s)

git clone https://github.com/lancachenet/docker-compose lancache
cd lancache
nano .env
sudo docker-compose up -d

I edited the .env file. My Cache and logs folder are mounted via cifs to my nas. After starting the container i saw log files so i assume i have the permission to write data there.

DNS Configuration

My DNS configuration is working fine. I have a pihole installed. Right now my computers DNS is the Lancache DNS this one pointing to Lancache. And the defined upstreamDNS is my pihole.

Output of container(s)

I checked the log files and discovered following:

2021/01/25 17:18:27 [crit] 1604#1604: *1 open() "/data/cache/cache/3f/66/f10f4656975ff7b2aa8d92fb384b663f" failed (13: Permission denied), client: 10.0.0.100, server: , request: "GET /depot/945361/chunk/957413b32f40221f581e0fc5a1582ad429c5dea4 HTTP/1.1", host: "cache7-fra2.steamcontent.com"

So right now im not sure what the problem is. My Lancache container can access the mounted NAS to write logs but cant write cached data.

So i tried following to discover more: Changed my mounted nas so that the group id 33(www-data) has write permissions.

drwxrwx--- 2 root www-data 0 Jan 25 16:52 NAS

Now the output error in logs changed:

2021/01/25 17:59:17 [crit] 1602#1602: *2 chmod() "/data/cache/cache/f6/7e/abb16b7f139380d23c04bb3053b57ef6.0000000001" failed (1: Operation not permitted) while reading upstream, client: 10.0.0.100, server: , request: "GET /depot/945361/chunk/e9e44d18da55ada770206438f931a55c6acc50c4 HTTP/1.1", upstream: "http://155.133.226.35:80/depot/945361/chunk/e9e44d18da55ada770206438f931a55c6acc50c4", host: "cache7-fra2.steamcontent.com"

Tbh i'm not sure if i got one step ahead or back...

Help much appreciated.

Best regards telefonjoker100

csamsel commented 3 years ago

Better use iSCSI instead of cifs or NFS, gives fewer complications and better performance.

The problem in this case that you don't have permission to change the file owner on the NAS. You might get around it with some mount options like noperm or settings on NAS itself.

LeoBuron commented 3 years ago

Better use iSCSI instead of cifs or NFS, gives fewer complications and better performance.

The problem in this case that you don't have permission to change the file owner on the NAS. You might get around it with some mount options like noperm or settings on NAS itself.

Thx. option noperm finally did it