Erlang Elixir Phoenix关机:无法启动子项

Erlang Elixir Phoenix关机:无法启动子项,erlang,elixir,phoenix-framework,Erlang,Elixir,Phoenix Framework,在生产模式下启动应用程序时,我遇到以下错误。所有这些都可以在开发端正常工作,可以在生产应用程序上迁移、编译和发布而不会出现问题,但在运行时,它会在启动时崩溃。 我肯定我错过了一些很明显的东西。我正在运行Erlang 19和Elixir 1.3.2 17:42:52.768[信息]应用程序课程退出: currency.start(:normal,[])返回一个错误:shutdown:failed to 起始子项:课程。终结点 **(退出)关闭:无法启动子项:Phoenix.Endpoint.Ser

在生产模式下启动应用程序时,我遇到以下错误。所有这些都可以在开发端正常工作,可以在生产应用程序上迁移、编译和发布而不会出现问题,但在运行时,它会在启动时崩溃。 我肯定我错过了一些很明显的东西。我正在运行Erlang 19和Elixir 1.3.2

17:42:52.768[信息]应用程序课程退出: currency.start(:normal,[])返回一个错误:shutdown:failed to 起始子项:课程。终结点 **(退出)关闭:无法启动子项:Phoenix.Endpoint.Server **(退出)引发了一个异常: **(FunctionClauseError)System.get\u env/1中没有匹配的函数子句 (elixir)lib/system.ex:358:system.get_env(4000) (phoenix)lib/phoenix/endpoint/server.ex:34:phoenix.endpoint.server.to_port/1 (phoenix)lib/phoenix/endpoint/server.ex:28:phoenix.endpoint.server.default/3 (phoenix)lib/phoenix/endpoint/server.ex:17:phoenix.endpoint.server.init/1中的匿名fn/5 (elixir)lib/enum.ex:1623:enum。“-reduce/3-lists^foldl/2-0-”/3 (phoenix)lib/phoenix/endpoint/server.ex:15:phoenix.endpoint.server.init/1 (stdlib)supervisor.erl:294::supervisor.init/1 (stdlib)gen_server.erl:328::gen_server.init_it/6{“内核pid 已终止“,应用程序控制器,{application\u start\u failure,currency,{shutdown,{failed\u to\u start\u child,'Elixir.currency.Endpoint',shutdown,{failed\u to\u start\u child,'Elixir.Phoenix.Endpoint.Server',{function\u子句,[{'Elixir.System',get\u env,[4000],{file,\'lib/System.ex\},{line,358},{'Elixir.Phoenix.Endpoint Server',to\u端口,1,{file,{lib/phoenix/endpoint/server.ex\“},{line,34}]},{'Elixir.phoenix.endpoint.server',默认值为3,[{file,\'lib/phoenix/endpoint/server.ex\“},{line,28}]},{'Elixir.phoenix.endpoint.server','-init/1-fun-0-',5,[{file,\'lib phoenix/endpoint/server.ex\'},{line,17}},{'Elixir.Enum'},{reduce 3-lists^foldl/2-Enum,{line,{3-Enum},{,{'Elixir.Phoenix.Endpoint.Server',init,1,[{file,\'lib/Phoenix/Endpoint/Server.ex\'},{line,15}}}},{supervisor,init,1,[{file,\'supervisor.erl\'},{line,294}},{genu Server,init it,6,[{file,\'genu Server.erl\},{line,328}},{'Elixir.courum'

Prod.exs文件内容

http: [port: {:system, 4000}],url: [host: "example.com"],cache_static_manifest: "priv/static/manifest.json",server: true
config :phoenix, :serve_endpoints, true

import_config "prod.secret.exs"

config/prod.exs
中的
port
值错误。它应该是:

port: 4000
要始终在端口4000上运行,请执行以下操作:

port: {:system, "PORT"}

要从环境变量
port
(您可以将名称更改为任何其他字符串)读取端口,能否粘贴
config/prod.exs
?上面添加的port config there.prod.exs内容中似乎有错误,非常感谢