我的新项目(我只在默认的mix新项目的主页上添加了"hello world“)在dev中运行良好。
我根据phoenix站点部分将其配置为prod,然后使用以下命令
MIX_ENV=prod iex -S mix phoenix.server它工作得很好
在那之后,我创建了一个又一个的版本--在这个过程中一切都很顺利
在那之后,我尝试启动这个版本,它启动了,但没有工作:
$> rel/hello/bin/hello console
Using /home/bar/work/phoenix/hello/rel/hello/releases/0.0.1/hello.sh
Exec: /home/bar/work/phoenix/hello/rel/hello/erts-7.3/bin/erlexec -boot /home/bar/work/phoenix/hello/rel/hello/releases/0.0.1/hello
-mode embedded -config /home/bar/work/phoenix/hello/rel/hello/running-config/sys.config
-boot_var ERTS_LIB_DIR /home/bar/work/phoenix/hello/rel/hello/erts-7.3/../lib
-env ERL_LIBS /home/bar/work/phoenix/hello/rel/hello/lib
-pa /home/bar/work/phoenix/hello/rel/hello/lib/hello-0.0.1/consolidated
-args_file /home/bar/work/phoenix/hello/rel/hello/running-config/vm.args
-user Elixir.IEx.CLI -extra --no-halt +iex -- console
Root: /home/bar/work/phoenix/hello/rel/hello
/home/bar/work/phoenix/hello/rel/hello
Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false]
17:09:39.614 [info] Running Hello.Endpoint with Cowboy using http on port 4001
Interactive Elixir (1.2.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(hello@localhost)1> 17:09:42.545 [error] Ranch protocol #PID<0.1183.0> (:cowboy_protocol) of listener Hello.Endpoint.HTTP terminated
** (exit) {:cowboy_handler, [class: :error, reason: :undef, mfa: {Plug.Adapters.Cowboy.Handler, :init, 2},
stacktrace: [{Plug.Adapters.Cowboy.Handler, :init, [{:http_req, #Port<0.3806>,
:ranch_tcp, :keepalive, #PID<0.1183.0>, "GET", :"HTTP/1.1", ................
$> curl -v localhost:4001
* Rebuilt URL to: localhost:4001/
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 4001 (#0)
> GET / HTTP/1.1
> Host: localhost:4001
> User-Agent: curl/7.48.0
> Accept: */*
>
< HTTP/1.1 500 Internal Server Error
< server: Cowboy
< date: Fri, 22 Apr 2016 14:24:42 GMT
< content-length: 0
<
* Connection #0 to host localhost left intact见鬼?怎么做?(我已经阅读了phoenixframework.org上的“部署”部分)
$> mix -v
Mix 1.2.4
$> elixir -v
Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false]
Elixir 1.2.4Tnx
发布于 2016-04-23 12:49:06
好了,我找出了问题的原因。
在主OTP中,已经存在牛仔、牛仔、牛仔和牧场(在/usr/lib/erlang/lib目录中),在删除它们之后-一切正常!
凤凰城规则!
https://stackoverflow.com/questions/36796767
复制相似问题