Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unsable to download nar / HTTP error 500 / failed at nix-serve.psgi line 60 #41

Open
PaulGrandperrin opened this issue Aug 14, 2022 · 2 comments

Comments

@PaulGrandperrin
Copy link

Both client and server are on 20-05 and using default conf (AFAICT).

On client:

Internal Server Error; retrying in 1307 ms
error: unable to download 'http://nas.paulg.fr:5000/nar/iwxyfqxhnd7i2ksd4l803jm514gnpd2f.nar': HTTP error 500 ('Internal Server Error')

On server:

Aug 14 11:43:29 nixos-nas nix-serve-start[214715]: error: opening a connection to remote store 'daemon' previously failed at /nix/store/lg9rx0xc0mxy7snxgavz5qv3r9hm4n7z-nix-serve-0.2-e4675e3/libexec/nix-serve/nix-serve.psgi line 60.
@amarshall
Copy link

amarshall commented Dec 2, 2022

Getting this error (albeit sometimes on a different line, 26) frequently after upgrading to nixos-22.11 (rev 82891b5e2c2359d7e58d08849e4c89511ab94234, Nix 2.11.0). Nix-serve has become, sadly, basically unusable with the frequency of errors.

@alejandro-angulo
Copy link

I just ran into this and the issue turned out to be that the user running nix-serve didn't have access to the nix daemon. I think by default the user that runs nix-serve is also called nix-serve. So, in my flake, I added config.nix.settings.allowed-users = ["nix-serve"];.

See here https://github.com/NixOS/nixpkgs/blob/nixos-22.11/nixos/modules/services/misc/nix-daemon.nix#L626-L639

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants