凤凰服务器不会开始 - Postgrex失败(退出)没有进程

时间:2016-10-03 13:39:58

标签: elixir phoenix-framework

尝试通过mix phoenix.server启动时,会报告以下错误,直到服务器被终止:

    ** (stop) exited in: GenServer.call(Postgrex.TypeServer, {:fetch, {'localhost', 5432, "database_name", :copy, [{Ecto.Adapters.Postgres.DateTime, []}, {Postgrex.Extensions.JSON, [library: nil]}]}}, 60000)

数据库和权限都已经过验证。

完整的堆栈跟踪:

    Last message: nil
    State: Postgrex.Protocol
    [error] GenServer #PID<0.820.0> terminating
    ** (stop) exited in: GenServer.call(Postgrex.TypeServer, {:fetch, {'localhost', 5432, "database_name", :copy, [{Ecto.Adapters.Postgres.DateTime, []}, {Postgrex.Extensions.JSON, [library: nil]}]}}, 60000)
        ** (EXIT) no process
        (elixir) lib/gen_server.ex:596: GenServer.call/3
        lib/postgrex/protocol.ex:486: Postgrex.Protocol.bootstrap/3
        lib/postgrex/protocol.ex:353: Postgrex.Protocol.handshake/2
        lib/db_connection/connection.ex:134: DBConnection.Connection.connect/2
        lib/connection.ex:622: Connection.enter_connect/5
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3

1 个答案:

答案 0 :(得分:1)

确保您应用的mix.exs文件列出:postgrex作为依赖项。

例如:

    def application do
      [mod: {Chat, []},
      applications: [:phoenix, :phoenix_html, :cowboy, :logger, :postgrex]]
    end