使用docker构建要部署的映像,得到:
[info] Application myapp exited: exited in: myapp.Application.start(:normal, [])
** (EXIT) an exception was raised:
** (UndefinedFunctionError) function myapp.Application.start/2 is undefined (module myapp.Application is not available)
myapp.Application.start(:normal, [])
(kernel) application_master.erl:273: :application_master.start_it_old/4
{"Kernel pid terminated",application_controller,"{application_start_failure,myapp,{bad_return,{{'Elixir.myapp.Application',start,[normal,[]]},{'EXIT',{undef,[{'Elixir.myapp.Application',start,[normal,[]],[]},{application_master,start_it_old,4,[{file,\"application_master.erl\"},{line,273}]}]}}}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,myapp,{bad_return,{{'Elixir.myapp.Application',start,[normal,[]]},{'EXIT',{undef,[{'Elixir.myapp.Application',start,[norma
在myapp/rel/config.exs
档案中:
...
release :orange do
set version: current_version(:orange)
set applications: [
:runtime_tools
]
set vm_args: "./vm.args"
end
在mix.exs
档案中:
def application do
[
mod: {Myapp.Application, []},
extra_applications: [:logger]
]
end
我正在使用Kubernetes来部署应用程序。第一次,所有pod都可以成功运行。过了一会儿,豆荚走了:
Back-off restarting failed container
Error syncing pod
使用kubectl
检查pod日志时,出现上述错误。
有什么不对的吗?