NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.48k stars 12.98k forks source link

nixos/akkoma: Unable to enable both akkoma and pleroma #208027

Open yayayayaka opened 1 year ago

yayayayaka commented 1 year ago

Describe the bug

Akkoma fails to start if pleroma is already running.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Enable both services.akkoma and services.pleroma

Screenshots

$ journalctl -eu akkoma.service
Dez 27 21:32:39 nix systemd[1]: Starting Akkoma social network...
Dez 27 21:32:40 nix akkoma[11900]: [info] Migrations already up
Dez 27 21:32:44 nix pleroma[11946]: Protocol 'inet_tcp': the name pleroma@127.0.0.1 seems to be in use by another Erlang node
Dez 27 21:32:44 nix systemd[1]: akkoma.service: Main process exited, code=exited, status=1/FAILURE
Dez 27 21:34:11 nix systemd[1]: akkoma.service: start-post operation timed out. Terminating.
Dez 27 21:34:11 nix akkoma-socket[11947]: /nix/store/hnag31a5l12hmghgjlp0zqcwvxd0nvhl-akkoma-socket/bin/akkoma-socket: line 1: COPROC_PID: unbound variable
Dez 27 21:34:11 nix akkoma-socket[11947]: /nix/store/hnag31a5l12hmghgjlp0zqcwvxd0nvhl-akkoma-socket/bin/akkoma-socket: line 1: COPROC_PID: unbound variable
Dez 27 21:34:11 nix systemd[1]: akkoma.service: Control process exited, code=exited, status=1/FAILURE
Dez 27 21:34:11 nix systemd[1]: akkoma.service: Failed with result 'exit-code'.
Dez 27 21:34:11 nix systemd[1]: Failed to start Akkoma social network.
Dez 27 21:34:11 nix systemd[1]: akkoma.service: Consumed 5.572s CPU time, received 222B IP traffic, sent 342B IP traffic.

Additional context

Possible workaround is to set

{ ... }:
{
  systemd.services.akkoma.environment.RELEASE_DISTRIBUTION = "none";
  systemd.services.pleroma.environment.RELEASE_DISTRIBUTION = "none";
}

This breaks interactive instance maintenance with pleroma_ctl, though.

Notify maintainers

@illdefined

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.85, NixOS, 23.05 (Stoat), 23.05pre-git`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.12.0`
 - nixpkgs: `/etc/src/nixpkgs`
illdefined commented 1 year ago

We set RELEASE_NAME in the environment to avoid this issue, but this appears to be insufficient judging by your observation.