The NixOS Cache is now hosted by Fastly!

I am also experiencing problems when installing from home, which is an IPv6 connection.
e.g.:

warning: unable to download 'https://cache.nixos.org/nar/11gcpmqadnwk1s8q0v5ygh7v497fdx4ms3szihq6px4fbf60wzkr.nar.xz': HTTP error 200 (curl error: Failure when receiving data from the peer); retrying in 311 ms
warning: unable to download 'https://cache.nixos.org/nar/1mx1gwd4srdqwnipp94zv0cax0mhbyzjhvhfqvppr2zpl68nfac9.nar.xz': HTTP error 200 (curl error: Failure when receiving data from the peer); retrying in 342 ms
warning: unable to download 'https://cache.nixos.org/nar/080240p3cbs25znrv9bcfvxn9cmv4q8zv20bfxh4kap6hwrc1jgk.nar.xz': HTTP error 200 (curl error: Failure when receiving data from the peer); retrying in 327 ms

Is there something that can be done about it?

I’m seeing the exact same error

1 Like

As of January 2019 this problem still persists, however these errors are not resolving themselves as for others. These packages are exclusively .nar files, all other archives from nix.cache appear to copy without problem.

1 Like

I have the same issue.

I have the same issue. From reading this thread I gather that there’s no solution/workaround for this available? I’m not able to upgrade my system, which is a real bummer.

The work around is to keep trying. For me two attempts are typically enough. --keep-going helps, too.

Hey everyone,

Sorry for the quiet on this issue.

I’ve been working with Fastly support and have made a configuration change which should eliminate the 503 problem. They’ve told me a lot of the 503 errors are due to a low connect timeout between Fastly and S3. I’ve changed this value from 1000ms to 2000ms. We’ll start with this change and see how the number of reports over time changes.

7 Likes

I can report that it’s definitely still happening. Maybe a bit less, though.

1 Like

Are ICMP packages blocked somewhere on the line?

To my (limited) understanding, IPv6 packages are discarded if their MTU is too big for any unit in the chain. This happens normally in conjunction with an ICMP packet, which tells the sender too lower the MTU and resend. If ICMP pakets are filtered, this won’t work. But, as one stream of packets is not taking always the same route, sometimes the MTU is not too big for any unit, so that the packet will be delivered. On my university we had quiet a lot of problems with IPv6; on the one hand the universities firewall filtered some ICMP packages (which basically breaks IPv6), on the other hand some consumer grade routers filtered them too.

1 Like

I see the kinds of errors documented by @fpletz quite frequently.

Generally, without many repeated attempts, I’m unable to use the haskell tool, stack, to instantiate a nix shell with all necessary dependencies.

Nodejs- and ghc-related packages, in particular, trigger these kinds of errors.

Note that the problem is still there. Is there a different cache I can use that works?

For what it’s worth, I get the same error when I try to update my machine on the connection to my apartment, but using VPN connected via my university the errors go away. My suspicion is that Fastly is rate limiting certain IP-ranges. I also get the same errors on GitHub occasionally, and using a VPN solves them. Somewhat obnoxious, but given that I live in a student city and share the connection with a few thousand others I can certainly see why it happens.

2 Likes

The problem still persists for me. Had to nixos-rebuild switch --keep-going about 5 times today.

I still have this problem as well. It started happening again about a week ago and has been continuous since then. I’ve tried nixos-rebuild with --keep-going multiple times but I am completely unable to update.

My particular errors are in this form (curl error: Timeout was reached):

warning: unable to download 'https://cache.nixos.org/nar/1zx76jalwg9l9pp5bqhpd501v77qba05jmalkf6ba78mwgn3czyn.nar.xz': HTTP error 200 (curl error: Timeout was reached); retrying in 309 ms
warning: unable to download 'https://cache.nixos.org/nar/1d9s35nbv1rmciigribbmrc1px1mfzic1ryyx01cp9p301fnm542.nar.xz': HTTP error 200 (curl error: Timeout was reached); retrying in 538 ms
warning: unable to download 'https://cache.nixos.org/nar/1fza2a0vqqqb221m1d167iz9j36k30nkbp0hz61ayiv46dmcjrrv.nar.xz': HTTP error 200 (curl error: Timeout was reached); retrying in 653 ms
1 Like

Strange. After it was consistently failing for a week, I just tried manually downloading the NARs with wget and curl and both worked - and then my nixos-rebuild also worked after that. I also experimented with running it with -j1, but it seems to be working without that.

The HTTP error 200 (curl error: Timeout was reached); problem also occurs for me, though limiting to one job with -j1 fixes it.

Maybe increasing NIX_CONNECT_TIMEOUT might also help?

The timeout error seems to affect some people from Europe/Germany on NixOS 19.03:
https://github.com/NixOS/nixpkgs/issues/65015

From Colombia I experienced the same problems but the following steps solve the problem:

# echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
$ sudo nixos-rebuild switch --upgrade --keep-going

Just the summary of some steps from different people, from a new location!

1 Like

13 posts were split to a new topic: NixOS Cache fetching issue

@jralvarezc @HappyEnt @solson @pimiddy @sondr3 @matthew-hilty @alexherbo2 @Meizikyn @gpstrucker

If you are still having issues with the cache, try out the new experimental one: Improvements to cache.nixos.org (help test the new config!)

1 Like