[Support] Josh.5 Docker Templates


Recommended Posts

On 2/28/2020 at 3:12 PM, Josh.5 said:

Open a terminal on unraid.

Run :
 


tail -fn1 /mnt/user/appdata/lancache-bundle/log/*/*.log
 

 

i tried running your command connected to host i get this spamming 

 

2020/04/03 00:25:11 [emerg] 2234#2234: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/04/03 00:25:11 [emerg] 2234#2234: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/04/03 00:25:11 [emerg] 2234#2234: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/04/03 00:25:11 [emerg] 2234#2234: still could not bind()
2020/04/03 00:25:14 [emerg] 2236#2236: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/04/03 00:25:14 [emerg] 2236#2236: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/04/03 00:25:14 [emerg] 2236#2236: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/04/03 00:25:14 [emerg] 2236#2236: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/04/03 00:25:14 [emerg] 2236#2236: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/04/03 00:25:14 [emerg] 2236#2236: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/04/03 00:25:14 [emerg] 2236#2236: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/04/03 00:25:14 [emerg] 2236#2236: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/04/03 00:25:14 [emerg] 2236#2236: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/04/03 00:25:14 [emerg] 2236#2236: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/04/03 00:25:14 [emerg] 2236#2236: bind() to 0.0.0.0:80 failed (98: Address already in use)
2020/04/03 00:25:14 [emerg] 2236#2236: bind() to 0.0.0.0:80 failed (98: Address already in use)

 

but anything else just doesn't work unless i use a different IP then my server which it says not to do 

Link to comment

I would remove 8.8.8.8 as Windows likes to use whatever DNS it wants and using 8.8.8.8 may cause the computer to get the REAL ip address.  If windows DNS caches the correct IP, it'll bypass lancache-bundle till the DNS entry expires and it has to ask again.  In which case, it may get your cache server or 8.8.8.8 again.

 

1) Only traffic to the places listed when configuring the docker will be cached.  If you don't want to cache something on the list, set it to FALSE

2) I don't think so

3) Depends on how fast you really want it to be.  If you have the extra cash and want it to be faster, get a dedicated SSD.  Even with standard mechanical drives, I've gotten 50MB/s (bytes, not bits) from my cache server

4) For sure.  Change your DHCP to hand out the cache server IP.  Manually doing it is good for testing, but not if you have a bunch of computers you want to cache and not at all if you have people bringing their computers over for a lan party

5) Sounds like you have it.  Normally I would tell you to look at the cache logs and see the "HIT" messages, but this dockers logs are all jacked up.

  • Like 1
Link to comment
3 hours ago, jzawacki said:

All of your dockers need to have a different IP address than the server.

 

image.png.85744532d1ebb4915f8566e740e0635c.png

my plex is on the same ip as the server anything i set to host uses the same 192.168.1.75 ip.

 

but i change lan cache to a ip that nothing else is using 192.168.1.203 and changed my windows dns to 192.168.1.203 and tried downloading a different game and nothing worked but heres the error i get now 

 

and the last is when i tried downloading with origin which i never really use so it shouldn't be cached in anyway 

 

unraid2.PNG

unraid3.PNG

unraid4.PNG

Link to comment
4 hours ago, jzawacki said:

All of your dockers need to have a different IP address than the server.

 

image.png.85744532d1ebb4915f8566e740e0635c.png

ok i think i fix it i ran 

ipconfig /flushdns

in on my windows pc 

 

edit: well it started making files in the cache but doesn't seem to use them to speed up my download i had this working a week or two ago and the speeds where insanely fast. my internet is only 2mb/s

 

unless this is a problem

 

==> /mnt/user/appdata/lancache-bundle/log/named/resolver.log <==
03-Apr-2020 14:07:00.983 DNS format error from 205.251.192.245#53 resolving pocket.realms.minecraft.net/AAAA for client 192.168.1.205#63097: Name minecraft.net (SOA) not subdomain of zone realms.minecraft.net -- invalid response

==> /mnt/user/appdata/lancache-bundle/log/named/security.log <==

==> /mnt/user/appdata/lancache-bundle/log/named/unmatched.log <==

==> /mnt/user/appdata/lancache-bundle/log/named/update.log <==

==> /mnt/user/appdata/lancache-bundle/log/named/xfer-in.log <==

==> /mnt/user/appdata/lancache-bundle/log/named/xfer-out.log <==

==> /mnt/user/appdata/lancache-bundle/log/nginx/access.log <==
192.168.1.141 - - [03/Apr/2020:13:53:35 -0500] "GET /depot/105601/chunk/06becadb92a5fcca2529c0b93687c2a0c6d0d610 HTTP/1.1" 200 794544 "-" "Valve/Steam HTTP Client 1.0"

==> /mnt/user/appdata/lancache-bundle/log/nginx/error.log <==
2020/04/03 13:19:04 [emerg] 2218#2218: bind() to 0.0.0.0:80 failed (98: Address already in use)

==> /mnt/user/appdata/lancache-bundle/log/named/queries.log <==
03-Apr-2020 14:14:44.894 client @0x154b982ea860 192.168.1.205#51075 (v20.events.data.microsoft.com): query: v20.events.data.microsoft.com IN AAAA + (192.168.1.202)
03-Apr-2020 14:14:44.895 client @0x154b98293b00 192.168.1.205#50262 (v20.events.data.microsoft.com): query: v20.events.data.microsoft.com IN A + (192.168.1.202)

Edited by James_Darkness
Link to comment

Try this command from your Unraid terminal.  What you are looking at are the 200 and 206 numbers.  Unfortunatly, I can't tell you which is a HIT and which is a MISS, but if you download something and it shows one of those numbers and the second time you download, it's the other number, it is definitely pulling form the cache server.

 

docker exec -it lancache-bundle tail -f /var/log/nginx/access.log

 

As for bridge vs br0 vs host, I run all my dockers as br0 so they get their own IP address.  This makes it so they can all have a web UI on port 80 instead of goofy port numbers all over the place because they are all trying to run on the host IP address.

 

image.png.488bbb305d7a531ac501eb315a52304d.png

 

Lastly, on the machines you are troubleshooting with, and have their ONLY DNS set to your lancache-bundle IP address, disable IPv6 so we don't have to deal with that crap in the logs.

 

 

Link to comment
4 hours ago, jzawacki said:

Try this command from your Unraid terminal.  What you are looking at are the 200 and 206 numbers.  Unfortunatly, I can't tell you which is a HIT and which is a MISS, but if you download something and it shows one of those numbers and the second time you download, it's the other number, it is definitely pulling form the cache server.

 

docker exec -it lancache-bundle tail -f /var/log/nginx/access.log

 

As for bridge vs br0 vs host, I run all my dockers as br0 so they get their own IP address.  This makes it so they can all have a web UI on port 80 instead of goofy port numbers all over the place because they are all trying to run on the host IP address.

 

Lastly, on the machines you are troubleshooting with, and have their ONLY DNS set to your lancache-bundle IP address, disable IPv6 so we don't have to deal with that crap in the logs.

 

 

i tried it on a different computer and it works 

when i get pfsense up im sure it will work even better so i dont have to do it in windows 

unraid6.PNG

Link to comment
2 hours ago, James_Darkness said:

i tried it on a different computer and it works 

when i get pfsense up im sure it will work even better so i dont have to do it in windows 

 

You may need to open a cmd prompt as administrator and run:

 

ipconfig /flushdns

 

Once you get pfsense up, you'll be able to watch the bandwidth usage on the status page to you can see if you are using the internet or the cache server as well.

  • Like 1
Link to comment
On 4/6/2020 at 4:59 PM, enigma27 said:

Hi All.

 

Does this work with games downloaded through the Xbox beta app in windows?

 

just tried downloading a game on the main PC and then tried to install on a second PC and it seems to be grabbing from the internet again..

ok this is really strange..

 

just downloaded another game from Xbox beta app.

 

on my PC1 which points to my lan cache server DNS address that the game was initially downloaded to I uninstalled and click install again and its downloading at 98.9 MB/s (Compared to 2.9 MB/s from the internet)

 

But another PC2 which also points to the lancache server for DNS same as my main PC1 is not sending any requests through the lancache DNS at all.. (for windows store games)

 

using ipconfig /all shows DNS server as Lancache server..

 

Now here is the strange thing.... lancache seams to be working fine for steam on PC2 as I just installed a game I know I have chached and it did it in seconds compared to hours.....???

 

PC1

Xbox App - works fine

Steam - works fine

 

PC2

Xbox app - Not requesting from Lan cache

Steam - Works fine

 

any ideas?

Link to comment
On 4/3/2020 at 10:40 AM, jzawacki said:

All of your dockers need to have a different IP address than the server.

 

image.png.85744532d1ebb4915f8566e740e0635c.png

Not correct actually.

As long as the ports & layer protocols are different and non of the containers are using things like net_admin, then all of them can use the same IP.

However in the case of a DNS lookup, technically, you just need the relevant DNS ports, however generally speaking its better to dedicate it to its own IP to help segment ports off, and prevent issues with potential port scans on a DNS IP from uncovering other services.

 

In the example screenshot given, as there are two containers trying to use DNS/53 (a typically dual protocol TCP/UDP service), then yes, separate IP's is recommended.

Edited by boomam
Link to comment
On 3/29/2020 at 1:37 PM, jzawacki said:

Ok, with that kind of response, you get this kind of response:

 

If you want it to cache something, do you think you should set it to false?  Normally, the word false, means you DON'T want it to do something.  Therefore, you DO NOT need to change any of those fields.  By default, it will cache everything.  The only time you would set it to false, is if you DON'T want it to cache something.

The documentation on the container is not exact enough to specify if something needs to be true or false on its variable, hence why i am asking.

It is not uncommon, especially for OSS/similar containers/software's to operate with double negatives. Definition of default is key for understanding.

So instead of assuming, where i have seen the documentation lacking, i have asked the question in the relevant support thread on this forum.

Specifically, if the variable points out 'set to true to disable', does that mean we need to set it to 'false' to explicitly set it to enable?

 

Your response was pointed out as you did not appear to have read what i had originally outlined, or perhaps misunderstood, but the end result is the same - the difference is that i have pointed it out to help move the conversation along, but you took it the wrong way.

 

 

Moving on - A few others at the moment appear to have somewhat similar 'issues', including outside of this forum, as i have had a little time to loop back to this, i'm not entirely certain that everything is caching right now.

 

With several PC's on the internal LAN, all with a variety of the supported services and platforms, yet the cached amount seems to be pretty low (<7Gb).

Compared to the previous steamcache-bundle, which always hovered in the 15-20Gb range for me, this to me points at perhaps either a mis-configuration based on default settings, or an inherent flaw with the container perhaps?

 

If anyone who has familiarity with how the container has been put together can help clarify the documentation/my questions on the true/false variables, then it would help ascertain whether the issue is an inherent fault, or perhaps a DNS routing issue (unlikely with such a simple setup, but stranger things have happened).

Edited by boomam
Link to comment
1 hour ago, boomam said:

Not correct actually.

As long as the ports & layer protocols are different and non of the containers are using things like net_admin, then all of them can use the same IP.

However in the case of a DNS lookup, technically, you just need the relevant DNS ports, however generally speaking its better to dedicate it to its own IP to help segment ports off, and prevent issues with potential port scans on a DNS IP from uncovering other services.

 

In the example screenshot given, as there are two containers trying to use DNS/53 (a typically dual protocol TCP/UDP service), then yes, separate IP's is recommended.

Well, if you want to go to your unRaid docker page every time you want to access the web interface of a docker (or memorize a bunch of random ports), knock yourself out.  But, your browser defaults to port 80 or 443 (https), so every docker sharing your host IP will need a different port for the web interface.

 

Edit:  Ah.. I get it.. you got me.. you are just trolling..

 

Seems pretty darn clear to me:

image.png.d68f37b104515b63a3a4f6d575428a9e.png

Edited by jzawacki
Link to comment
20 hours ago, jzawacki said:

Edit:  Ah.. I get it.. you got me.. you are just trolling..

Not trolling at all.

Just correcting the description of how ports works for others, as the statement at a purely technical level, was not accurate.

You are correct however in that unique IPs gives you the ability to not have custom ports remembered, but its kinda pro/con sort of situation.

Remember IP vs remember port. I would guess most people would just bookmark or go-to the main docker page regardless, so its somewhat moot, its a preference thing.

 

Re: the variables on lancache - 

Not sure i agree, that's only defining what happens when you set 'true'. Not about what the default is, which is the important part.

The devil is in the detail ;-)

 

But i wouldn't worry about that one, at this point it doesn't appear that anyone truly knows, so i'm hoping the original container creator can chime in to clarify verbatim.

Link to comment
  • 2 weeks later...

(it seemed to work on epic and steam i think, but my steam on one pc behaves strangely, i can't see the library - it flashes on once in a while but its a black screen otherwise.  I can access it if i go to "Big Screen" to test and it appears to be downloading games from lancache.) 

 

 

I'm seeing the following errors in my log for lancache  -do i have something setup wrong?

 

 


# Upstream Configuration
proxy_next_upstream error timeout http_404;

 

and 

 

# Allow the use of state entries
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;

 

 

 

# Including /etc/nginx/sites-enabled/10_generic.conf

server {
listen 80 reuseport;

error_log /var/log/nginx/error.log;
error_log /var/log/nginx/error.log;

 

 

Here is my docker command - root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='lancache-bundle' --net='br0' --ip='192.168.1.202' -e TZ="America/Anchorage" -e HOST_OS="Unraid" -e 'LANCACHE_IP'='192.168.1.202' -e 'DNS_BIND_IP'='192.168.1.202' -e 'CACHE_MEM_SIZE'='500m' -e 'CACHE_DISK_SIZE'='2000g' -e 'CACHE_MAX_AGE'='150d' -e 'UDP_PORT_53'='53' -e 'UPSTREAM_DNS'='1.1.1.1' -e 'USE_GENERIC_CACHE'='true' -e 'DISABLE_ARENANET'='' -e 'DISABLE_BLIZZARD'='' -e 'DISABLE_CITYOFHEROES'='' -e 'DISABLE_DAYBREAK'='' -e 'DISABLE_EPICGAMES'='' -e 'DISABLE_FRONTIER'='' -e 'DISABLE_HIREZ'='' -e 'DISABLE_NEVERWINTER'='' -e 'DISABLE_NEXUSMODS'='' -e 'DISABLE_NINTENDO'='' -e 'DISABLE_ORIGIN'='' -e 'DISABLE_RENEGADEX'='' -e 'DISABLE_RIOT'='' -e 'DISABLE_ROCKSTAR'='' -e 'DISABLE_SONY'='' -e 'DISABLE_STEAM'='' -e 'DISABLE_TESO'='' -e 'DISABLE_TWITCH'='' -e 'DISABLE_UPLAY'='' -e 'DISABLE_WARFRAME'='' -e 'DISABLE_WARGAMING'='' -e 'DISABLE_WSUS'='' -e 'DISABLE_XBOXLIVE'='' -v '/mnt/user/lancache':'/data/cache':'rw' -v '/mnt/user/appdata/lancache-bundle/log/named':'/var/log/named':'rw' -v '/mnt/user/appdata/lancache-bundle/log/nginx':'/var/log/nginx':'rw' 'josh5/lancache-bundle:latest' 

6f69014c00fec28dfd07242d220d77639507b38588f279d771ca505129b85108

The command finished successfully!

 

 

Link to comment
8 hours ago, FrozenGamer said:

# Upstream Configuration
proxy_next_upstream error timeout http_404;

 

and 

 

# Allow the use of state entries
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;

 

 

Can't say for sure, but the 404 is a not found error as if the location lancache-bundle is trying to access doesn't have what it's asking for.

 

The 500, 502, 503, and 504 errors are all gateway/server based errors, which would be upstream as well.

Link to comment

Hoping somebody can help me understand what is going on with my LanCache.

 

When downloading a game for the first time through lancache everything goes perfect speeds are high and I see no abnormal limitation using my 1gig ISP it appears to be as fast as when I am not using lan cache. I downloaded every single game I own on every single storefront I have access to and had no issues downloading. I used Steam, Origin, Blizzard, Epic, Uplay and more.

 

Then to test the cache I deleted a couple games from my gaming PC on the same network as my lancache and the downloads start out going insanley slow. I didn't time it at the time but it appeard as though my download of the cached game was going slow for about 10-15 minutes and at under 1MB. For reference on my ISP connection during caching I was getting like 30MB's a second easy sometimes higher and sometimes lower depending on the hosts ability to provide my download at a given time. 

 

After a time of maybe 10-15 minutes the speed would suddenly and drastically shoot up to what my servers drives could handle and provide. I was able to replicate this a few times with different games in the cache.

 

Does anybody have any idea what would cause this?

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.