迁移时,使用edeliver部署phoenix失败

时间:2017-10-12 22:04:22

标签: elixir phoenix-framework edeliver

当我运行mix edeliver migrate production时,我收到此错误:

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}]}]}}

我做了remote_console和Application.get_all_env(:example)来检查数据库详细信息,它们是正确的。我正在同一服务器和数据库上部署另一个凤凰应用程序。

我尝试在两个应用程序上更改池大小,没有帮助。

我想我可能做了一些小错误但由于有线错误而无法精确定位。

1 个答案:

答案 0 :(得分:0)

好吧,所以一年多以后,在使用edeliver / distilery进行部署时,我仍然遇到这些模糊的消息迁移错误。

我发现最好的解决方案是启用远程数据库访问并修改dev.exs配置以临时使用生产数据库。然后运行mix ecto.migrate显示实际错误,在我当前的情况下是:

permission denied to create extension "pg_trgm"