【问题标题】:Phoenix Deployment with EXRM使用 EXRM 的 Phoenix 部署
【发布时间】:2016-05-24 05:09:30
【问题描述】:

我正在尝试使用 EXRM 在 Ubuntu 服务器上部署 phoenix 应用程序。

该版本运行完美,网站可以访问,但是当我 ping 版本时,它说

Node 'myapp@myhost' not responding to pings.

vm.args 文件

## Name of the node
-sname pxblog

## Cookie for distributed erlang
-setcookie pxblog

## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive
## (Disabled by default..use with caution!)
##-heart

## Enable kernel poll and a few async threads
##+K true
##+A 5

## Increase number of concurrent ports/sockets
##-env ERL_MAX_PORTS 4096

## Tweak GC to run more often
##-env ERL_FULLSWEEP_AFTER 10

更新 vm.args(已解决)

## Name of the node
-sname pxblog@localhost

## Cookie for distributed erlang
-setcookie pxblog

## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive
## (Disabled by default..use with caution!)
##-heart

## Enable kernel poll and a few async threads
##+K true
##+A 5

## Increase number of concurrent ports/sockets
##-env ERL_MAX_PORTS 4096

## Tweak GC to run more often
##-env ERL_FULLSWEEP_AFTER 10

【问题讨论】:

  • 您是从机器本身(通过 localhost)还是从其他机器 ping?
  • 是的,我在同一台机器上 ping。
  • 很高兴你能弄明白。

标签: ubuntu-14.04 elixir phoenix-framework exrm


【解决方案1】:

检查vm.args 文件。寻找类似这样的一行:

## Name of the node
-name test@127.0.0.1

我怀疑您会在那里找到的名称是“myapp@myhost”。尝试将其更改为 yourappname@localhostyourappname@127.0.0.1。注意:我并不是说您应该将文字字符串 yourappname 放在那里。替换您的应用程序的名称。

【讨论】:

  • vm.args 文件有这个 ## 节点名称 -sname appname
  • 那么,如果我是你,我会尝试将-sname appname 替换为-name appname@localhost
  • 请将您的 vm.args 中的 exact 文本添加到上述问题的正文中。
  • 尝试这样做现在会引发错误 ** 系统运行以使用完全限定的主机名 ** ** 主机名 localhost 是非法的 **
  • 嗨@RobinSolanki。要将问题标记为已解决,请单击最能帮助您的答案旁边的勾号。谢谢!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-04-19
  • 1970-01-01
  • 1970-01-01
  • 2017-05-22
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多