首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用EXRM牛仔服务器的phoenix部署回答了500

使用EXRM牛仔服务器的phoenix部署回答了500
EN

Stack Overflow用户
提问于 2016-04-22 22:40:00
回答 1查看 150关注 0票数 2

我的新项目(我只在默认的mix新项目的主页上添加了"hello world“)在dev中运行良好。

我根据phoenix站点部分将其配置为prod,然后使用以下命令

代码语言:javascript
复制
 MIX_ENV=prod iex -S mix phoenix.server

它工作得很好

在那之后,我创建了一个又一个的版本--在这个过程中一切都很顺利

在那之后,我尝试启动这个版本,它启动了,但没有工作:

代码语言:javascript
复制
$> 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上的“部署”部分)

代码语言:javascript
复制
$> 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.4

Tnx

EN

回答 1

Stack Overflow用户

发布于 2016-04-23 12:49:06

好了,我找出了问题的原因。

在主OTP中,已经存在牛仔、牛仔、牛仔和牧场(在/usr/lib/erlang/lib目录中),在删除它们之后-一切正常!

凤凰城规则!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36796767

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档