-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
pleroma: pleroma_ctl instance gen
fails due to missing COOKIE file
#170805
Comments
Obviously the easiest solution for this is to simply generate a cookie by default for interactive use on first run, but I'm unsure if this behavior would be undesireable for anyone's real-world use-case. Instinctively I want to say it would be fine, though. |
Somewhat unrelated, but nixpkgs/pkgs/servers/pleroma/default.nix Lines 22 to 25 in 4ee8802
You just have to use ex. (from a since deprecated hack I wrote to load my emacs config from nix) makeWrapper "$prog" "$out/bin/$progname" \
--run 'test -a "$HOME/.emacs" && echo "~/.emacs exists, failing to load config." && exit 1' \
--run 'test -d "$HOME/.emacs.d" && echo "~/.emacs.d exists, failing to load config." && exit 1' \
--run 'export NIX_STORED_XDG_CONFIG_HOME=$XDG_CONFIG_HOME' \
--run 'export EMACSNATIVELOADPATH="$EMACSNATIVELOADPATH:$HOME/.local/share/emacs/eln-cache/"' \
--set XDG_CONFIG_HOME '${xdg-config-home}' \
--set NIX_EMACS_INIT_PACKAGE '${configPkg.pname}' |
Related: #166229 |
Ah, I didn't notice that issue, ty! |
Not only On NixOS 21.11 pleroma didn't crash, and |
@inexcode If you wish to run a pleroma instance you can run it using the NixOS service, which overloads the If you desperately need to run for testing purposes, you should be able to set RELEASE_COOKIE to a file in the command-line. ex. $ dd if=/dev/urandom bs=1 count=16 | hexdump -e '16/1 "%02x"' > /path/to/your/release/cookie
$ RELEASE_COOKIE=/path/to/your/release/cookie pleroma |
I struggled to run database maintenance tasks like |
(we're doing this because running ~nix-shell -p pleroma-otp~ and running the commands the nixos manual said don't work and people claim it's fine if you run the commands as part of the service.) https://nixos.org/manual/nixos/stable/index.html#module-services-pleroma-generate-config NixOS/nixpkgs#170805
(we're doing this because running ~nix-shell -p pleroma-otp~ and running the commands the nixos manual said don't work and people claim it's fine if you run the commands as part of the service.) https://nixos.org/manual/nixos/stable/index.html#module-services-pleroma-generate-config NixOS/nixpkgs#170805
I am unable to start the NixOS pleroma module while its config is missing: and the description in the configs option for the pleroma module sent me to the Pleroma section of the NixOS manual: However, the first instruction there resulted in the failing to generate due to missing COOKIE error: so I'm a little lost on how to get the module running in the first place if I'm unable to generate the necessary configs for it, and I ended up here while searching duckduckgo for the no such COOKIE message. |
This should work as a workaround for the time being @wolfsprite. $ dd if=/dev/urandom bs=1 count=16 | hexdump -e '16/1 "%02x"' > /tmp/pleroma-cookie
$ export RELEASE_COOKIE=/tmp/pleroma-cookie then you should be able to run any |
That worked! Thanks for the assistance there. :3 edit: I did also have to manually make the Do you want to deduplicate uploaded files? (y/n) [n] y
** (File.Error) could not make directory (with -p) "/var/lib/pleroma/static": no such file or directory
(elixir 1.13.4) lib/file.ex:316: File.mkdir_p!/1
(elixir 1.13.4) lib/enum.ex:1593: Enum."-map/2-lists^map/1-0-"/2
(pleroma 2.4.3) lib/mix/tasks/pleroma/instance.ex:250: Mix.Tasks.Pleroma.Instance.run/1
(stdlib 3.17) erl_eval.erl:685: :erl_eval.do_apply/6
(elixir 1.13.4) lib/code.ex:404: Code.validated_eval_string/3 For anyone else that may encounter this: just make sure that the directory you tell |
Describe the bug
Pleroma fails to run due to missing cookie file. This causes no issues with the NixOS module as it overloads the pleroma derivation's
cookieFile
argument, but renders the default build unusable without explicitly settingRELEASE_COOKIE
.This is an issue due to
pleroma_ctl instance gen
, the intended way to generate a config for a fresh instance, calling into pleroma in order to run. It's worth noting usingpleroma_ctl instance gen
is the intended way to generate a config for the NixOS module and set up the postgresql database as per the NixOS docs for the module.Steps To Reproduce
On nixpkgs master:
Expected behavior
pleroma_ctl
running and generating the config.exs and setup.psql files.Notify maintainers
@petabyteboy
@ninjatrappeur
@yu-re-ka
@kloenk
Metadata
I did however explicitly use nixpkgs master for testing this, as so:
The text was updated successfully, but these errors were encountered: