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

error: failed to read compressed data (Truncated zstd input) #497

Open
timhae opened this issue Jan 25, 2025 · 0 comments
Open

error: failed to read compressed data (Truncated zstd input) #497

timhae opened this issue Jan 25, 2025 · 0 comments

Comments

@timhae
Copy link

timhae commented Jan 25, 2025

Hey, thanks a lot for maintaining this great tool, I have recently started seeing this error when updating my local system with a harmonia cache as substituter:

❯ nixos-rebuild switch --flake . --use-remote-sudo
building the system configuration...
error: failed to read compressed data (Truncated zstd input)
..
error: failed to read compressed data (Truncated zstd input)
error: some substitutes for the outputs of derivation '/nix/store/1c3qmlg3j1ldwf09gjqpbyy77l0gjq3y-initrd-linux-6.6.71.drv' failed (usually happens due to networking issues);
 try '--fallback' to build derivation from source
error: 1 dependencies of derivation '/nix/store/m8vvzn45j5z6jw8azy64xn6vymf6x6kg-nixos-system-desktop1-25.05.20250116.5df4362.drv' failed to build

My local nix config:

  nix.settings.substituters = [
    "https://cache.ts.my.domain?priority=39"
  ];
  nix.settings.trusted-public-keys = [
    "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
    "cache.ts.my.domain:II5Re1ZjWdDCZBSXWC2gA35H57r5eJTRl5bv++delZ4="
  ];

Server harmonia/nginx config:

  services.nginx = {
    virtualHosts = {
      "cache.ts.my.domain" = {
        forceSSL = true;
        useACMEHost = "main";
        kTLS = true;
        extraConfig = ''
          allow 100.64.0.0/10;
          allow fd7a:115c:a1e0::/48;
          deny all;
        '';
        locations."/".extraConfig = ''
          proxy_pass http://127.0.0.1:${toString harmoniaPort};
          proxy_set_header Host $host;
          proxy_redirect http:// https://;
          proxy_http_version 1.1;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection $connection_upgrade;
        '';
      };
    };
  };

  services.harmonia = {
    enable = true;
    signKeyPaths = [ config.age.secrets.cacheKey.path ];
    settings = {
      bind = "[::]:${toString harmoniaPort}";
      priority = 39;
    };
  };

Do you happen to have an idea what I might be doing wrong here?

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

1 participant