key not found: "OTP_SECRET" #14

Closed
opened 2024-11-07 19:18:32 +00:00 by ammaratef45 · 7 comments
Owner

I'm getting this error

r2024-11-07T19:08:49.476222095Z 2024-11-07T19:08:49.476Z pid=9 tid=76l WARN: KeyError: key not found: "OTP_SECRET"
@2024-11-07T19:08:49.524813727Z Did you mean?  "OTP_SECRET_FILE"

My config is the same as default one

I tried adding OTP_SECRET to the compose file as an env variable but that didn't help too

I'm getting this error ``` r2024-11-07T19:08:49.476222095Z 2024-11-07T19:08:49.476Z pid=9 tid=76l WARN: KeyError: key not found: "OTP_SECRET" @2024-11-07T19:08:49.524813727Z Did you mean? "OTP_SECRET_FILE" ``` My config is the same as default one I tried adding OTP_SECRET to the compose file as an env variable but that didn't help too
Owner

That's strange because we expose OTP_SECRET_FILE in the compose.yml 🤔 I see there was a version bump in the latest commit, so maybe something changed internally? If it is really demanding a OTP_SECRET then you could try the same trick as

export DB_PASS=$(cat /run/secrets/db_password)
(and bump the version in abra.sh) as a work-around? I'm not sure, this needs a further look. It's an masto app error? 🤔

That's strange because we expose `OTP_SECRET_FILE` in the `compose.yml` 🤔 I see there was a version bump in the latest commit, so maybe something changed internally? If it is really demanding a `OTP_SECRET` then you could try the same trick as https://git.coopcloud.tech/coop-cloud/mastodon/src/commit/0168577d6513a7577b80beea8d26528440cda755/entrypoint.sh.tmpl#L5 (and bump the version in `abra.sh`) as a work-around? I'm not sure, this needs a further look. It's an masto app error? 🤔
Author
Owner

I followed your suggestion but started running into more errors, then noticed I haven't been following the readme (e.g. I have generated the secrets using abra app secret rather than abra app cmd)

let me know if you would rather resolve this issue and continue the discussion in a newly created one but I started getting this error

abra app cmd -l <domain> secrets                                                    ─╯
Generating secrets for a new Mastodon deployment...

Unable to find image 'tootsuite/mastodon:v4.1.0' locally
v4.1.0: Pulling from tootsuite/mastodon
6064e7e5b6af: Pulling fs layer
0815621f975a: Pulling fs layer
1c3cc2d18d0d: Pulling fs layer
9e3c464200a3: Pulling fs layer
395b5b7d523c: Pulling fs layer
ae093a459952: Pulling fs layer
0327e4855390: Pulling fs layer
267478c84a0c: Pulling fs layer
df737182669e: Pulling fs layer
4f4fb700ef54: Pulling fs layer
cfead245367e: Pulling fs layer
0327e4855390: Waiting
267478c84a0c: Waiting
df737182669e: Waiting
4f4fb700ef54: Waiting
cfead245367e: Waiting
9e3c464200a3: Waiting
ae093a459952: Waiting
395b5b7d523c: Waiting
0815621f975a: Download complete
9e3c464200a3: Verifying Checksum
9e3c464200a3: Download complete
395b5b7d523c: Verifying Checksum
395b5b7d523c: Download complete
6064e7e5b6af: Verifying Checksum
6064e7e5b6af: Download complete
1c3cc2d18d0d: Download complete
6064e7e5b6af: Pull complete
0815621f975a: Pull complete
1c3cc2d18d0d: Pull complete
9e3c464200a3: Pull complete
395b5b7d523c: Pull complete
267478c84a0c: Verifying Checksum
267478c84a0c: Download complete
ae093a459952: Verifying Checksum
ae093a459952: Download complete
4f4fb700ef54: Download complete
ae093a459952: Pull complete
cfead245367e: Verifying Checksum
cfead245367e: Download complete
df737182669e: Verifying Checksum
df737182669e: Download complete
0327e4855390: Verifying Checksum
0327e4855390: Download complete
0327e4855390: Pull complete
267478c84a0c: Pull complete
df737182669e: Pull complete
4f4fb700ef54: Pull complete
cfead245367e: Pull complete
Digest: sha256:638775248b28a1bac10cecd3a5cc976f5589e8884331928d27cfe0657181c322
Status: Downloaded newer image for tootsuite/mastodon:v4.1.0
time="2024-11-15T12:35:56-08:00" level=info msg="<DOMAIN>_secret_key_base_v1 successfully stored on server"
SECRET_KEY_BASE = ****************************
time="2024-11-15T12:36:00-08:00" level=info msg="<DOMAIN>_otp_secret_v1 successfully stored on server"
OTP_SECRET = ***************************

grep: invalid option -- P
usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]]
	[-e pattern] [-f file] [--binary-files=value] [--color=when]
	[--context[=num]] [--directories=action] [--label] [--line-buffered]
	[--null] [pattern] [file ...]
FATA[0080] exit status 2
I followed your suggestion but started running into more errors, then noticed I haven't been following the readme (e.g. I have generated the secrets using `abra app secret` rather than `abra app cmd`) let me know if you would rather resolve this issue and continue the discussion in a newly created one but I started getting this error ``` abra app cmd -l <domain> secrets ─╯ Generating secrets for a new Mastodon deployment... Unable to find image 'tootsuite/mastodon:v4.1.0' locally v4.1.0: Pulling from tootsuite/mastodon 6064e7e5b6af: Pulling fs layer 0815621f975a: Pulling fs layer 1c3cc2d18d0d: Pulling fs layer 9e3c464200a3: Pulling fs layer 395b5b7d523c: Pulling fs layer ae093a459952: Pulling fs layer 0327e4855390: Pulling fs layer 267478c84a0c: Pulling fs layer df737182669e: Pulling fs layer 4f4fb700ef54: Pulling fs layer cfead245367e: Pulling fs layer 0327e4855390: Waiting 267478c84a0c: Waiting df737182669e: Waiting 4f4fb700ef54: Waiting cfead245367e: Waiting 9e3c464200a3: Waiting ae093a459952: Waiting 395b5b7d523c: Waiting 0815621f975a: Download complete 9e3c464200a3: Verifying Checksum 9e3c464200a3: Download complete 395b5b7d523c: Verifying Checksum 395b5b7d523c: Download complete 6064e7e5b6af: Verifying Checksum 6064e7e5b6af: Download complete 1c3cc2d18d0d: Download complete 6064e7e5b6af: Pull complete 0815621f975a: Pull complete 1c3cc2d18d0d: Pull complete 9e3c464200a3: Pull complete 395b5b7d523c: Pull complete 267478c84a0c: Verifying Checksum 267478c84a0c: Download complete ae093a459952: Verifying Checksum ae093a459952: Download complete 4f4fb700ef54: Download complete ae093a459952: Pull complete cfead245367e: Verifying Checksum cfead245367e: Download complete df737182669e: Verifying Checksum df737182669e: Download complete 0327e4855390: Verifying Checksum 0327e4855390: Download complete 0327e4855390: Pull complete 267478c84a0c: Pull complete df737182669e: Pull complete 4f4fb700ef54: Pull complete cfead245367e: Pull complete Digest: sha256:638775248b28a1bac10cecd3a5cc976f5589e8884331928d27cfe0657181c322 Status: Downloaded newer image for tootsuite/mastodon:v4.1.0 time="2024-11-15T12:35:56-08:00" level=info msg="<DOMAIN>_secret_key_base_v1 successfully stored on server" SECRET_KEY_BASE = **************************** time="2024-11-15T12:36:00-08:00" level=info msg="<DOMAIN>_otp_secret_v1 successfully stored on server" OTP_SECRET = *************************** grep: invalid option -- P usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]] [-e pattern] [-f file] [--binary-files=value] [--color=when] [--context[=num]] [--directories=action] [--label] [--line-buffered] [--null] [pattern] [file ...] FATA[0080] exit status 2 ```
Author
Owner

https://stackoverflow.com/questions/16658333/grep-p-no-longer-works-how-can-i-rewrite-my-searches

it seems like my os is just not that good

I had to use ggrep instead of grep, even though I aliased grep to run ggrep and confirmed it works in terminal, the abra ssh script didn't fall for it :(

maybe I can modify the script to check current os and use ggrep if it's mac, or to check the grep version and make sure it's gnu not bsd otherwise try ggrep and alert the user to install ggrep if not available

https://stackoverflow.com/questions/16658333/grep-p-no-longer-works-how-can-i-rewrite-my-searches it seems like my os is just not that good I had to use `ggrep` instead of grep, even though I aliased grep to run ggrep and confirmed it works in terminal, the abra ssh script didn't fall for it :( maybe I can modify the script to check current os and use ggrep if it's mac, or to check the grep version and make sure it's gnu not bsd otherwise try ggrep and alert the user to install ggrep if not available
Owner

Oh dear goddesss @ammaratef45 you're really being put to the test by the universe here 😅 yeh some little function to cycle through and find a valid version of grep could work. Also, a docs patch might also help future travellers... up to you!

Oh dear goddesss @ammaratef45 you're really being put to the test by the universe here 😅 yeh some little function to cycle through and find a valid version of grep could work. Also, a docs patch might also help future travellers... up to you!
Author
Owner

Haha it's good that I'm running into these issues tbh, I'm not in a rush to deploy an instance so solving these issues might as well be good for the recipe itself

Haha it's good that I'm running into these issues tbh, I'm not in a rush to deploy an instance so solving these issues might as well be good for the recipe itself
Owner

I think entrypoint.sh was broken, I think I fixed it 6365f7b

@ammaratef45 working for you now? 👀

I think `entrypoint.sh` was broken, I think I fixed it 6365f7b @ammaratef45 working for you now? 👀
Author
Owner

Yaaay I'm seeing a different error

resolving this one to go dig in the new one 🔮

Yaaay I'm seeing a different error resolving this one to go dig in the new one 🔮
Sign in to join this conversation.
No Label
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: coop-cloud/mastodon#14
No description provided.