从asmack android在ejabberd服务器上创建新用户帐户时出错

时间:2016-06-22 10:39:23

标签: android amazon-ec2 ejabberd asmack

我正在尝试从android asmack库在ejabberd服务器上注册一个新用户,但它给了我以下错误:

org.jivesoftware.smack.XMPPException$XMPPErrorException: XMPPError:
 forbidden - auth

我已经在ejabberd服务器上做了一些更改,请检查我是否有任何错误:

{access,register,[{allow,all}]}。

但我仍然得到同样的错误。

{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, ["admin1@example.org"]},

                  {access_from, register}
                 ]},

1 个答案:

答案 0 :(得分:1)

我也面临同样的问题,但毕竟我找到了解决方案。所以像{/ p>一样添加mod_register

{access,mod_register, [{access_from, register}]},

ejabberd服务器上的访问规则中。可能会有所帮助。