Akkoma Docker install - issue with ecto.migrate

Hello,

I’m trying to use the docker install of Akkoma to setup my own instance on a raspberry pi4.
I followed everything without issues, used the default params for everything except the domain obviously.
but when i reached the part :

docker-compose run --rm akkoma psql -h db -U akkoma -f config/setup_db.psql

i have this on screen :

Password for user akkoma: 
psql:config/setup_db.psql:1: ERROR:  role "akkoma" already exists
psql:config/setup_db.psql:2: ERROR:  database "akkoma" already exists
psql (14.5, server 14.6)
You are now connected to database "akkoma" as user "akkoma".
CREATE EXTENSION
CREATE EXTENSION
CREATE EXTENSION

which seems weird but ok. The next step is where the issue arise.
I do the ecto.migrate after stopping the akkoma_db_runXXX container and it gives me this :

19:22:07.252 [error] Postgrex.Protocol (#PID<0.4595.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "akkoma"
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 40924ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:

  1. Ensuring your database is available and that you can connect to it
  2. Tracking down slow queries and making sure they are running fast enough
  3. Increasing the pool_size (although this increases resource consumption)
  4. Allowing requests to wait longer by increasing :queue_target and :queue_interval

See DBConnection.start_link/2 for more information

    (ecto_sql 3.9.1) lib/ecto/adapters/sql.ex:913: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.13.4) lib/enum.ex:1593: Enum."-map/2-lists^map/1-0-"/2
    (ecto_sql 3.9.1) lib/ecto/adapters/sql.ex:1005: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.9.1) lib/ecto/migrator.ex:677: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.9.1) lib/ecto/migrator.ex:491: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.9.1) lib/ecto/migrator.ex:403: Ecto.Migrator.run/4
    (ecto_sql 3.9.1) lib/ecto/migrator.ex:146: Ecto.Migrator.with_repo/3
    (pleroma 3.5.0-14-gd9508474) lib/mix/tasks/pleroma/ecto/migrate.ex:63: Mix.Tasks.Pleroma.Ecto.Migrate.run/1

I do not understand why the password is not the good one when i changed nothing from the default settings.
I try to look around the web but unfortunately i did not see this issue somewhere.

Thanks in advance for the help !

you almost certainly set a value when you ran instance.gen - my money is on you having clicked through and autogenerating a password

ensure that the value in config/prod.secret.exs matches the value in the docker-compose.yml

also check config/setup_db.psql for the same

if you’re running both on defaults, the passwords listed in each should be akkoma

That was indeed the issue !
I thought the ‘not auto-generated’ part meant it was by default akkoma, not auto-generated, my bad here !

Thanks for the advice !
I ran into a new issue tho… would you be kind enough to have a look please ?

20:40:32.219 [error] GenServer {Postgrex.TypeManager, {Postgrex.DefaultTypes, {'db', 5432, "akkoma"}}} terminating
** (MatchError) no match of right hand side value: false
    (postgrex 0.16.5) lib/postgrex/types.ex:137: anonymous fn/3 in Postgrex.Types.associate_type_infos/2
    (elixir 1.13.4) lib/enum.ex:2396: Enum."-reduce/3-lists^foldl/2-0-"/3
    (postgrex 0.16.5) lib/postgrex/types.ex:136: Postgrex.Types.associate_type_infos/2
    (postgrex 0.16.5) lib/postgrex/type_server.ex:130: Postgrex.TypeServer.associate/3
    (stdlib 3.17.2.1) gen_server.erl:721: :gen_server.try_handle_call/4
    (stdlib 3.17.2.1) gen_server.erl:750: :gen_server.handle_msg/6
    (stdlib 3.17.2.1) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Last message (from #PID<0.4595.0>): {:update, #Reference<0.3632477494.1617952770.161341>, [%Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "boolin", oid: 16, output: "boolout", receive: "boolrecv", send: "boolsend", type: "bool"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "byteain", oid: 17, output: "byteaout", receive: "bytearecv", send: "byteasend", type: "bytea"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "charin", oid: 18, output: "charout", receive: "charrecv", send: "charsend", type: "char"}, %Postgrex.TypeInfo{array_elem: 18, base_type: 0, comp_elems: [], input: "namein", oid: 19, output: "nameout", receive: "namerecv", send: "namesend", type: "name"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "int8in", oid: 20, output: "int8out", receive: "int8recv", send: "int8send", type: "int8"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "int2in", oid: 21, output: "int2out", receive: "int2recv", send: "int2send", type: "int2"}, %Postgrex.TypeInfo{array_elem: 21, base_type: 0, comp_elems: [], input: "int2vectorin", oid: 22, output: "int2vectorout", receive: "int2vectorrecv", send: "int2vectorsend", type: "int2vector"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "int4in", oid: 23, output: "int4out", receive: "int4recv", send: "int4send", type: "int4"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "regprocin", oid: 24, output: "regprocout", receive: "regprocrecv", send: "regprocsend", type: "regproc"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "textin", oid: 25, output: "textout", receive: "textrecv", send: "textsend", type: "text"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "oidin", oid: 26, output: "oidout", receive: "oidrecv", send: "oidsend", type: "oid"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "tidin", oid: 27, output: "tidout", receive: "tidrecv", send: "tidsend", type: "tid"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "xidin", oid: 28, output: "xidout", receive: "xidrecv", send: "xidsend", type: "xid"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "cidin", oid: 29, output: "cidout", receive: "cidrecv", send: "cidsend", type: "cid"}, %Postgrex.TypeInfo{array_elem: 26, base_type: 0, comp_elems: [], input: "oidvectorin", oid: 30, output: "oidvectorout", receive: "oidvectorrecv", send: "oidvectorsend", type: "oidvector"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "json_in", oid: 114, output: "json_out", receive: "json_recv", send: "json_send", type: "json"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "xml_in", oid: 142, output: "xml_out", receive: "xml_recv", send: "xml_send", type: "xml"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "pg_node_tree_in", oid: 194, output: "pg_node_tree_out", receive: "pg_node_tree_recv", send: "pg_node_tree_send", type: "pg_node_tree"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "pg_ndistinct_in", oid: 3361, output: "pg_ndistinct_out", receive: "pg_ndistinct_recv", send: "pg_ndistinct_send", type: "pg_ndistinct"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "pg_dependencies_in", oid: 3402, output: "pg_dependencies_out", receive: "pg_dependencies_recv", send: "pg_dependencies_send", type: "pg_dependencies"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "pg_mcv_list_in", oid: 5017, output: "pg_mcv_list_out", receive: "pg_mcv_list_recv", send: "pg_mcv_list_send", type: "pg_mcv_list"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "pg_ddl_command_in", oid: 32, output: "pg_ddl_command_out", receive: "pg_ddl_command_recv", send: "pg_ddl_command_send", type: "pg_ddl_command"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "xid8in", oid: 5069, output: "xid8out", receive: "xid8recv", send: "xid8send", type: "xid8"}, %Postgrex.TypeInfo{array_elem: 701, base_type: 0, comp_elems: [], input: "point_in", oid: 600, output: "point_out", receive: "point_recv", send: "point_send", type: "point"}, %Postgrex.TypeInfo{array_elem: 600, base_type: 0, comp_elems: [], input: "lseg_in", oid: 601, output: "lseg_out", receive: "lseg_recv", send: "lseg_send", type: "lseg"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "path_in", oid: 602, output: "path_out", receive: "path_recv", send: "path_send", type: "path"}, %Postgrex.TypeInfo{array_elem: 600, base_type: 0, comp_elems: [], input: "box_in", oid: 603, output: "box_out", receive: "box_recv", send: "box_send", type: "box"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "poly_in", oid: 604, output: "poly_out", receive: "poly_recv", send: "poly_send", type: "polygon"}, %Postgrex.TypeInfo{array_elem: 701, base_type: 0, comp_elems: [], input: "line_in", oid: 628, output: "line_out", receive: "line_recv", send: "line_send", type: "line"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "float4in", oid: 700, output: "float4out", receive: "float4recv", send: "float4send", type: "float4"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "float8in", oid: 701, output: "float8out", receive: "float8recv", send: "float8send", type: "float8"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "unknownin", oid: 705, output: "unknownout", receive: "unknownrecv", send: "unknownsend", type: "unknown"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "circle_in", oid: 718, output: "circle_out", receive: "circle_recv", send: "circle_send", type: "circle"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "cash_in", oid: 790, output: "cash_out", receive: "cash_recv", send: "cash_send", type: "money"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "macaddr_in", oid: 829, output: "macaddr_out", receive: "macaddr_recv", send: "macaddr_send", type: "macaddr"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "inet_in", oid: 869, output: "inet_out", receive: "inet_recv", send: "inet_send", type: "inet"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "cidr_in", oid: 650, output: "cidr_out", receive: "cidr_recv", send: "cidr_send", type: "cidr"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "macaddr8_in", oid: 774, output: "macaddr8_out", receive: "macaddr8_recv", send: "macaddr8_send", type: "macaddr8"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "aclitemin", oid: 1033, output: "aclitemout", receive: "-", send: "-", ...}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "bpcharin", oid: 1042, output: "bpcharout", receive: "bpcharrecv", ...}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "varcharin", oid: 1043, output: "varcharout", ...}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "date_in", oid: 1082, ...}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "time_in", ...}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], ...}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, ...}, %Postgrex.TypeInfo{array_elem: 0, ...}, %Postgrex.TypeInfo{...}, ...]}

20:40:32.468 [error] GenServer {Postgrex.TypeManager, {Postgrex.DefaultTypes, {'db', 5432, "akkoma"}}} terminating
** (MatchError) no match of right hand side value: false
    (postgrex 0.16.5) lib/postgrex/types.ex:137: anonymous fn/3 in Postgrex.Types.associate_type_infos/2
    (elixir 1.13.4) lib/enum.ex:2396: Enum."-reduce/3-lists^foldl/2-0-"/3
    (postgrex 0.16.5) lib/postgrex/types.ex:136: Postgrex.Types.associate_type_infos/2
    (postgrex 0.16.5) lib/postgrex/type_server.ex:130: Postgrex.TypeServer.associate/3
    (stdlib 3.17.2.1) gen_server.erl:721: :gen_server.try_handle_call/4
    (stdlib 3.17.2.1) gen_server.erl:750: :gen_server.handle_msg/6
    (stdlib 3.17.2.1) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Last message (from #PID<0.4602.0>): {:update, #Reference<0.3632477494.1617952770.161433>, [%Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "boolin", oid: 16, output: "boolout", receive: "boolrecv", send: "boolsend", type: "bool"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "byteain", oid: 17, output: "byteaout", receive: "bytearecv", send: "byteasend", type: "bytea"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "charin", oid: 18, output: "charout", receive: "charrecv", send: "charsend", type: "char"}, %Postgrex.TypeInfo{array_elem: 18, base_type: 0, comp_elems: [], input: "namein", oid: 19, output: "nameout", receive: "namerecv", send: "namesend", type: "name"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "int8in", oid: 20, output: "int8out", receive: "int8recv", send: "int8send", type: "int8"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "int2in", oid: 21, output: "int2out", receive: "int2recv", send: "int2send", type: "int2"}, %Postgrex.TypeInfo{array_elem: 21, base_type: 0, comp_elems: [], input: "int2vectorin", oid: 22, output: "int2vectorout", receive: "int2vectorrecv", send: "int2vectorsend", type: "int2vector"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "int4in", oid: 23, output: "int4out", receive: "int4recv", send: "int4send", type: "int4"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "regprocin", oid: 24, output: "regprocout", receive: "regprocrecv", send: "regprocsend", type: "regproc"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "textin", oid: 25, output: "textout", receive: "textrecv", send: "textsend", type: "text"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "oidin", oid: 26, output: "oidout", receive: "oidrecv", send: "oidsend", type: "oid"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "tidin", oid: 27, output: "tidout", receive: "tidrecv", send: "tidsend", type: "tid"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "xidin", oid: 28, output: "xidout", receive: "xidrecv", send: "xidsend", type: "xid"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "cidin", oid: 29, output: "cidout", receive: "cidrecv", send: "cidsend", type: "cid"}, %Postgrex.TypeInfo{array_elem: 26, base_type: 0, comp_elems: [], input: "oidvectorin", oid: 30, output: "oidvectorout", receive: "oidvectorrecv", send: "oidvectorsend", type: "oidvector"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "json_in", oid: 114, output: "json_out", receive: "json_recv", send: "json_send", type: "json"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "xml_in", oid: 142, output: "xml_out", receive: "xml_recv", send: "xml_send", type: "xml"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "pg_node_tree_in", oid: 194, output: "pg_node_tree_out", receive: "pg_node_tree_recv", send: "pg_node_tree_send", type: "pg_node_tree"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "pg_ndistinct_in", oid: 3361, output: "pg_ndistinct_out", receive: "pg_ndistinct_recv", send: "pg_ndistinct_send", type: "pg_ndistinct"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "pg_dependencies_in", oid: 3402, output: "pg_dependencies_out", receive: "pg_dependencies_recv", send: "pg_dependencies_send", type: "pg_dependencies"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "pg_mcv_list_in", oid: 5017, output: "pg_mcv_list_out", receive: "pg_mcv_list_recv", send: "pg_mcv_list_send", type: "pg_mcv_list"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "pg_ddl_command_in", oid: 32, output: "pg_ddl_command_out", receive: "pg_ddl_command_recv", send: "pg_ddl_command_send", type: "pg_ddl_command"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "xid8in", oid: 5069, output: "xid8out", receive: "xid8recv", send: "xid8send", type: "xid8"}, %Postgrex.TypeInfo{array_elem: 701, base_type: 0, comp_elems: [], input: "point_in", oid: 600, output: "point_out", receive: "point_recv", send: "point_send", type: "point"}, %Postgrex.TypeInfo{array_elem: 600, base_type: 0, comp_elems: [], input: "lseg_in", oid: 601, output: "lseg_out", receive: "lseg_recv", send: "lseg_send", type: "lseg"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "path_in", oid: 602, output: "path_out", receive: "path_recv", send: "path_send", type: "path"}, %Postgrex.TypeInfo{array_elem: 600, base_type: 0, comp_elems: [], input: "box_in", oid: 603, output: "box_out", receive: "box_recv", send: "box_send", type: "box"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "poly_in", oid: 604, output: "poly_out", receive: "poly_recv", send: "poly_send", type: "polygon"}, %Postgrex.TypeInfo{array_elem: 701, base_type: 0, comp_elems: [], input: "line_in", oid: 628, output: "line_out", receive: "line_recv", send: "line_send", type: "line"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "float4in", oid: 700, output: "float4out", receive: "float4recv", send: "float4send", type: "float4"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "float8in", oid: 701, output: "float8out", receive: "float8recv", send: "float8send", type: "float8"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "unknownin", oid: 705, output: "unknownout", receive: "unknownrecv", send: "unknownsend", type: "unknown"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "circle_in", oid: 718, output: "circle_out", receive: "circle_recv", send: "circle_send", type: "circle"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "cash_in", oid: 790, output: "cash_out", receive: "cash_recv", send: "cash_send", type: "money"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "macaddr_in", oid: 829, output: "macaddr_out", receive: "macaddr_recv", send: "macaddr_send", type: "macaddr"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "inet_in", oid: 869, output: "inet_out", receive: "inet_recv", send: "inet_send", type: "inet"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "cidr_in", oid: 650, output: "cidr_out", receive: "cidr_recv", send: "cidr_send", type: "cidr"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "macaddr8_in", oid: 774, output: "macaddr8_out", receive: "macaddr8_recv", send: "macaddr8_send", type: "macaddr8"}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "aclitemin", oid: 1033, output: "aclitemout", receive: "-", send: "-", ...}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "bpcharin", oid: 1042, output: "bpcharout", receive: "bpcharrecv", ...}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "varcharin", oid: 1043, output: "varcharout", ...}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "date_in", oid: 1082, ...}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], input: "time_in", ...}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, comp_elems: [], ...}, %Postgrex.TypeInfo{array_elem: 0, base_type: 0, ...}, %Postgrex.TypeInfo{array_elem: 0, ...}, %Postgrex.TypeInfo{...}, ...]}
** (EXIT from #PID<0.94.0>) shutdown

what did you run to get to this?

i’ve never seen anything like that

I stopped the docker container then use “–force” to change the setup during the instance generation.
I should probably remove everything and start from scratch !
I’ll try that and keep you updated.

Well everything went great with a clean start !
Thanks a lot for your time and your answers, have a great day