AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 789329
Accepted
Mohammed Noureldin
Mohammed Noureldin
Asked: 2016-07-13 02:21:57 +0800 CST2016-07-13 02:21:57 +0800 CST 2016-07-13 02:21:57 +0800 CST

在 ejabberd.ym 中授予新用户管理权限时出现语法错误

  • 772

在过去的几个小时里,我一直在尝试设置ejabberd服务器。我从源代码构建了 ejabberd ,因为 ubuntu 存储库中的包有错误。无论如何,在从源代码构建 ejabberd 之后,我将我的FQDN “s1.noureldin.local ”添加到我的 /etc/ejabberd/ejabberd.yml 文件中。

.
.
##   - "example.org"
##
hosts:
  - "localhost"
  - "s1.noureldin.local"
##
## route_subdomains: Delegate subdomains to other XMPP servers.
.
.

然后我创建了一个新用户:

ejabberdctl register admin1 s1.noureldin.local P@s5W0rd

然后我尝试连接到我的 xmpp 服务器,它成功了!

现在问题来了,当我尝试授予该新用户管理员权限时,无法再启动 ejabberd,并且我总是在日志中收到语法错误:

2016-07-12 12:00:10.733 [info] <0.7.0> Application lager started on node ejabberd@localhost
2016-07-12 12:00:10.977 [info] <0.7.0> Application crypto started on node ejabberd@localhost
2016-07-12 12:00:11.022 [info] <0.7.0> Application sasl started on node ejabberd@localhost
2016-07-12 12:00:11.084 [info] <0.7.0> Application asn1 started on node ejabberd@localhost
2016-07-12 12:00:11.084 [info] <0.7.0> Application public_key started on node ejabberd@localhost
2016-07-12 12:00:11.146 [info] <0.7.0> Application ssl started on node ejabberd@localhost
2016-07-12 12:00:11.171 [info] <0.7.0> Application fast_yaml started on node ejabberd@localhost
2016-07-12 12:00:11.198 [info] <0.7.0> Application fast_tls started on node ejabberd@localhost
2016-07-12 12:00:11.219 [info] <0.7.0> Application fast_xml started on node ejabberd@localhost
2016-07-12 12:00:11.231 [info] <0.7.0> Application stringprep started on node ejabberd@localhost
2016-07-12 12:00:11.245 [info] <0.7.0> Application cache_tab started on node ejabberd@localhost
2016-07-12 12:00:11.687 [info] <0.7.0> Application mnesia started on node ejabberd@localhost
2016-07-12 12:00:14.902 [info] <0.7.0> Application inets started on node ejabberd@localhost
2016-07-12 12:00:14.904 [error] <0.37.0>@ejabberd_config:get_plain_terms_file:257 Cannot load //etc/ejabberd/ejabberd.yml: Syntax error on line 423 at position 3: did not find expected key

这是我的 ejabberd.yml,你可以看到我尝试过但没有成功的所有语法:

.
.
.
max_fsm_queue: 1000

###.   ====================
###'   ACCESS CONTROL LISTS
acl:
  ##
  ## The 'admin' ACL grants administrative privileges to XMPP accounts.
  ## You can put here as many accounts as you want.
  ##
     admin:
       user:
       - "[email protected]"
  ######## I TRIED THESE AS WELL ########
  ##     - "admin1":"s1.noureldin.local"
  ##     - "[email protected]"
  ##
  ##   user: - "[email protected]"
  ##   - user: "[email protected]"

  ## Blocked users
  ##
  ## blocked:
  ##   user:
  ##     - "[email protected]"
  ##     - "test"

  ## Local users: don't modify this.
  ##
  local:
    user_regexp: ""

  ##
  ## More examples of ACLs
  ##
  ## jabberorg:
.
.
.

当我推荐这些行时,它再次起作用:

admin:
   user:
   - "[email protected]"

有人可以帮我解决这个问题吗?我在网上和 ejabberd doc 中搜索,所有人都使用我使用的相同语法,但对他们有效。

先感谢您。

xmpp ejabberd
  • 1 1 个回答
  • 415 Views

1 个回答

  • Voted
  1. Best Answer
    Mohammed Noureldin
    2016-07-13T02:54:22+08:002016-07-13T02:54:22+08:00

    好的,我发现了错误。ejabberd.yml文件是有意义的空格!

    并且每个子配置必须比其父配置多两个空格,因此我的配置将变为:

    acl:
      ##
      ## The 'admin' ACL grants administrative privileges to XMPP accounts.
      ## You can put here as many accounts as you want.
      ##
      admin:
        user:
          - "[email protected]"
      ##    - "aleksey@localhost"
      ##
      ## Blocked users
    

    或者更清楚:

    acl:   
      admin:
        user:
          - "[email protected]"
    
    • 0

相关问题

  • Linux 上的 Jabber 管理 [关闭]

  • 谷歌聊天端口号

  • 用于黑莓的 Jabber/XMPP 客户端 [关闭]

  • 如何检查服务器是否支持 xmpp 协议?

  • 使用 Jabber 监控服务器/系统?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve