2
昨日私は非常に奇妙な問題に直面しました。フェニックスリリースを開始できません
構成:
- Erlang 19
- Elixir 1.3.1
- Exrm 1.0.6
- Phoenix 1.2.0
- Ubuntu 15.10
手順:MIX_ENV=prod mix release
MIX_ENV=prod mix compile
- コンパイルプロジェクトは
rel/susu_online/bin/susu_online console
その後、私はエラーを取得し、これは
以下のエラーが起こる理由を把握することはできません:行** (EXIT) shutdown: failed to start child: Phoenix.PubSub.PG2
Erlang/OTP 19 [erts-8.0] [source-6dc93c1] [64-bit] [async-threads:10] [hipe] [kernel-poll:false]
10:37:29.758 [error] Supervisor 'Elixir.Logger.Supervisor' had child 'Elixir.Logger.ErrorHandler' started with 'Elixir.Logger.Watcher':watcher(error_logger, 'Elixir.Logger.ErrorHandler', {true,false,500}, link) at <0.1445.0> exit with reason normal in context child_terminated
10:37:29.767 [info] Application lager started on node '[email protected]'
10:37:29.767 [info] Application hpack started on node '[email protected]'
10:37:29.768 [info] Application chatterbox started on node '[email protected]'
10:37:29.768 [info] Application elixlsx started on node '[email protected]'
10:37:29.768 [info] Application poolboy started on node '[email protected]'
10:37:29.769 [info] Application poison started on node '[email protected]'
10:37:29.813 [info] Application apns started on node '[email protected]'
10:37:29.814 [info] Application httpoison started on node '[email protected]'
10:37:29.814 [info] Application pigeon started on node '[email protected]'
10:37:29.815 [info] Application combine started on node '[email protected]'
10:37:29.815 [info] Application gettext started on node '[email protected]'
10:37:29.815 [info] Application timex started on node '[email protected]'
10:37:29.815 [info] Application comeonin started on node '[email protected]'
10:37:29.816 [info] Application connection started on node '[email protected]'
10:37:29.816 [info] Application db_connection started on node '[email protected]'
10:37:29.816 [info] Application decimal started on node '[email protected]'
10:37:29.817 [info] Application postgrex started on node '[email protected]'
10:37:29.817 [info] Application ecto started on node '[email protected]'
10:37:29.818 [info] Application phoenix_ecto started on node 'sus[email protected]'
10:37:29.818 [info] Application cowlib started on node '[email protected]'
10:37:29.818 [info] Application ranch started on node '[email protected]'
10:37:29.819 [info] Application cowboy started on node '[email protected]'
10:37:29.819 [info] Application plug started on node '[email protected]'
10:37:29.819 [info] Application phoenix_html started on node '[email protected]'
10:37:29.820 [info] Application eex started on node '[email protected]'
10:37:29.820 [info] Application phoenix started on node '[email protected]'
10:37:29.825 [info] Application susu_online exited: SusuOnline.start(:normal, []) returned an error: shutdown: failed to start child: SusuOnline.Endpoint
** (EXIT) shutdown: failed to start child: Phoenix.PubSub.PG2
** (EXIT) an exception was raised:
** (UndefinedFunctionError) function Phoenix.PubSub.PG2.start_link/2 is undefined (module Phoenix.PubSub.PG2 is not available)
Phoenix.PubSub.PG2.start_link(SusuOnline.PubSub, [fastlane: Phoenix.Channel.Server, pool_size: 1, name: SusuOnline.PubSub, adapter: Phoenix.PubSub.PG2])
(stdlib) supervisor.erl:365: :supervisor.do_start_child/2
(stdlib) supervisor.erl:348: :supervisor.start_children/3
(stdlib) supervisor.erl:314: :supervisor.init_children/2
(stdlib) gen_server.erl:328: :gen_server.init_it/6
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
10:37:29.823 [error] Supervisor 'Elixir.SusuOnline.Endpoint' had child 'Elixir.Phoenix.PubSub.PG2' started with 'Elixir.Phoenix.PubSub.PG2':start_link('Elixir.SusuOnline.PubSub', [{fastlane,'Elixir.Phoenix.Channel.Server'},{pool_size,1},{name,'Elixir.SusuOnline.PubSub'},{adapter,...}]) at undefined exit with reason {'EXIT',{undef,[{'Elixir.Phoenix.PubSub.PG2',start_link,['Elixir.SusuOnline.PubSub',[{fastlane,'Elixir.Phoenix.Channel.Server'},{pool_size,1},{name,'Elixir.SusuOnline.PubSub'},{adapter,'Elixir.Phoenix.PubSub.PG2'}]],[]},{supervisor,do_start_child,2,[{file,"supervisor.erl"},{line,365}]},{supervisor,start_children,3,[{file,"supervisor.erl"},{line,348}]},{supervisor,init_children,2,[{file,"supervisor.erl"},{line,314}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,328}]},{proc_lib,init_p_do_apply,...}]}} in context start_error
{"Kernel pid terminated",application_controller,"{application_start_failure,susu_online,{{shutdown,{failed_to_start_child,'Elixir.SusuOnline.Endpoint',{shutdown,{failed_to_start_child,'Elixir.Phoenix.PubSub.PG2',{'EXIT',{undef,[{'Elixir.Phoenix.PubSub.PG2',start_link,['Elixir.SusuOnline.PubSub',[{fastlane,'Elixir.Phoenix.Channel.Server'},{pool_size,1},{name,'Elixir.SusuOnline.PubSub'},{adapter,'Elixir.Phoenix.PubSub.PG2'}]],[]},{supervisor,do_start_child,2,[{file,\"supervisor.erl\"},{line,365}]},{supervisor,start_children,3,[{file,\"supervisor.erl\"},{line,348}]},{supervisor,init_children,2,[{file,\"supervisor.erl\"},{line,314}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,328}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,247}]}]}}}}}},{'Elixir.SusuOnline',start,[normal,[]]}}}"}
Crash dump is being written to: erl_crash.dump...done
Kernel pid terminated (application_controller) ({application_start_failure,susu_online,{{shutdown,{failed_to_start_child,'Elixir.SusuOnline.Endpoint',{shutdown,{failed_to_start_child,'Elixir.Phoenix.P
は非常に私を混乱させるです。なぜプロジェクトが独自のモジュールを見つけることができないのですか?
はあなたが私を救った、ありがとうございました!なぜこのバグについての公式文書に何もないのだろうかと思って、phoenix_pubsubはデフォルトで 'application'の中になければなりませんか? – vendettacore
新しいphoenix 1.2アプリケーションを生成したか、既存のアプリケーションをアップグレードしましたか?アップグレードガイドに記載されています。https://gist.github.com/chrismccord/29100e16d3990469c47f851e3142f766#deps – Gazler
バージョン1.1.4からアップグレードされたので、必要な変更は行っていません。これらの変更はどこで発表されましたか? – vendettacore