Tag: 仙丹

Erlang和Phoenix的bug,低码率的Docker

我目前正试图在docker集装箱中build立一个Phoenix服务器。 Docker镜像的创build工作正常,但是当试图运行它时,会出现一个错误: MIX_ENV=prod mix phoenix.server {"Kernel pid terminated",application_controller,"{application_start_failure,satisfaction,{{shutdown,{failed_to_start_child,'Elixir.Satisfaction.Endpoint',{'EXIT',{low_entropy,[{crypto,strong_rand_bytes,1,[{file,\"crypto.erl\"},{line,436}]},{'Elixir.Phoenix.Endpoint.Adapter',config_children,2,[{file,\"lib/phoenix/endpoint/adapter.ex\"},{line,34}]},{'Elixir.Phoenix.Endpoint.Adapter',start_link,2,[{file,\"lib/phoenix/endpoint/adapter.ex\"},{line,18}]},{supervisor,do_start_child,2,[{file,\"supervisor.erl\"},{line,358}]},{supervisor,start_children,3,[{file,\"supervisor.erl\"},{line,341}]},{supervisor,init_children,2,[{file,\"supervisor.erl\"},{line,307}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,328}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,240}]}]}}}},{'Elixir.Satisfaction',start,[normal,[]]}}}"} Crash dump is being written to: erl_crash.dump…done Kernel pid terminated (application_controller) ({application_start_failure,satisfaction,{{shutdown,{failed_to_start_child,'Elixir.Satisfaction.Endpoint',{'EXIT',{low_entropy,[{crypto,strong_rand_byt 我不明白为什么,有没有人有一个想法? 谢谢 最好的祝福,

启动一个Phoenix应用程序,出现错误(UndefinedFunctionError)

使用docker构build一个映像来部署,得到: [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" […]

如何连接elixir中的两个docker容器的节点?

我正在尝试连接不同docker集装箱的2个节点。 Container1: iex –name abc@172.17.0.2 –cookie foo Container2: iex –name xyz@172.17.0.4 –cookie foo 现在让我们说我想从xyz@172.17.0.4连接到xyz@172.17.0.4 container2的: iex(xyz@172.17.0.4)> Node.connect(:"abc@172.17.0.2") iex(xyz@172.17.0.4)> true 节点正在连接。 但是,如果我这样做 iex(xyz@172.17.0.4)> node = "abc@172.17.0.2" iex(xyz@172.17.0.4)> Node.connect(:node) iex(xyz@172.17.0.4)> false 为什么我得到错误? 其他function也正在发生,如Node.spawn / 2。

在Docker上连接erlang节点

我有两个docker图片包含一个释放的elixir应用程序。 我在我的本地机器上运行这两个docker。 我试图连接两个节点。 我如何在已命名的节点上运行已发布的应用程序? 或者 – 还有其他方法可以做到吗?

将Erlang Observer App与Docker内部的远程Elixir Phoenix服务器结合使用

我正在尝试做的是在本地运行Erlang Observer应用程序 ,然后连接到运行我的Elixir / Phoenix应用程序的远程Docker容器。 我遇到的问题是无法连接。 从我的研究中,似乎我需要在启动Phoenix服务器之前知道Docker映像的IP地址,以便我可以像这样启动它: iex –name my_app@10.20.57.123 -S mix phoenix.server 我不确定是否需要cookie,所以我也尝试过 iex –name my_app@10.20.57.123 –cookie random_cookie -S mix phoenix.server 我试过使用主机名而不是IP地址,似乎没有工作。 一旦我有这个运行,那么我希望像这样运行Observer erl -name observe@127.0.0.1 -setcookie random_cookie -run observer 或者,用IEx iex –name observe@127.0.0.1 –cookie random_cookie iex> :observer.start() 我可以启动一个凤凰服务器,而不需要知道IP地址,仍然可以远程连接观察员? 我可以在使用这个shell命令构buildDocker镜像时知道Docker镜像的IP地址 ip addr | grep -Eo 'inet (.*) scope global' | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' 但无法弄清楚如何把这个命令启动凤凰服务器。 […]

Docker容器在〜1分钟后死亡

我做了一个非常小的凤凰框架应用程序(只是稍微修改了你运行时得到的:mix phoenix.new)。 我一直在试图部署在Docker容器中。 它在容器运行的时候工作正常,但是在启动的一分钟内总是死掉,并且显示“Killed”消息。 我是否提出要求似乎并不重要。 我试着看docker事件,得到以下结果: $ docker events 2016-04-09T16:24:02.538602484-04:00 container create ef45a768723c64125c717a7b40ee7513e477f27339c6266bd28cc3084c60e11f (image=gcr.io/myprojectname/myapp:v2, name=amazing_bhabha) 2016-04-09T16:24:02.550438045-04:00 container attach ef45a768723c64125c717a7b40ee7513e477f27339c6266bd28cc3084c60e11f (image=gcr.io/myprojectname/myapp:v2, name=amazing_bhabha) 2016-04-09T16:24:02.599731705-04:00 network connect c64a1439c8095f82ab0fea5c48b563c8aac7256d6064b3189b0bc8d052d69fe4 (name=bridge, type=bridge, container=ef45a768723c64125c717a7b40ee7513e477f27339c6266bd28cc3084c60e11f) 2016-04-09T16:24:02.600048755-04:00 container start ef45a768723c64125c717a7b40ee7513e477f27339c6266bd28cc3084c60e11f (image=gcr.io/myprojectname/myapp:v2, name=amazing_bhabha) 2016-04-09T16:24:53.858352733-04:00 container die ef45a768723c64125c717a7b40ee7513e477f27339c6266bd28cc3084c60e11f (name=amazing_bhabha, image=gcr.io/myprojectname/myapp:v2) 2016-04-09T16:24:53.930349810-04:00 network disconnect c64a1439c8095f82ab0fea5c48b563c8aac7256d6064b3189b0bc8d052d69fe4 (container=ef45a768723c64125c717a7b40ee7513e477f27339c6266bd28cc3084c60e11f, name=bridge, type=bridge) 对于Docker和Elixir,我还是很新的,所以我不确定我能做些什么其他的研究。 这里有一个类似的问题: 我运行一个docker集装箱,但几分钟后,它被自己杀死了 但是我不确定OP是如何解决的。 预先感谢任何提示。 请让我知道,如果有任何其他信息,我可以得到这可能有帮助。 编辑1:我了解到docker ps […]