无法加入组 - 将状态丢弃到不可用的资源 - ejabberd

Can not join group - dropping presence to unavailable resouce - ejabberd

嘿,我尝试 运行 ejabberd 的本地实例并使用 Adium 连接到它 - 我能够这样做,但是 运行 在尝试加入群聊时遇到问题。

我已经尝试通过 运行ning ejabberdctl create_room room1 localhost localhost 创建房间并通过 Adium 连接,但这是我收到的错误消息:

2018-10-19 22:48:51.550 [debug] <0.2234.0>@xmpp_socket:parse:374 (tcp|<0.2234.0>)
Received XML on stream = <<"
    <presence to='room1@localhost/dan'>
        <c xmlns='http://jabber.org/protocol/caps' 
            node='http://pidgin.im/' hash='sha-1' 
             ver='DdnydQG7RGhP9E3k9Sf+b+bF0zo='/>
        <x xmlns='http://jabber.org/protocol/muc'/>
    </presence>
">>

和:

#presence{id = <<>>,type = available,lang = <<"en">>,
      from = #jid{user = <<"danmiller">>,server = <<"localhost">>,
                  resource = <<"8c859086572c">>,luser = <<"danmiller">>,
                  lserver = <<"localhost">>,
                  lresource = <<"8c859086572c">>},
      to = #jid{user = <<"room1">>,server = <<"localhost">>,
                resource = <<"dan">>,luser = <<"room1">>,
                lserver = <<"localhost">>,lresource = <<"dan">>},
      show = undefined,status = [],priority = undefined,
      sub_els = [#xmlel{name = <<"c">>,
                        attrs = [{<<"xmlns">>,
                                  <<"http://jabber.org/protocol/caps">>},
                                 {<<"node">>,<<"http://pidgin.im/">>},
                                 {<<"hash">>,<<"sha-1">>},
                                 {<<"ver">>,
                                  <<"DdnydQG7RGhP9E3k9Sf+b+bF0zo=">>}],
                        children = []},
                 #xmlel{name = <<"x">>,
                        attrs = [{<<"xmlns">>,
                                  <<"http://jabber.org/protocol/muc">>}],
                        children = []},
                 #vcard_xupdate{hash = <<>>}],
      meta = #{ip => {0,0,0,0,0,0,0,1}}}
2018-10-19 22:48:51.552 [debug] <0.2234.0>@ejabberd_local:do_route:141 local route:
#presence{id = <<>>,type = available,lang = <<"en">>,
      from = #jid{user = <<"danmiller">>,server = <<"localhost">>,
                  resource = <<"8c859086572c">>,luser = <<"danmiller">>,
                  lserver = <<"localhost">>,
                  lresource = <<"8c859086572c">>},
      to = #jid{user = <<"room1">>,server = <<"localhost">>,
                resource = <<"dan">>,luser = <<"room1">>,
                lserver = <<"localhost">>,lresource = <<"dan">>},
      show = undefined,status = [],priority = undefined,
      sub_els = [#xmlel{name = <<"c">>,
                        attrs = [{<<"xmlns">>,
                                  <<"http://jabber.org/protocol/caps">>},
                                 {<<"node">>,<<"http://pidgin.im/">>},
                                 {<<"hash">>,<<"sha-1">>},
                                 {<<"ver">>,
                                  <<"DdnydQG7RGhP9E3k9Sf+b+bF0zo=">>}],
                        children = []},
                 #xmlel{name = <<"x">>,
                        attrs = [{<<"xmlns">>,
                                  <<"http://jabber.org/protocol/muc">>}],
                        children = []},
                 #vcard_xupdate{hash = <<>>}],
      meta = #{ip => {0,0,0,0,0,0,0,1}}}
2018-10-19 22:48:51.552 [debug] <0.2234.0>@ejabberd_sm:do_route:651 processing packet to full JID:
#presence{id = <<>>,type = available,lang = <<"en">>,
      from = #jid{user = <<"danmiller">>,server = <<"localhost">>,
                  resource = <<"8c859086572c">>,luser = <<"danmiller">>,
                  lserver = <<"localhost">>,
                  lresource = <<"8c859086572c">>},
      to = #jid{user = <<"room1">>,server = <<"localhost">>,
                resource = <<"dan">>,luser = <<"room1">>,
                lserver = <<"localhost">>,lresource = <<"dan">>},
      show = undefined,status = [],priority = undefined,
      sub_els = [#xmlel{name = <<"c">>,
                        attrs = [{<<"xmlns">>,
                                  <<"http://jabber.org/protocol/caps">>},
                                 {<<"node">>,<<"http://pidgin.im/">>},
                                 {<<"hash">>,<<"sha-1">>},
                                 {<<"ver">>,
                                  <<"DdnydQG7RGhP9E3k9Sf+b+bF0zo=">>}],
                        children = []},
                 #xmlel{name = <<"x">>,
                        attrs = [{<<"xmlns">>,
                                  <<"http://jabber.org/protocol/muc">>}],
                        children = []},
                 #vcard_xupdate{hash = <<>>}],
      meta = #{ip => {0,0,0,0,0,0,0,1}}}
2018-10-19 22:48:51.553 [debug] <0.2234.0>@ejabberd_sm:do_route:664 dropping presence to unavailable resource:
#presence{id = <<>>,type = available,lang = <<"en">>,
      from = #jid{user = <<"danmiller">>,server = <<"localhost">>,
                  resource = <<"8c859086572c">>,luser = <<"danmiller">>,
                  lserver = <<"localhost">>,
                  lresource = <<"8c859086572c">>},
      to = #jid{user = <<"room1">>,server = <<"localhost">>,
                resource = <<"dan">>,luser = <<"room1">>,
                lserver = <<"localhost">>,lresource = <<"dan">>},
      show = undefined,status = [],priority = undefined,
      sub_els = [#xmlel{name = <<"c">>,
                        attrs = [{<<"xmlns">>,
                                  <<"http://jabber.org/protocol/caps">>},
                                 {<<"node">>,<<"http://pidgin.im/">>},
                                 {<<"hash">>,<<"sha-1">>},
                                 {<<"ver">>,
                                  <<"DdnydQG7RGhP9E3k9Sf+b+bF0zo=">>}],
                        children = []},
                 #xmlel{name = <<"x">>,
                        attrs = [{<<"xmlns">>,
                                  <<"http://jabber.org/protocol/muc">>}],
                        children = []},
                 #vcard_xupdate{hash = <<>>}],
      meta = #{ip => {0,0,0,0,0,0,0,1}}}

我相信我的配置设置正确,modules.mod_muc.access: all

我错过了什么?

我通过仔细阅读 mod_muc 模块的文档找到了答案:

Module options:

host: HostName: This option defines the Jabber ID of the service. If the host
option is not specified, the Jabber ID will be the hostname of the virtual host
with the prefix ‘conference.’. The keyword “@HOST@” is replaced at start time with
the real virtual host name.

当我需要连接到 room1@conference.localhost 或将 host: localhost 添加到我在 mod_muc 部分下的配置时,我试图在 room1@localhost 连接并创建一个房间