Closed C9Glax closed 1 year ago
I believe this is not an issue with lancache per-se, but you would have better connections at Valve to look into why they are trying to transfer game-files via https.
What seems to have helped is actually reverting the mentioned PR, thus forcing http from lancache.
I've addressed this in the issue on cache-domains, but essentially:
Reverting that PR and using the old cache domains won't help with caching. If Steam detects an error using a lancache - a 404 or other error, possibly from the upstream CDN, it will switch back to going directly to the content servers for a few minutes, bypassing the lancache, and may upgrade the connection back to HTTPS.
If this happens - even if you had the full list of hostnames, all that is happening is the HTTPS traffic is now being passed through your LAN Cache and will not be cached.
To see if this is the problem here, check the content_log.txt file in your Steam directory. If you have lines saying Forgetting cache type 'LANCache'
... with a reason, then it means Steam has stopped using the LanCache and is going direct to the CDN and maybe using HTTPS.
We have no control over this behaviour of the Steam client and it is intended behaviour by Valve.
Check the logfile and let me know if you are seeing messages like that in it.
I also have the problem, that Steam randomly switches to SSL downloads. Sometimes this is due to the cache "hanging" for a few seconds when downloading a game for the first time but usually its completely out of the blue. I have no explanation for this behaviour.
===CACHE===
==> /mnt/hdd/lancache/logs/error.log <== 2022/12/27 17:05:15 [error] 1898#1898: 720265 upstream timed out (110: Connecti on timed out) while reading response header from upstream, client: 10.1.3.46, se rver: , request: "GET /depot/292031/chunk/f9ec3884ebf4a5cb4414f4e8235c9d16c05911 cb HTTP/1.1", subrequest: "/depot/292031/chunk/f9ec3884ebf4a5cb4414f4e8235c9d16c 05911cb", upstream: "http://127.0.0.1:3128/depot/292031/chunk/f9ec3884ebf4a5cb44 14f4e8235c9d16c05911cb", host: "steampipe.akamaized.net" 2022/12/27 17:05:15 [error] 1898#1898: 720265 unexpected status code 504 in sli ce response while sending to client, client: 10.1.3.46, server: , request: "GET /depot/292031/chunk/f9ec3884ebf4a5cb4414f4e8235c9d16c05911cb HTTP/1.1", subreque st: "/depot/292031/chunk/f9ec3884ebf4a5cb4414f4e8235c9d16c05911cb", upstream: "h ttp://127.0.0.1:3128/depot/292031/chunk/f9ec3884ebf4a5cb4414f4e8235c9d16c05911cb ", host: "steampipe.akamaized.net" 2022/12/27 17:19:43 [error] 1820#1820: *728911 unexpected status code 426 in slice response while reading response header from upstream, client: 10.1.3.46, server: , request: "GET /depot/292031/chunk/f9ec3884ebf4a5cb4414f4e8235c9d16c05911cb HTTP/1.1", subrequest: "/depot/292031/chunk/f9ec3884ebf4a5cb4414f4e8235c9d16c05911cb", upstream: "http://127.0.0.1:3128/depot/292031/chunk/f9ec3884ebf4a5cb4414f4e8235c9d16c05911cb", host: "google2.cdn.steampipe.steamcontent.com"
==> /mnt/hdd/lancache/logs/access.log <== [steam] 10.1.3.46 / - - - [27/Dec/2022:17:05:15 +0100] "GET /depot/292031/chunk/ f9ec3884ebf4a5cb4414f4e8235c9d16c05911cb HTTP/1.1" 200 621313 "-" "Valve/Steam H TTP Client 1.0" "MISS" "steampipe.akamaized.net" "-"
==> /mnt/hdd/lancache/logs/upstream-error.log <== 2022/12/27 17:05:15 [error] 1898#1898: *720606 upstream timed out (110: Connecti on timed out) while connecting to upstream, client: 127.0.0.1, server: , request : "GET /depot/292031/chunk/f9ec3884ebf4a5cb4414f4e8235c9d16c05911cb HTTP/1.0", u pstream: "http://2.21.228.155:80/depot/292031/chunk/f9ec3884ebf4a5cb4414f4e8235c 9d16c05911cb", host: "steampipe.akamaized.net"
===CLIENT===
==> C:\Program Files (x86)\Steam\logs\content_log" <== [2022-12-27 17:05:15] Forgetting cache type 'LANCache' on host '::ffff:a01:10b' due to chunk timeout. [2022-12-27 17:05:15] IPv6 Connectivity state has changed, downgrading to ipv4-only [2022-12-27 17:05:15] HTTP (CDN,11) - steampipe.akamaized.net (10.1.1.11:80 / 10.1.1.11:80, host: steampipe.akamaized.net): Received 0 (Invalid) HTTP response for depot 292031 [2022-12-27 17:05:15] HTTP (CDN,11) - steampipe.akamaized.net (10.1.1.11:80 / 10.1.1.11:80, host: steampipe.akamaized.net): Disabling dual-stack for this connection
This reply already mentioned the cause.
If Steam detects an error using a lancache - a 404 or other error, possibly from the upstream CDN, it will switch back to going directly to the content servers for a few minutes, bypassing the lancache, and may upgrade the connection back to HTTPS.
However you can circumvent this by actually re-adding all the CDN-Servers, and thus forcing a connection to your LAN-Cache. Which you can do by using your own repo:
CACHE_DOMAINS_REPO
_The github repo url for the cachedomains files to use to populate the cdn maps, if you do not want to use the recommended source for testing purposes.
Default: https://github.com/uklans/cache-domains.git
For example I am using my own (reverted) repo: https://github.com/C9Glax/cache-domains
Everything is working as intended by the software and developer, just the user is confused. So actually: Closing.
We have spoken to Valve and they have fixed this in the latest update to Steam.
Describe the issue you are having
I am using the Linux-client for Steam and lancache didn't seem to work suddenly (after switching from windows). Most of the connections are made via port 443 and therefor not cached. Only after the third or fourth re-run I have now gotten some connections via port 80 (but still only around half of speeds I have historically gotten).
How are you running the container(s)
I run monolithic with a pihole dns to point to monolithic.
DNS Configuration
The DNS-server is pihole and resolves
lancache.steamcontent.com
properly to the correct address (verified withdig
).Since uklans/cache-domains got a recent PR which removes most of the addresses, I thought this might be the problem, and added the old addresses back. Which did not only partially seem to resolve the problem.
Output when starting a download
192.168.0.5
=lancache.steamcontent.com
192.168.0.50
= PC running SteamOn PC
netstat -natp | grep steam
On Lancache-server
netstat -natp | grep 192.168.0.50