【问题标题】:Issues Installing ejabberd on AWS在 AWS 上安装 ejabberd 的问题
【发布时间】:2020-02-29 02:06:41
【问题描述】:

我正在尝试在公有子网上运行的 EC2 AWS Linux 2 机器上安装 ejabberd。我做了以下事情:

  1. 为 EC2 实例分配弹性 IP (52.22.184.194)
  2. 将此域分配给 EIP - ejabberddev.strax.co
  3. 将机器的主机名更改为 ejabberddev.strax.co
  4. ejabberd 已安装。
  5. 我得到错误:

    20:55:32.313 [error] Failed to open socket at 52.22.184.194:7777 for mod_proxy65_stream: can't assign requested address
    
  6. ejabberd 正在尝试使用 AWS 弹性 IP 地址打开套接字 - 这不起作用。

  7. 我进入 ejabberd.yml 文件并添加 ip 变量以让 ejabberd 使用 AWS 私有 ip 用于 macine。

    mod_proxy: 
      ip: 10.1.254.240
      access: local
      max_connections: 5
    
  8. ejabberd 能够出现此修复和问题。

  9. 由于某种原因,我在安装时输入的用户 admin 和域 ejabberddev.strax.co 不在数据库中,所以我使用此命令输入了它。

    ejabberdctl register admin ejabberddev.strax.co admin
    
  10. 这似乎可行,所以我尝试使用这些凭据和包含域 http://ejabberddev.strax.co:5280/admin 的 URL 登录到网络

  11. 当我登录时发生以下错误:

    20:39:13.147 [error] CRASH REPORT Process <0.541.0> with 0 neighbours crashed with reason: bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860
    20:39:13.147 [error] Supervisor ejabberd_http_sup had child undefined started with {ejabberd_http,start_link,undefined} at <0.541.0> exit with reason bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 in context child_terminated
    20:39:13.252 [info] (none) Accepted connection [::ffff:18.232.45.141]:54109 -> [::ffff:10.1.254.240]:5280
    20:39:13.252 [error] CRASH REPORT Process <0.542.0> with 0 neighbours crashed with reason: bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860
    20:39:13.252 [error] Supervisor ejabberd_http_sup had child undefined started with {ejabberd_http,start_link,undefined} at <0.542.0> exit with reason bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 in context child_terminated
    20:39:13.459 [info] (<0.543.0>) Accepted connection [::ffff:18.232.45.141]:54110 -> [::ffff:10.1.254.240]:5280
    20:39:13.459 [error] CRASH REPORT Process <0.543.0> with 0 neighbours crashed with reason: bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860
    20:39:13.460 [error] Supervisor ejabberd_http_sup had child undefined started with {ejabberd_http,start_link,undefined} at <0.543.0> exit with reason bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 in context child_terminated
    20:39:18.582 [info] (none) Accepted connection [::ffff:18.232.45.141]:54113 -> [::ffff:10.1.254.240]:5280
    20:39:18.582 [error] CRASH REPORT Process <0.544.0> with 0 neighbours crashed with reason: bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860
    20:39:18.582 [error] Supervisor ejabberd_http_sup had child undefined started with {ejabberd_http,start_link,undefined} at <0.544.0> exit with reason bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 in context child_terminated
    20:39:48.712 [info] (none) Accepted connection [::ffff:18.232.45.141]:54122 -> [::ffff:10.1.254.240]:5280
    20:39:48.713 [error] CRASH REPORT Process <0.545.0> with 0 neighbours crashed with reason: bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860
    20:39:48.713 [error] Supervisor ejabberd_http_sup had child undefined started with {ejabberd_http,start_link,undefined} at <0.545.0> exit with reason bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 in context child_terminated
    20:40:48.899 [info] (<0.547.0>) Accepted connection [::ffff:18.232.45.141]:54143 -> [::ffff:10.1.254.240]:5280
    20:40:48.900 [error] CRASH REPORT Process <0.547.0> with 0 neighbours crashed with reason: bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860
    20:40:48.900 [error] Supervisor ejabberd_http_sup had child undefined started with {ejabberd_http,start_link,undefined} at <0.547.0> exit with reason bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 in context child_terminated
    20:45:49.083 [info] (none) Accepted connection [::ffff:18.232.45.141]:54241 -> [::ffff:10.1.254.240]:5280
    20:45:49.083 [error] CRASH REPORT Process <0.556.0> with 0 neighbours crashed with reason: bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860
    20:45:49.083 [error] Supervisor ejabberd_http_sup had child undefined started with {ejabberd_http,start_link,undefined} at <0.556.0> exit with reason bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 in context child_terminated
    

不确定错误是什么意思。基于我什至无法安装 ejabberd 包并登录的事实,我认为 AWS 弹性 IP 的使用出现了问题。我没有找到任何关于在 AWS 上安装 ejabberd 的文档 - 任何帮助将不胜感激。

蒂姆·麦克卢尔

【问题讨论】:

    标签: xmpp ejabberd tls1.2


    【解决方案1】:

    20:39:13.147 [错误] 主管 ejabberd_http_sup 有子未定义 在 退出时以 {ejabberd_http,start_link,undefined} 开始 在调用 maps:from_list([html]) 时有错误的参数 ejabberd_http:apply_custom_headers/2 第 860 行

    这个 bug 是在 ejabberd 20.02 在实现其他东西时引入的,现在只在 git 中修复: https://github.com/processone/ejabberd/commit/00abf5d42c9b9c979b7ac69758a8f6745744f929

    您可以将该修复应用到您的源代码中,或者返回到以前的 ejabberd 版本,或者等待下一个版本。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-11-24
      • 1970-01-01
      • 2015-11-17
      • 2016-08-11
      • 2018-12-22
      • 2018-07-13
      • 2022-01-25
      • 2022-06-20
      相关资源
      最近更新 更多