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 / 问题

问题[ejabberd](server)

Martin Hope
Arun Varghese
Asked: 2022-02-09 16:16:40 +0800 CST

节点无法离开集群进行 eJabberd 升级

  • 0

环境

  • ejabberd 版本:20.04
  • Erlang 版本:Erlang (SMP,ASYNC_THREADS)(BEAM) 模拟器版本 9.2
  • 操作系统:Linux(Debian)
  • 安装自:源码

crash.log 中的错误

2022-02-08 22:42:45 =CRASH REPORT==== crasher:初始调用:pgsql_proto:init/1 pid:<0.27318.6018>registered_name:[]异常退出:{{init,{error,timeout} },[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,349}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line, 247}]}]} 祖先:['ejabberd_sql_vhost1.xmpp_12','ejabberd_sql_sup_vhost1.xmpp',ejabberd_db_sup,ejabberd_sup,<0.87.0>] message_queue_len:0条消息:[]链接:[]字典:[]trap_exit:错误状态:运行堆大小:376 堆栈大小:27 减少:997 邻居:

错误描述 我正在尝试从 eJabberd 20.04 升级到 20.07。我的集群设置有三个节点。两个节点滚动升级成功。当 node1 试图离开集群进行升级时,它会给出以下错误:

与节点 'ejabberd@xmpp1.node 的 RPC 连接失败:超时

当我尝试 ejabberdctl 状态时,返回以下内容:节点 'ejabberd@xmpp1.node' 以状态启动:已启动 与节点 'ejabberd@xmpp1.node' 的 RPC 连接失败:{'EXIT', {timeout, {gen_server ,调用, [application_controller, which_applications]}}}

在 Erlang shell 上,节点仍然显示为集群的一部分

节点()。['ejabberd@xmpp3.node','ejabberd@xmpp2.node']

你能帮我解决这个问题吗?

cluster upgrade ejabberd
  • 2 个回答
  • 44 Views
Martin Hope
linucksrox
Asked: 2021-01-15 18:39:31 +0800 CST

如何成功运行 ejabberdctl dump-config 或找到更新的文档?

  • 0

在 Docker 中启动 ejabberd 20.12 后,日志告诉我应该运行 ejabberdctl dump-config 以获取当前运行配置。

2021-01-15 01:32:21.039034+00:00 [warning] Listening option 'certfile' of module ejabberd_c2s is deprecated and was automatically appended to global 'certfiles' option. Please adjust your configuration file accordingly. Hint: run `ejabberdctl dump-config` command to view current configuration as it is seen by ejabberd.

当我运行它时,docker exec -it ejabberd bin/ejabberdctl dump-config它告诉我我还需要 1 个参数...

Error: the command "dump-config" requires 1 more argument.

是时候检查文档了……等一下,网上找不到任何提到 ejabberdctl dump-config 的信息。有一些关于 dump_config 的 API 信息,但我不确定它是如何转化为 CLI 的。

我试图通过指定一个输出文件来猜测额外的参数是什么,但没有写入文件。只是我还是缺少 ejabberd 文档?

ejabberd
  • 1 个回答
  • 305 Views
Martin Hope
saxad
Asked: 2020-05-25 07:45:21 +0800 CST

Ejabberd mod_block_strangers 块错误节

  • 0

我的 ejabberd 版本是 19.08。mod_block_strangers未收到启用的错误节。

向外部收件人(不是本地 jabber)发送消息 带有 mod_block_strangers=on 的输出节示例

<message to="615970@676373647364.com" id="aad7a">
<subject>test</subject>
<body>test</body>
<nick xmlns="http://jabber.org/protocol/nick">bot</nick>
</message>

XMPP 不是本地的。没有错误节。应该是,因为这个域不存在。

带有 mod_block_strangers=off 的 out 节示例

<message type="chat" to="615970@676373647364.com" id="aadaa">
<body>test</body>
<active xmlns="http://jabber.org/protocol/chatstates"/>
<request xmlns="urn:xmpp:receipts"/>
<nick xmlns="http://jabber.org/protocol/nick">bot</nick>
</message>

<message from="615970@676373647364.com" type="error" xml:lang="ru" to="bot@*" id="aadaa">
<active xmlns="http://jabber.org/protocol/chatstates"/>
<request xmlns="urn:xmpp:receipts"/>
<nick xmlns="http://jabber.org/protocol/nick">bot</nick>
<error type="cancel" code="404">
<remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
<text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" xml:lang="en">DNS lookup failed: non-existing domain</text>
</error>
<body>test</body>
</message>

在本地xmpp的没有这个问题。一切正常。我认为,这是因为allow_local_users,默认情况下是“真”。具有本地域的节示例:

<message to="549725985745@localdomain" id="aadea">
<subject>test</subject>
<body>test</body>
<nick xmlns="http://jabber.org/protocol/nick">bot</nick>
</message>


<message from="549725985745@localdomain" type="error" xml:lang="ru" to="bot@localdomain/Psi+" id="aadea">
<nick xmlns="http://jabber.org/protocol/nick">bot</nick>
<error type="cancel" code="503">
<service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
</error>
<body>test</body>
<subject>test</subject>
</message>

因此,如果启用了 mod_block_strangers,我们就不会从外部服务器收到错误节和错误代码。就像,错误消息与消息一起被禁止。

编辑:更新到 ejabberd 20.04。同样的情况,没有效果。

ejabberd
  • 1 个回答
  • 196 Views
Martin Hope
user7890
Asked: 2020-05-20 02:04:37 +0800 CST

在端口 5222 上设置 ejabberd STARTTLS

  • 1

我刚刚ejabberd/ecs在 ubuntu 20.04 aws 实例上安装并设置了 docker 映像。

我有端口、域名和用户设置和工作。

在主机(ubuntu)上,我使用 certbot 生成了 Let's Encrypt 证书,将它们复制到 docker 容器中:

certfiles:               
  - /home/ejabberd/conf/fullchain.pem
  - /home/ejabberd/conf/privkey.pem  

ca_file: "/home/ejabberd/conf/fullchain.pem"

我想要求我的用户只使用安全连接。

我在文档上读到我最好使用 STARTTLS 而不是 TLS。

问题是 ejabberd 似乎仅在设置 TLS 时才使用我的证书。

当我这样设置配置时:

listen:
  -
    port: 5222
    ip: "::"
    module: ejabberd_c2s
    max_stanza_size: 262144
    shaper: c2s_shaper
    access: c2s
    tls: true
...
  -                                                                      
    port: 5280                                                           
    ip: "::"                                                             
    module: ejabberd_http                                                
    tls: true                                             
    request_handlers:                                     
      "/admin": ejabberd_web_admin 

并重新加载配置bin/ejabbedctl reload_config,然后我可以https://example.com:5280/admin/使用 ssl 访问。

当我使用openssl另一台机器测试证书时,它似乎可以工作,因为我得到以下信息:

openssl s_client -connect example.com:5222
CONNECTED(00000005)
depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
verify return:1
depth=0 CN = example.com
verify return:1
---
Certificate chain
 0 s:CN = example.com
   i:C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
 1 s:C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
   i:O = Digital Signature Trust Co., CN = DST Root CA X3
---
Server certificate
-----BEGIN CERTIFICATE-----
...

但是当我使用时,我应该根据我的理解, starttls并且starttls_required:

listen:
  -
    port: 5222
    ip: "::"
    module: ejabberd_c2s
    max_stanza_size: 262144
    shaper: c2s_shaper
    access: c2s
    starttls: true
    starttls_required: true

然后 ejabberd 似乎没有在端口上使用安全连接5222:

openssl s_client -connect example.com:5222
CONNECTED(00000005)
140324192997824:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../ssl/record/ssl3_record.c:332:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 5 bytes and written 315 bytes
Verification: OK
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
---

知道我能做些什么来解决这个问题吗?

ssl lets-encrypt ejabberd
  • 1 个回答
  • 1042 Views
Martin Hope
Torsten
Asked: 2020-04-19 12:45:59 +0800 CST

Ejabberd:用户可以看到其他(外国)聊天内容

  • 0

A 已经在我的 Archlinux 机器上测试了 ejabberd 20.03 几个星期,作为家庭中可能的 WhatsApp 替代品。我为我的用户数据库使用 postgresql 后端。直到今天一切顺利:我为姐姐创建了第三个帐户。登录没问题,我们可以互相聊天。问题来了:她可以看到我和这里儿子的聊天记录,这是/是第一个非管理员用户!他的聊天记录是明文,而我的不可读。

我没有创建一个聊天室,几乎所有的东西(除了用户认证的东西)都是默认的。我们都在 Android 上使用当前的对话。我不知道这里发生了什么...

模块部分:

modules:
  mod_adhoc: {}
  mod_admin_extra: {}
  mod_announce:
    access: announce
  mod_avatar: {}
  mod_blocking: {}
  mod_bosh: {}
  mod_caps: {}
  mod_carboncopy: {}
  mod_client_state: {}
  mod_configure: {}
  mod_disco: {}
  mod_fail2ban: {}
  mod_http_api: {}
  mod_http_upload:
    put_url: https://@HOST@:5443/upload
  mod_last: {}
  mod_mam:
    ## Mnesia is limited to 2GB, better to use an SQL backend
    ## For small servers SQLite is a good fit and is very easy
    ## to configure. Uncomment this when you have SQL configured:
    db_type: sql
    assume_mam_usage: true
    default: always
  mod_mqtt: {}
  mod_muc:
    access:
      - allow
    access_admin:
      - allow: admin
    access_create: muc_create
    access_persistent: muc_create
    access_mam:
      - allow
    default_room_options:
      mam: true
  mod_muc_admin: {}
  mod_offline:
    access_max_user_messages: max_user_offline_messages
  mod_ping: {}
  mod_privacy: {}
  mod_private: {}
  mod_proxy65:
    access: local
    max_connections: 5
  mod_pubsub:
    access_createnode: pubsub_createnode
    plugins:
      - flat
      - pep
    force_node_config:
      ## Avoid buggy clients to make their bookmarks public
      storage:bookmarks:
        access_model: whitelist
  mod_push: {}
  mod_push_keepalive: {}
  mod_register:
    ## Only accept registration requests from the "trusted"
    ## network (see access_rules section above).
    ## Think twice before enabling registration from any
    ## address. See the Jabber SPAM Manifesto for details:
    ## https://github.com/ge0rg/jabber-spam-fighting-manifesto
    ip_access: trusted_network
  mod_roster:
    versioning: true
#  mod_s2s_dialback: {}
  mod_shared_roster: {}
  mod_stream_mgmt:
    resend_on_timeout: if_offline
  mod_vcard: {}
  mod_vcard_xupdate: {}
  mod_version:
    show_os: false
ejabberd
  • 1 个回答
  • 105 Views
Martin Hope
saxad
Asked: 2020-04-04 08:47:45 +0800 CST

ejabberdctl process_rosteritems 命令中的多个参数

  • 0

伙计们,尤其是 Badlop :) 我需要你的帮助并有疑问。如何在我拥有的 process_rosteritems 命令中添加更多参数,例如,这样的命令:

ejabberdctl process_rosteritems list none out any user@jabber.com

我需要 2 个同时匹配,例如 user@jabber.com 和 user3@jabber.com 类似的东西:

ejabberdctl process_rosteritems list none out any user@jabber.com&user3@jabber.com

如何修改命令,使其匹配 2 个 arg(同时匹配)?

ejabberd
  • 1 个回答
  • 55 Views
Martin Hope
Andrew
Asked: 2019-08-15 10:48:11 +0800 CST

如何按注册日期列出 ejabberd 用户?

  • 2

垃圾邮件发送者找到了我的私人 ejd 服务器并注册了几千个用户。我想在不对其他用户造成附带损害的情况下摆脱它们。有没有办法获取在特定日期或日期范围内注册的用户列表?我在ejabberdctl 中没有看到任何内容,并且相关日志已过期。

ejabberd
  • 1 个回答
  • 123 Views
Martin Hope
pregmatch
Asked: 2019-03-23 08:16:03 +0800 CST

如何将新模块添加到正在运行的 ejabberd 节点?

  • 0

我跟进了本教程https://blog.process-one.net/elixir-sips-ejabberd-with-elixir-part-1/如何编写 ejabberd 模块。这很好用,我把模块放到 ejabberd/src 然后编译所有东西。

但这对我来说是很多工作。每次在开发过程中更改一行代码时,我都必须使用新更改的模块从头开始重新编译 ejabberd。有什么方法可以编译模块然后将其复制到 ejabberd 模块路径?

如果是,ejabberd 模块路径在哪里?如果是,我应该阅读什么教程?

ejabberd
  • 1 个回答
  • 329 Views
Martin Hope
IPcorp
Asked: 2019-01-05 00:53:16 +0800 CST

埃贾伯德。不同的端口 - 不同的访问

  • -1

在两个端口上有一个连接......在 5288 用户通过浏览器的 Web 套接字连接,在 5222 通过常规客户端连接......当没有访问限制时,一切都连接,一切正常......如果我只添加访问权限到客户端端口 5222 上的管理员,然后 5288 上的 websocket 开始流动“服务服务拒绝访问。SASL 绑定失败。” ...问题是,是否可以按端口划分访问?我在哪里可以扭它?

listen:
  -
    port: 5288
    module: ejabberd_http
    request_handlers:
      "/ ws": ejabberd_http_ws
    web_admin: true
  -
    port: 5222
    module: ejabberd_c2s
# access:
# - allow: admin
ejabberd
  • 1 个回答
  • 278 Views
Martin Hope
Miati
Asked: 2018-12-14 18:28:26 +0800 CST

ejabberd 只为一个域注册用户

  • 0

使用 ejabberd 18.12 我有两个虚拟主机:

  • domain1.tld
  • domain2.tld

当我执行命令时

ejabberdctl register foo domain1.tld password

该用户还注册了 domain2.tld。

无论如何要为一个域注册用户吗?

例如,foo@domain1.tld 和 foo@domain2.tld 不应该是同一个帐户

ejabberd
  • 1 个回答
  • 386 Views

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