无法通过 Pidgin 在本地主机 ejabberd 上注册新用户(503:服务不可用)

无法通过 Pidgin 在本地主机 ejabberd 上注册新用户(503:服务不可用)

我在本地主机上设置了 ejabberd 服务器,现在可以访问管理面板localhost:5280/admin

在 pidgin 中我填写了以下值:

username: root
password: password
host: localhost
resource: 5280  

并选中“在服务器上创建这个新帐户”

我的 mod_register 位于/etc/ejabberd/ejabberd.cfg

{mod_register, [
              %%
              %% After successful registration, the user receives
              %% a message with this subject and body.
              %%
              {welcome_message, {"Welcome!",
                                 "Welcome to a Jabber service powered by De$
                                 "For information about Jabber visit "
                                 "http://www.jabber.org"}},
              %% Replace it with 'none' if you don't want to send such mess$
              %%{welcome_message, none},

              %%
              %% When a user registers, send a notification to
              %% these Jabber accounts.
              %%
              %%{registration_watchers, ["[email protected]"]},
              {access, register, [{allow, all}]}
             ]},

当我尝试注册用户 pidgin 时显示错误 503:服务不可用

我哪里错了?

更新型多巴胺

洋泾浜日志:

(14:13:30) connection: Activating keepalive.
(14:13:31) jabber: Sending (ssl) (zuber@localhost/5280): <iq type='set' id='purple28d4cf' to='localhost'><query xmlns='jabber:iq:register'><username>zuber</username><password>123456</password></query></iq>
(14:13:31) jabber: Recv (ssl)(163): <iq from='localhost' id='purple28d4cf' type='error'><error code='503' type='cancel'><service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>
(14:13:31) account: Disconnecting account zuber@localhost/5280 (0x7f06e57042b0)
(14:13:31) connection: Disconnecting connection 0x7f06e5606e30
(14:13:31) connection: Deactivating keepalive.

Ejabberd日志:

=ERROR REPORT==== 2016-03-08 14:13:31 ===
E(<0.397.0>:ejabberd_hooks:335) : {{case_clause,
                                    {value,{access,register,[{allow,all}]}}},
                                   [{gen_mod,get_opt,3,
                                     [{file,"gen_mod.erl"},{line,154}]},
                                    {mod_register,process_iq,4,
                                     [{file,"mod_register.erl"},{line,109}]},
                                    {mod_register,
                                     unauthenticated_iq_register,4,
                                     [{file,"mod_register.erl"},{line,78}]},
                                    {ejabberd_hooks,run_fold1,4,
                                     [{file,"ejabberd_hooks.erl"},{line,331}]},
                                    {ejabberd_c2s,
                                     process_unauthenticated_stanza,2,
                                     [{file,"ejabberd_c2s.erl"},{line,2179}]},
                                    {ejabberd_c2s,wait_for_feature_request,2,
                                     [{file,"ejabberd_c2s.erl"},{line,731}]},
                                    {p1_fsm,handle_msg,10,
                                     [{file,"p1_fsm.erl"},{line,544}]},
                                    {proc_lib,init_p_do_apply,3,
                                     [{file,"proc_lib.erl"},{line,239}]}]}
running hook: {c2s_unauthenticated_iq,
                  ["localhost",
                   {iq,"purple28d4cf",set,"jabber:iq:register",[],
                       {xmlelement,"query",
                           [{"xmlns","jabber:iq:register"}],
                           [{xmlelement,"username",[],
                                [{xmlcdata,<<"zuber">>}]},
                            {xmlelement,"password",[],
                                [{xmlcdata,<<"123456">>}]}]}},
                   {{127,0,0,1},57138}]}

答案1

我按照其他教程设置了 ejabberd 并且一切开始正常工作。

sudo apt-get install ejabberd

在/etc/ejabberd/ejabberd.cfg:

  1. 取消注释行

    覆盖本地

  2. mod_register配置中:

    %% 管理员用户 {acl, admin, {user, "admin", "localhost"}}。

    %% 主机名 {hosts, ["localhost"]}。

  3. 节中ACCESS RULES

    {访问,注册,[{允许,全部}]}。

  4. 重启服务器:

    sudo 服务 ejabberd 重启

相关内容