DeterminateSystems / nix-installer

Install Nix and flakes with the fast and reliable Determinate Nix Installer, with over 7 million installs.
https://determinate.systems
GNU Lesser General Public License v2.1
2.19k stars 57 forks source link

Could not kickstart service "org.nixos.nix-daemon": 1: Operation not permitted #1099

Closed runeksvendsen closed 1 month ago

runeksvendsen commented 2 months ago

Error

Error: 
   0: Install failure
   1: Error executing action
   2: Action `configure_init_service` errored
   3: Failed to execute command with status 1 `"launchctl" "kickstart" "-k" "system/org.nixos.nix-daemon"`, stdout: 
      stderr: Could not kickstart service "org.nixos.nix-daemon": 1: Operation not permitted

Metadata

key value
version 0.20.2
os macos
arch x86_64

More info

CI run: https://github.com/runeksvendsen/haskell-function-graph/actions/runs/10441277821/job/28912235129

Full log:

2024-08-18T14:15:53.0029560Z ##[group]Configuring KVM
2024-08-18T14:15:53.0417880Z [command]/usr/bin/sudo rm -f /etc/udev/rules.d/99-determinate-nix-installer-kvm.rules
2024-08-18T14:15:53.0612560Z ##[endgroup]
2024-08-18T14:15:53.0613380Z KVM is not available.
2024-08-18T14:15:53.0616060Z ##[group]Installing Nix
2024-08-18T14:15:53.0617830Z ##[group]Downloading nix-installer for x86_64-darwin
2024-08-18T14:15:53.0620200Z Fetching from https://fiids.install.determinate.systems/nix-installer/stable/x86_64-darwin
2024-08-18T14:15:53.8561980Z Cache Size: ~18 MB (19163150 B)
2024-08-18T14:15:53.8628490Z [command]/usr/local/bin/gtar -xf /Users/runner/work/_temp/c4ba0505-3622-442d-9232-ca0d82890943/cache.tzst -P -C /Users/runner/work/_temp/nix-installer-c0c32abc-24c0-4df4-84a7-326889d989f8 --delay-directory-restore --use-compress-program unzstd
2024-08-18T14:15:53.9548090Z Cache restored successfully
2024-08-18T14:15:53.9637340Z ##[endgroup]
2024-08-18T14:15:53.9642020Z [command]/Users/runner/work/_temp/nix-installer-c0c32abc-24c0-4df4-84a7-326889d989f8/nix-installer install macos
2024-08-18T14:15:53.9747200Z `nix-installer` needs to run as `root`, attempting to escalate now via `sudo`...
2024-08-18T14:15:54.2853070Z Received 19163150 of 19163150 (100.0%), 18.3 MBs/sec
2024-08-18T14:15:54.4999280Z  INFO Step: Create an APFS volume `Nix Store` for Nix on `disk1` and add it to `/etc/fstab` mounting on `/nix`
2024-08-18T14:16:06.0762440Z  INFO Step: Provision Nix
2024-08-18T14:16:08.6613580Z  INFO Step: Create build users (UID 301-332) and group (GID 30000)
2024-08-18T14:16:20.6816610Z  INFO Step: Configure Time Machine exclusions
2024-08-18T14:16:20.7609590Z  INFO Step: Configure Nix
2024-08-18T14:16:22.6174260Z  INFO Step: Configuring zsh to support using Nix in non-interactive shells
2024-08-18T14:16:22.6183080Z  INFO Step: Create a `launchctl` plist to put Nix into your PATH
2024-08-18T14:16:22.6186230Z  INFO Step: Configure Nix daemon related settings with launchctl
2024-08-18T14:16:23.0243740Z Error: 
2024-08-18T14:16:23.0246200Z    0: Install failure
2024-08-18T14:16:23.0248290Z    1: Error executing action
2024-08-18T14:16:23.0249010Z    2: Action `configure_init_service` errored
2024-08-18T14:16:23.0251050Z    3: Failed to execute command with status 1 `"launchctl" "kickstart" "-k" "system/org.nixos.nix-daemon"`, stdout: 
2024-08-18T14:16:23.0254510Z       stderr: Could not kickstart service "org.nixos.nix-daemon": 1: Operation not permitted
2024-08-18T14:16:23.0255580Z 
2024-08-18T14:16:23.0255590Z 
2024-08-18T14:16:23.0255590Z 
2024-08-18T14:16:23.0255780Z Location:
2024-08-18T14:16:23.0256450Z    src/cli/subcommand/install.rs:314
2024-08-18T14:16:23.0256950Z 
2024-08-18T14:16:23.0257520Z Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
2024-08-18T14:16:23.0261680Z Run with RUST_BACKTRACE=full to include source snippets.
2024-08-18T14:16:23.0262350Z 
2024-08-18T14:16:23.0271220Z Consider reporting this error using this URL: https://github.com/DeterminateSystems/nix-installer/issues/new?title=%3Cautogenerated-issue%3E&body=%23%23+Error%0A%60%60%60%0AError%3A+%0A+++0%3A+Install+failure%0A+++1%3A+Error+executing+action%0A+++2%3A+Action+%60configure_init_service%60+errored%0A+++3%3A+Failed+to+execute+command+with+status+1+%60%22launchctl%22+%22kickstart%22+%22-k%22+%22system%2Forg.nixos.nix-daemon%22%60%2C+stdout%3A+%0A++++++stderr%3A+Could+not+kickstart+service+%22org.nixos.nix-daemon%22%3A+1%3A+Operation+not+permitted%0A%0A%0A%60%60%60%0A%0A%23%23+Metadata%0A%7Ckey%7Cvalue%7C%0A%7C--%7C--%7C%0A%7C**version**%7C0.20.2%7C%0A%7C**os**%7Cmacos%7C%0A%7C**arch**%7Cx86_64%7C%0A
2024-08-18T14:16:23.0338020Z ##[error]Error: The process '/Users/runner/work/_temp/nix-installer-c0c32abc-24c0-4df4-84a7-326889d989f8/nix-installer' failed with exit code 1
2024-08-18T14:16:23.0858110Z Post job cleanup.
2024-08-18T14:16:24.4383050Z Post job cleanup.
2024-08-18T14:16:24.5576450Z [command]/usr/local/bin/git version
2024-08-18T14:16:24.5659450Z git version 2.46.0
2024-08-18T14:16:24.5711870Z Copying '/Users/runner/.gitconfig' to '/Users/runner/work/_temp/1f7d1071-cc2b-4157-ba34-0146f1fdef76/.gitconfig'
2024-08-18T14:16:24.5736280Z Temporarily overriding HOME='/Users/runner/work/_temp/1f7d1071-cc2b-4157-ba34-0146f1fdef76' before making global git config changes
2024-08-18T14:16:24.5738440Z Adding repository directory to the temporary git global config as a safe directory
2024-08-18T14:16:24.5742340Z [command]/usr/local/bin/git config --global --add safe.directory /Users/runner/work/haskell-function-graph/haskell-function-graph
2024-08-18T14:16:24.5835920Z [command]/usr/local/bin/git config --local --name-only --get-regexp core\.sshCommand
2024-08-18T14:16:24.5918500Z [command]/usr/local/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
2024-08-18T14:16:24.7041780Z [command]/usr/local/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2024-08-18T14:16:24.7115890Z http.https://github.com/.extraheader
2024-08-18T14:16:24.7135720Z [command]/usr/local/bin/git config --local --unset-all http.https://github.com/.extraheader
2024-08-18T14:16:24.7223730Z [command]/usr/local/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
2024-08-18T14:16:24.8817050Z Cleaning up orphan processes
cole-h commented 2 months ago

If you retry it, does it happen again? We may need to add a retry when we kickstart things...

runeksvendsen commented 2 months ago

@cole-h it succeeded the second time. Thank you for the quick reply! Since it was a permissions error, it didn't occur to me that it could be transitory.