1 Jun 2021 |
justinrestivo | Has anyone hosted a s3 cache? I'm hosting one with minio and pulling from it. I've got
```
substituters = https://cache.nixos.org http://localhost:9000/nixbucket
require-sigs = false
```
I created my bucket with mb like normal. It's empty. Now when I try and build a sample flake, I get error: NAR info file 'somehash' is corrupt. Anyone tried something similar? Is there something special I need to do when initializing the cache? | 13:37:06 |
Linux Hackerman | justinrestivo: can you share the content of the narinfo file? | 13:38:07 |
justinrestivo | Yes. | 13:39:05 |
justinrestivo | * Yes. Grabbing it. | 13:39:27 |
justinrestivo | The narinfo file is stored under /nix/store right? I'm not seeing the hash under there. | 13:47:01 |
Linux Hackerman | no, it's stored in the bucket | 13:47:14 |
Linux Hackerman | the narinfo contains the information that's stored in the sqlite db at /nix/var/nix/db/db.sqlite in a "normal" store | 13:47:49 |
justinrestivo | The nix bucket is completely empty (no files) | 13:48:01 |
Linux Hackerman | huh. Is minio not giving 404s for missing files, then? | 13:48:17 |
justinrestivo | Hmm to test that I can just wget a url, right? Like wget localhost:9000/nixbucket/fakefile | 13:49:46 |
Linux Hackerman | what does curl -i http://localhost:9000/nixbucket/nix-cache-info and curl -i http://localhost:9000/nixbucket/$hash.narinfo say? | 13:50:00 |
Linux Hackerman | yeah | 13:50:06 |
justinrestivo | Ahh it's a firewall problem. It's not returning a 404 it's returning a webpage saying it's forbidden. | 13:51:33 |
justinrestivo | That helps a lot. | 13:51:39 |
justinrestivo | Thank you | 13:51:48 |
Linux Hackerman | bad error message for nix to give though | 13:51:51 |
Linux Hackerman | +1 weirdness, nix has treated 403 as equivalent to 404 since version 2.0. Which version are you on, justinrestivo ? | 13:54:07 |
Linux Hackerman | Also it's probably not firewall-related, but that listing isn't enabled on your bucket. | 13:55:06 |
Linux Hackerman | Should work fine with any nix newer than 2.0 though | 13:55:28 |
justinrestivo | Hmm I'm on nixFlakes. | 17:05:51 |
justinrestivo | Not sure of the version number but I can double check. | 17:06:03 |
justinrestivo | Hmm.. | 17:06:25 |
justinrestivo | Yeah, I'm on 2.4pre2021326_dd77f71 | 17:09:01 |
justinrestivo | Yeah it looks like it's a firewall thing. Now when I query from the host, I'm getting 404s as one would expect. It's just queries on that port in my contianer seem to be blocked. | 17:27:35 |
| andrew joined the room. | 17:49:44 |
Linux Hackerman | Right… Nix should still handle this gracefully :/ | 17:58:47 |
justinrestivo | Okay I've fixed the firewall issue. I still cannot query with a http endpoint. I get 403 access forbidden error. I made the policy public though.. odd | 18:44:25 |
| Aldwin joined the room. | 20:37:10 |
| Aldwin changed their display name from Aldwin Vlasblom to Aldwin. | 21:29:33 |
2 Jun 2021 |
| bhipple joined the room. | 03:01:27 |