Cache.nixos.org: Couldn't connect to server (7) because of IPv6 from DNS

Hi. I suddenly started to see the following error:

$ nix-shell
warning: unable to download 'https://cache.nixos.org/dv9x2is9dcr10bzjfc823xbm59fwxb1p.narinfo': Couldn't connect to server (7); retrying in 255 ms
warning: unable to download 'https://cache.nixos.org/wwbfl8n274dndl7f01w1kjdy9silskc0.narinfo': Couldn't connect to server (7); retrying in 281 ms
warning: unable to download 'https://cache.nixos.org/dv9x2is9dcr10bzjfc823xbm59fwxb1p.narinfo': Couldn't connect to server (7); retrying in 521 ms
warning: unable to download 'https://cache.nixos.org/wwbfl8n274dndl7f01w1kjdy9silskc0.narinfo': Couldn't connect to server (7); retrying in 651 ms
warning: unable to download 'https://cache.nixos.org/dv9x2is9dcr10bzjfc823xbm59fwxb1p.narinfo': Couldn't connect to server (7); retrying in 1364 ms
warning: unable to download 'https://cache.nixos.org/wwbfl8n274dndl7f01w1kjdy9silskc0.narinfo': Couldn't connect to server (7); retrying in 1309 ms
warning: unable to download 'https://cache.nixos.org/dv9x2is9dcr10bzjfc823xbm59fwxb1p.narinfo': Couldn't connect to server (7); retrying in 2755 ms
warning: unable to download 'https://cache.nixos.org/wwbfl8n274dndl7f01w1kjdy9silskc0.narinfo': Couldn't connect to server (7); retrying in 2643 ms
error: unexpected end-of-file

curl reveals

$ curl -v https://cache.nixos.org/wwbfl8n274dndl7f01w1kjdy9silskc0.narinfo
*   Trying 2a04:4e42:9::729:443...
* Immediate connect fail for 2a04:4e42:9::729: Cannot assign requested address
* Closing connection 0
curl: (7) Couldn't connect to server

And Host

$ host cache.nixos.org
cache.nixos.org is an alias for dualstack.v2.shared.global.fastly.net.
dualstack.v2.shared.global.fastly.net has address 151.101.38.217
dualstack.v2.shared.global.fastly.net has IPv6 address 2a04:4e42:9::729

Does anybody know what is going on? Why does curl and other tools return IPv6 address of cache.nixos.org at first place?

I’m running into the same problem. Is cache.nixos.org down?

When I run nixos-rebuild switch I get a lot of errors like this:

warning: unable to download 'https://cache.nixos.org/dbqlqsj1vbng95d4sff956z9y
4vfdl3f.narinfo': Couldn't resolve host name (6); retrying in 280 ms          warning: unable to download 'https://cache.nixos.org/dbqlqsj1vbng95d4sff956z9y
4vfdl3f.narinfo': Couldn't resolve host name (6); retrying in 510 ms          warning: unable to download 'https://cache.nixos.org/dbqlqsj1vbng95d4sff956z9y
4vfdl3f.narinfo': Couldn't resolve host name (6); retrying in 1169 ms         warning: unable to download 'https://cache.nixos.org/dbqlqsj1vbng95d4sff956z9y
4vfdl3f.narinfo': Couldn't resolve host name (6); retrying in 2537 ms         error: unable to download 'https://cache.nixos.org/dbqlqsj1vbng95d4sff956z9y4v
fdl3f.narinfo': Couldn't resolve host name (6)

And similarly, host can’t resolve the host:

jeff@jbb-hp17:jbb$ host cache.nixos.org
Host cache.nixos.org not found: 2(SERVFAIL)

In the browser I can visit nixos.org but not cache.nixos.org.

I can’t see any issues with this.

It seems to be working now. Thanks, @vcunat! What did you do to look for issues?

2 Likes