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: 'nix-store --serve' protocol mismatch from <remote> #255

Closed
TornaxO7 opened this issue Jan 23, 2024 · 6 comments
Closed

error: 'nix-store --serve' protocol mismatch from <remote> #255

TornaxO7 opened this issue Jan 23, 2024 · 6 comments

Comments

@TornaxO7
Copy link

TornaxO7 commented Jan 23, 2024

Hello!
If I'm executing

deploy .#laptop

then I'm getting

🚀 ℹ [deploy] [INFO] Building profile `system` for node `laptop`
🚀 ℹ [deploy] [INFO] Copying profile `system` to node `laptop`
/nix/store/3h8pyqvrq9l4m2pz95rshnrd79508m7l-set-environment: line 20: warning: setlocale: LC_NUMERIC: cannot change locale (de_DE.UTF-8): No such file or directory
/nix/store/3h8pyqvrq9l4m2pz95rshnrd79508m7l-set-environment: line 23: warning: setlocale: LC_TIME: cannot change locale (de_DE.UTF-8): No such file or directory
/nix/store/3h8pyqvrq9l4m2pz95rshnrd79508m7l-set-environment: line 20: warning: setlocale: LC_NUMERIC: cannot change locale (de_DE.UTF-8): No such file or directory
/nix/store/3h8pyqvrq9l4m2pz95rshnrd79508m7l-set-environment: line 23: warning: setlocale: LC_TIME: cannot change locale (de_DE.UTF-8): No such file or directory
error: 'nix-store --serve' protocol mismatch from 'tornax@laptop', got '/nix/store/3h8pyqvrq9l4m2pz95rshnrd79508m7l-set-environment: line 20: warning: setlocale: LC_NUMERIC: cannot change locale (de_DE.UTF-8): No such file or directory
       /nix/store/3h8pyqvrq9l4m2pz95rshnrd79508m7l-set-environment: line 23: warning: setlocale: LC_TIME: cannot change locale (de_DE.UTF-8): No such file or directory
       /nix/store/3h8pyqvrq9l4m2pz95rshnrd79508m7l-set-environment: line 20: warning: setlocale: LC_NUMERIC: cannot change locale (de_DE.UTF-8)
       /nix/store/3h8pyqvrq9l4m2pz95rshnrd79508m7l-set-environment: line 23: warning: setlocale: LC_TIME: cannot change locale (de_DE.UTF-8)
       �RT'
🚀 ❌ [deploy] [ERROR] Failed to push profile: Nix copy command resulted in a bad exit code: Some(1)

Here's the deployment config:

 deploy = {
      nodes = {
        laptop = {
          hostname = "laptop";
          profiles.system = {
            user = "root";
            path = inputs.deploy-rs.lib.${self.nixosConfigurations.laptop.pkgs.system}.activate.nixos self.nixosConfigurations.laptop;
          };
        };
      };
    };
@TornaxO7 TornaxO7 changed the title error: 'nix-store --serve' protocol mismatch from 'tornax@laptop', error: 'nix-store --serve' protocol mismatch from <remote> Jan 23, 2024
@rvem
Copy link
Member

rvem commented Jan 25, 2024

Which nix versions do you have on laptop and on the machine you're deploying from?

@TornaxO7
Copy link
Author

TornaxO7 commented Jan 25, 2024

host: laptop

nix (Nix) 2.18.1

host: pc (where I'm calling deploy)

nix (Nix) 2.18.1

@rvem
Copy link
Member

rvem commented Jan 25, 2024

Hmm, I don't think that's an issue with deploy-rs per se. From what I can see, nix copy --to ssh://tornax@laptop fails with the aforementioned error, though, I'm not sure what may cause protocol mismatch in case when nix versions are the same 😕.

Can you try to nix copy something to the laptop without deploy-rs and check if this reproduces?

@TornaxO7
Copy link
Author

Looks like that you're right.
If I execute nix copy --to ssh:tornax@laptop nixpkgs#hello then I'm getting

/nix/store/3h8pyqvrq9l4m2pz95rshnrd79508m7l-set-environment: line 20: warning: setlocale: LC_NUMERIC: cannot change locale (de_DE.UTF-8): No such file or directory
/nix/store/3h8pyqvrq9l4m2pz95rshnrd79508m7l-set-environment: line 23: warning: setlocale: LC_TIME: cannot change locale (de_DE.UTF-8): No such file or directory
/nix/store/3h8pyqvrq9l4m2pz95rshnrd79508m7l-set-environment: line 20: warning: setlocale: LC_NUMERIC: cannot change locale (de_DE.UTF-8): No such file or directory
/nix/store/3h8pyqvrq9l4m2pz95rshnrd79508m7l-set-environment: line 23: warning: setlocale: LC_TIME: cannot change locale (de_DE.UTF-8): No such file or directory
error: 'nix-store --serve' protocol mismatch from 'tornax@laptop', got '/nix/store/3h8pyqvrq9l4m2pz95rshnrd79508m7l-set-environment: line 20: warning: setlocale: LC_NUMERIC: cannot change local
e (de_DE.UTF-8): No such file or directory
       /nix/store/3h8pyqvrq9l4m2pz95rshnrd79508m7l-set-environment: line 23: warning: setlocale: LC_TIME: cannot change locale (de_DE.UTF-8): No such file or directory
       /nix/store/3h8pyqvrq9l4m2pz95rshnrd79508m7l-set-environment: line 20: warning: setlocale: LC_NUMERIC: cannot change locale (de_DE.UTF-8)
       /nix/store/3h8pyqvrq9l4m2pz95rshnrd79508m7l-set-environment: line 23: warning: setlocale: LC_TIME: cannot change locale (de_DE.UTF-8)
       �RT'

@TornaxO7
Copy link
Author

aw man, why is this happening?! 😢

But thank you for help your help! c(^-^)c I'll ask on the nixos discourse then.

@TornaxO7
Copy link
Author

Wait, I found the issue!
I'm using tailscale ssh and if I disable it, nix copy works! Looks like that this is an issue from tailscale :(

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

2 participants