0

When I run mix edeliver migrate production I get this error:

production node:

  user    : deploy
  host    : myIP
  path    : /home/deploy
  response: RPC to 'bot@127.0.0.1' failed: {'EXIT',
                                {#{'__exception__' => true,
                                   '__struct__' =>
                                    'Elixir.DBConnection.ConnectionError',
                                   message =>
                                    <<"connection not available because of disconnection">>},
                                 [{'Elixir.DBConnection',checkout,2,
                                   [{file,"lib/db_connection.ex"},{line,926}]},
                                  {'Elixir.DBConnection',run,3,
                                   [{file,"lib/db_connection.ex"},{line,742}]},
                                  {'Elixir.DBConnection',run_meter,3,
                                   [{file,"lib/db_connection.ex"},
                                    {line,1133}]},
                                  {'Elixir.DBConnection',prepare_execute,4,
                                   [{file,"lib/db_connection.ex"},{line,584}]},
                                  {'Elixir.Ecto.Adapters.Postgres.Connection',
                                   execute,4,
                                   [{file,
                                     "lib/ecto/adapters/postgres/connection.ex"},
                                    {line,86}]},
                                  {'Elixir.Ecto.Adapters.SQL',sql_call,6,
                                   [{file,"lib/ecto/adapters/sql.ex"},
                                    {line,256}]},
                                  {'Elixir.Ecto.Adapters.SQL','query!',5,
                                   [{file,"lib/ecto/adapters/sql.ex"},
                                    {line,198}]},
                                  {'Elixir.Ecto.Adapters.Postgres',
                                   '-execute_ddl/3-fun-0-',4,
                                   [{file,"lib/ecto/adapters/postgres.ex"},
                                    {line,85}]}]}}

I did remote_console and Application.get_all_env(:example) to check DB details and they are correct. I am deploying another phoenix application on the same server and database works.

I tried changing pool size on both applications, didn't help.

I think I probably did something small wrong but can't pinpoint due to wired error.

Nema Ga
  • 2,450
  • 4
  • 26
  • 49
  • Does your database user have a password? https://github.com/edeliver/edeliver/issues/113 was resolved by adding a password to the database user. The error message is identical to yours. – Dogbert Oct 13 '17 at 03:00
  • Yes, I looked at this issue - It has both. – Nema Ga Oct 13 '17 at 07:09

1 Answers1

0

Ok, so over a year later and I still keep running into these vague message migration errors when deploying with edeliver/distilery.

I found the best solution to be enabling remote DB access and modifying dev.exs config to temporarily use production DB. Then running mix ecto.migrate shows the actual error, which in my current case was:

permission denied to create extension "pg_trgm"

Nema Ga
  • 2,450
  • 4
  • 26
  • 49