Problem with Phoenix #289
Labels
No labels
approved, awaiting change
bug
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs docs
needs tests
not a bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma#289
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I try to move from Pleroma to Akkoma in a Docker, but I keep encountering this error when I try to start the Pleroma_web container, any idea how I could fix it?
2022-11-18T12:22:54.416543256Z stdout -- Waiting for database...
2022-11-18T12:22:53.168659349Z stdout (elixir 1.13.4) lib/kernel/parallel_compiler.ex:346: anonymous fn/5 in Kernel.ParallelCompiler.spawn_workers/7
2022-11-18T12:22:53.168624144Z stdout | ^
2022-11-18T12:22:53.168579995Z stdout 1 | defmodule <%= inspect auth_module %> do
2022-11-18T12:22:53.168545021Z stdout |
2022-11-18T12:22:53.168492224Z stdout ** (SyntaxError) lib/phoenix-1.6.11/priv/templates/phx.gen.auth/auth.ex:1:13: syntax error before: '='
2022-11-18T12:22:53.168382921Z stdout == Compilation error in file lib/phoenix-1.6.11/priv/templates/phx.gen.auth/auth.ex ==
gonna need way more info here -
pleroma_web
isn't a container that we have in our supported socker-compose fileare you using some external repo?
Was coming from this installation : https://github.com/angristan/docker-pleroma
Changed this in the Dockerfile :
FROM elixir:1.13-alpine
RUN git clone -b stable https://akkoma.dev/AkkomaGang/akkoma.git /pleroma \
Reimported the pleroma_db to a new container then when I try to start it back I have the phoenix error :/
i would highly recommend saving your
pleroma_db
container and using it in the official docker-compose methodhttps://docs.akkoma.dev/stable/installation/docker_en/
Tried it, but then the container got stuck with errors like this and never started :/
10:13:37.384 [error] QUERY OK db=0.4ms
server_1 | begin []
server_1 |
server_1 |
server_1 | 10:13:37.388 [error] QUERY OK source="oban_jobs" db=2.8ms
server_1 | UPDATE "public"."oban_jobs" AS o0 SET "state" = $1 WHERE (o0."id" IN (SELECT so0."id" FROM "public"."oban_jobs" AS so0 WHERE (so0."state" IN ('scheduled','retryable')) AND (so0."queue" = $2) AND (so0."scheduled_at" <= $3) FOR UPDATE SKIP LOCKED)) ["available", "token_expiration", ~U[2022-11-18 10:13:37.384205Z]]
did you run migrations?
those logs alone doesn't show anything really
Yes as I was coming from an older version of Postgres, I remimported the database through sudo docker-compose exec -T db psql -U pleroma < dumpfile, did I forgot something?
by migrations, i mean did you run
./docker-resources/manage.sh mix ecto.migrate
?Could proceed as at this line :
"docker-compose run --rm akkoma psql -h db -U akkoma -f config/setup_db.psql"
It returned an error:
psql: error: could not translate host name "db" to address: Name does not resolve
yes, there are setup steps above it
you need to get the DB running
I'll try to restart from the start
https://docs.akkoma.dev/stable/installation/docker_en/#setting-up-the-database
Just one question when should I run the db import? After or before the ecto.migrate?
before
Ok, first problem I encounter is this one:
addgroup: gid '0' in use
The command '/bin/sh -c addgroup -g $GID $UNAME' returned a non-zero code: 1
Do I edit the build.sh to force use of another UIG/GID ?
Sorry so much for the questions, I'm not used to dig that much in Docker so it's beyond my skills
the only chance you have to run into this issue is if you
Ok I was indeed using sudo, as when I try to not use it it gives me a Permission Denied when trying to run docker-compose, but it might be due to something blocking it in Synology
sudo usermod -a -G docker <myuser>
then re-login
Synology refuses usermod, I had to do the following steps:https://davejansen.com/manage-docker-without-needing-sudo-on-your-synology-nas
But now it gives the same error with
addgroup: gid '100' in use
The command '/bin/sh -c addgroup -g $GID $UNAME' returned a non-zero code: 1
can't really help you with custom linux distributions, you're on your own here
Ok I forced a GUID & UID in build.sh and it was able to build :) Now reaching the steps for the db it gives this :
Creating akkoma_db_run ... done
akkoma_db_run_615f5c9efd58
[NASAADRESS]:/volume1/docker/akkoma$ docker-compose run --rm akkoma psql -h db -U akkoma -f config/setup_db.psql
Creating akkoma_akkoma_run ... done
psql: error: could not translate host name "db" to address: Name does not resolve
ERROR: 2
It does look like the db has permissions issues too
2022-11-18T13:29:01.713147361Z stdout fixing permissions on existing directory /var/lib/postgresql/data ...
2022-11-18T13:29:01.682355179Z stdout
2022-11-18T13:29:01.682313173Z stdout Data page checksums are disabled.
2022-11-18T13:29:01.682278413Z stdout
2022-11-18T13:29:01.682228303Z stdout The default text search configuration will be set to "english".
2022-11-18T13:29:01.682181329Z stdout The default database encoding has accordingly been set to "UTF8".
2022-11-18T13:29:01.682052738Z stdout The database cluster will be initialized with locale "en_US.utf8".
2022-11-18T13:29:01.682046887Z stderr initdb: error: could not change permissions of directory "/var/lib/postgresql/data": Operation not permitted