could not connect to any lix socket #1159

Closed
opened 2026-03-18 09:00:24 +00:00 by ninanomenon · 1 comment

Platform

  • Linux: Arch Linux, Fedora
  • macOS
  • WSL

Additional information

Yesterday I updated to 2.94. Now nix can't connect to the socket anymore. The lix daemon seem not to start automatically anymore.

Output

After some tinkering I uninstalled lix and reinstalled it.

The installer printed this out:

Proceed? ([Y]es/[n]o/[e]xplain): yes
 INFO Step: Create directory `/nix`
 INFO Step: Provision Nix
 INFO Step: Create build users (UID 30001-30032) and group (GID 30000)
 INFO Step: Configure Nix
 INFO Step: Create directory `/etc/tmpfiles.d`
 INFO Step: Configure Nix daemon service
 INFO Step: Remove directory `/nix/temp-install-dir`
 WARN SelfTest([ShellFailed { shell: Sh, command: "\"sh\" \"-lc\" \"exec nix build --option substitute false --option post-build-hook '' --no-link --expr 'derivation { name = \\\"self-test-sh-1773819527646\\\"; system = \\\"x86_64-linux\\\"; builder = \\\"/bin/sh\\\"; args = [\\\"-c\\\" \\\"echo hello > \\\\$out\\\"]; }'\"", output: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "error:\n       … while evaluating an expression to select 'drvPath' on it\n         at «internal»:1:552:\n       … while evaluating strict\n         at «internal»:1:552:\n       (stack trace truncated; use '--show-trace' to show the full trace)\n\n       error: cannot open connection to remote store 'daemon': error: read failed: Connection reset by peer\n\n       note: trace involved the following derivations:\n       derivation 'self-test-sh-1773819527646'\n" } }, ShellFailed { shell: Bash, command: "\"bash\" \"-lc\" \"exec nix build --option substitute false --option post-build-hook '' --no-link --expr 'derivation { name = \\\"self-test-bash-1773819527689\\\"; system = \\\"x86_64-linux\\\"; builder = \\\"/bin/sh\\\"; args = [\\\"-c\\\" \\\"echo hello > \\\\$out\\\"]; }'\"", output: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "error:\n       … while evaluating an expression to select 'drvPath' on it\n         at «internal»:1:552:\n       … while evaluating strict\n         at «internal»:1:552:\n       (stack trace truncated; use '--show-trace' to show the full trace)\n\n       error: could not connect to any lix socket (tried /nix/var/nix/daemon-socket/socket)\n\n       note: trace involved the following derivations:\n       derivation 'self-test-bash-1773819527689'\n" } }, ShellFailed { shell: Fish, command: "\"fish\" \"-ic\" \"exec nix build --option substitute false --option post-build-hook '' --no-link --expr 'derivation { name = \\\"self-test-fish-1773819527717\\\"; system = \\\"x86_64-linux\\\"; builder = \\\"/bin/sh\\\"; args = [\\\"-c\\\" \\\"echo hello > \\\\$out\\\"]; }'\"", output: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "error:\n       … while evaluating an expression to select 'drvPath' on it\n         at «internal»:1:552:\n       … while evaluating strict\n         at «internal»:1:552:\n       (stack trace truncated; use '--show-trace' to show the full trace)\n\n       error: could not connect to any lix socket (tried /nix/var/nix/daemon-socket/socket)\n\n       note: trace involved the following derivations:\n       derivation 'self-test-fish-1773819527717'\n" } }])
Nix was installed successfully!
To get started using Nix, open a new shell or run `. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish`

And if I try to execute commands like this I get errors:

nix-shell -p python313Packages.cryptography
fetching github input 'github:NixOS/nixpkgs/nixpkgs-unstable'
error:
       … while evaluating an expression to select 'runCommandCC' on it
         at «string»:1:42:
            1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (python313Packages.cryptography) ]; } ""
             |                                          ^

       … while evaluating the first subexpression of a with expression
         at «string»:1:13:
            1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (python313Packages.cryptography) ]; } ""
             |             ^

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: could not connect to any lix socket (tried /nix/var/nix/daemon-socket/socket)

With cppnix I don't have problems like this.

I am pretty new to nix, so I might miss important details. Please let me know if you need more informations.

## Platform <!-- select the platform on which you tried to install Lix --> - [X] Linux: Arch Linux, Fedora - [ ] macOS - [ ] WSL ## Additional information Yesterday I updated to 2.94. Now nix can't connect to the socket anymore. The lix daemon seem not to start automatically anymore. ## Output After some tinkering I uninstalled lix and reinstalled it. The installer printed this out: ``` Proceed? ([Y]es/[n]o/[e]xplain): yes INFO Step: Create directory `/nix` INFO Step: Provision Nix INFO Step: Create build users (UID 30001-30032) and group (GID 30000) INFO Step: Configure Nix INFO Step: Create directory `/etc/tmpfiles.d` INFO Step: Configure Nix daemon service INFO Step: Remove directory `/nix/temp-install-dir` WARN SelfTest([ShellFailed { shell: Sh, command: "\"sh\" \"-lc\" \"exec nix build --option substitute false --option post-build-hook '' --no-link --expr 'derivation { name = \\\"self-test-sh-1773819527646\\\"; system = \\\"x86_64-linux\\\"; builder = \\\"/bin/sh\\\"; args = [\\\"-c\\\" \\\"echo hello > \\\\$out\\\"]; }'\"", output: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "error:\n … while evaluating an expression to select 'drvPath' on it\n at «internal»:1:552:\n … while evaluating strict\n at «internal»:1:552:\n (stack trace truncated; use '--show-trace' to show the full trace)\n\n error: cannot open connection to remote store 'daemon': error: read failed: Connection reset by peer\n\n note: trace involved the following derivations:\n derivation 'self-test-sh-1773819527646'\n" } }, ShellFailed { shell: Bash, command: "\"bash\" \"-lc\" \"exec nix build --option substitute false --option post-build-hook '' --no-link --expr 'derivation { name = \\\"self-test-bash-1773819527689\\\"; system = \\\"x86_64-linux\\\"; builder = \\\"/bin/sh\\\"; args = [\\\"-c\\\" \\\"echo hello > \\\\$out\\\"]; }'\"", output: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "error:\n … while evaluating an expression to select 'drvPath' on it\n at «internal»:1:552:\n … while evaluating strict\n at «internal»:1:552:\n (stack trace truncated; use '--show-trace' to show the full trace)\n\n error: could not connect to any lix socket (tried /nix/var/nix/daemon-socket/socket)\n\n note: trace involved the following derivations:\n derivation 'self-test-bash-1773819527689'\n" } }, ShellFailed { shell: Fish, command: "\"fish\" \"-ic\" \"exec nix build --option substitute false --option post-build-hook '' --no-link --expr 'derivation { name = \\\"self-test-fish-1773819527717\\\"; system = \\\"x86_64-linux\\\"; builder = \\\"/bin/sh\\\"; args = [\\\"-c\\\" \\\"echo hello > \\\\$out\\\"]; }'\"", output: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "error:\n … while evaluating an expression to select 'drvPath' on it\n at «internal»:1:552:\n … while evaluating strict\n at «internal»:1:552:\n (stack trace truncated; use '--show-trace' to show the full trace)\n\n error: could not connect to any lix socket (tried /nix/var/nix/daemon-socket/socket)\n\n note: trace involved the following derivations:\n derivation 'self-test-fish-1773819527717'\n" } }]) Nix was installed successfully! To get started using Nix, open a new shell or run `. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish` ``` And if I try to execute commands like this I get errors: ``` nix-shell -p python313Packages.cryptography fetching github input 'github:NixOS/nixpkgs/nixpkgs-unstable' error: … while evaluating an expression to select 'runCommandCC' on it at «string»:1:42: 1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (python313Packages.cryptography) ]; } "" | ^ … while evaluating the first subexpression of a with expression at «string»:1:13: 1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (python313Packages.cryptography) ]; } "" | ^ (stack trace truncated; use '--show-trace' to show the full trace) error: could not connect to any lix socket (tried /nix/var/nix/daemon-socket/socket) ``` With cppnix I don't have problems like this. I am pretty new to nix, so I might miss important details. Please let me know if you need more informations.
Owner

This is a duplicate of #1158, let's keep track of this issue there.

This is a duplicate of #1158, let's keep track of this issue there.
raito closed this issue 2026-03-18 11:32:54 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lix-project/lix#1159
No description provided.