无法将Phoenix 1.3.0-rc1部署到Heroku,构建但崩溃

时间:2017-03-31 12:36:42

标签: heroku deployment phoenix-framework

我正在尝试将Phoenix 1.3.0-rc1部署到Heroku。

它构建正常,但我无法访问该网站。注意到我可以在我的机器上运行Phoenix时访问应用程序。

还值得注意的是我正在使用SSL。

这是$ heroku logs --tail输出:


2017-03-31T01:45:15.876452+00:00 app[api]: Release v14 created by user me@jonathansoifer.com
2017-03-31T01:44:31.000000+00:00 app[api]: Build succeeded
2017-03-31T01:45:21.350931+00:00 heroku[web.1]: Starting process with command `MIX_ENV=prod mix phx.server`
2017-03-31T01:45:23.798042+00:00 app[web.1]:     exited: {{shutdown,
2017-03-31T01:45:23.798041+00:00 app[web.1]:     application: customer_acquisition
2017-03-31T01:45:23.798015+00:00 app[web.1]:
2017-03-31T01:45:23.798040+00:00 app[web.1]: =INFO REPORT==== 31-Mar-2017::01:45:23 ===
2017-03-31T01:45:23.798042+00:00 app[web.1]:               {failed_to_start_child,
2017-03-31T01:45:23.798043+00:00 app[web.1]:                'Elixir.CustomerAcquisition.Web.Endpoint',
2017-03-31T01:45:23.798044+00:00 app[web.1]:                {shutdown,
2017-03-31T01:45:23.798051+00:00 app[web.1]:                 {failed_to_start_child,'Elixir.Phoenix.Endpoint.Handler',
2017-03-31T01:45:23.798052+00:00 app[web.1]:                  {shutdown,
2017-03-31T01:45:23.798053+00:00 app[web.1]:                    {ranch_listener_sup,
2017-03-31T01:45:23.798053+00:00 app[web.1]:                   {failed_to_start_child,
2017-03-31T01:45:23.798054+00:00 app[web.1]:                     'Elixir.CustomerAcquisition.Web.Endpoint.HTTP'},
2017-03-31T01:45:23.798054+00:00 app[web.1]:                    {'EXIT',
2017-03-31T01:45:23.798055+00:00 app[web.1]:                     {noproc,
2017-03-31T01:45:23.798056+00:00 app[web.1]:                      {gen_server,call,
2017-03-31T01:45:23.798057+00:00 app[web.1]:                        {set_new_listener_opts,
2017-03-31T01:45:23.798056+00:00 app[web.1]:                       [ranch_server,
2017-03-31T01:45:23.798058+00:00 app[web.1]:                         'Elixir.CustomerAcquisition.Web.Endpoint.HTTP',16384,
2017-03-31T01:45:23.798058+00:00 app[web.1]:                         [{env,
2017-03-31T01:45:23.798059+00:00 app[web.1]:                           [{dispatch,
2017-03-31T01:45:23.798060+00:00 app[web.1]:                             [{'_',[],
2017-03-31T01:45:23.798060+00:00 app[web.1]:                               [{[>,>],
2017-03-31T01:45:23.798061+00:00 app[web.1]:                                 [],'Elixir.Phoenix.Endpoint.CowboyWebSocket',
2017-03-31T01:45:23.798062+00:00 app[web.1]:                                 {'Elixir.Phoenix.Transports.WebSocket',
2017-03-31T01:45:23.798062+00:00 app[web.1]:                                  {'Elixir.CustomerAcquisition.Web.Endpoint',
2017-03-31T01:45:23.798063+00:00 app[web.1]:                                   'Elixir.CustomerAcquisition.Web.UserSocket',
2017-03-31T01:45:23.798063+00:00 app[web.1]:                                   websocket}}},
2017-03-31T01:45:23.798064+00:00 app[web.1]:                                {'_',[],'Elixir.Plug.Adapters.Cowboy.Handler',
2017-03-31T01:45:23.798064+00:00 app[web.1]:                                 {'Elixir.CustomerAcquisition.Web.Endpoint',
2017-03-31T01:45:23.798065+00:00 app[web.1]:                                  []}}]}]}]}]}]}}}}}}}}},
2017-03-31T01:45:23.798066+00:00 app[web.1]:              {'Elixir.CustomerAcquisition.Application',start,[normal,[]]}}
2017-03-31T01:45:23.798066+00:00 app[web.1]:     type: permanent
2017-03-31T01:45:23.870799+00:00 app[web.1]: ** (exit) exited in: GenServer.call(Mix.State, {:get, {Map, :get, [:debug, false]}}, 5000)
2017-03-31T01:45:23.870801+00:00 app[web.1]:     ** (EXIT) no process
2017-03-31T01:45:23.870802+00:00 app[web.1]:     (elixir) lib/gen_server.ex:596: GenServer.call/3
2017-03-31T01:45:23.870803+00:00 app[web.1]:     (mix) lib/mix/cli.ex:65: Mix.CLI.run_task/2
2017-03-31T01:45:23.870804+00:00 app[web.1]:     (elixir) lib/code.ex:363: Code.require_file/2
2017-03-31T01:45:23.870804+00:00 app[web.1]:
2017-03-31T01:45:23.870999+00:00 app[web.1]: {"init terminating in do_boot",{noproc,{gen_server,call,[elixir_config,{get_and_put,at_exit,[]}]}}}
2017-03-31T01:45:23.871019+00:00 app[web.1]: init terminating in do_boot ()
2017-03-31T01:45:23.871288+00:00 app[web.1]:
2017-03-31T01:45:25.175329+00:00 app[web.1]: Crash dump is being written to: erl_crash.dump...done
2017-03-31T01:45:25.225434+00:00 heroku[web.1]: Process exited with status 1
2017-03-31T01:45:25.238818+00:00 heroku[web.1]: State changed from starting to crashed
2017-03-31T01:45:33.319992+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=liberty.ai request_id=2de26102-043c-4635-aee0-df1c0f812fd1 fwd="191.183.100.215,172.68.25.249" dyno= connect= service= status=503 bytes= protocol=http
2017-03-31T01:45:33.968974+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=liberty.ai request_id=f3f5e957-5796-4354-ade2-69bd7bc60c84 fwd="191.183.100.215,172.68.27.167" dyno= connect= service= status=503 bytes= protocol=http

感谢任何帮助。

1 个答案:

答案 0 :(得分:1)

我遇到了同样的错误,原来凤凰1.3.0-rc1需要elixir 1.4。如果添加elixir_buildpack.config,则可以设置elixir版本,如下所示:

elixir_version=1.4.2

我在这里找到了这个解决方案:https://github.com/HashNuke/heroku-buildpack-elixir/issues/99