问题描述
我试图找到错误的原因,但找不到。如果有人可以提出建议,将不胜感激。
I tried to find the reason of the error but cannot found it. If anyone can suggest a way it will be highly appreciated.
以前,我使用的是ejabberd 2.1版,默认设置为mnesia,可以正常工作。我可以从Android应用程序注册用户。
Earlier I was using ejabberd version 2.1 with default mnesia, which was working fine. I was able to register users from the android app.
但是现在当我用mysql安装新的ejabberd 17.07时,它给了我如下错误:
But now when I installed new ejabberd 17.07 with mysql, it gave me error as follow:
Connection XMPPTCPConnection[not-authenticated] (5) closed with error
org.jivesoftware.smack.XMPPException$StreamErrorException: not-authorized You can read more about the meaning of this stream error at http://xmpp.org/rfcs/rfc6120.html#streams-error-conditions
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1046)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:980)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:996)
at java.lang.Thread.run(Thread.java:818)
E/ExceptionException: org.jivesoftware.smack.SmackException$NotConnectedException: The connection XMPPTCPConnection[not-authenticated] (5) is no longer connected while waiting for response with StanzaIdFilter: id=jq6OD-18
推荐答案
用户或ip用户无权注册新用户。您需要为此做些事情。
启用mod_register
its because the user or ip doesn't have the privilege to register new user.You need to do few things for that.Enable mod_register
mod_register:
access_from:所有
访问权限:注册
。确保未启用ip阻止。还要检查 access_rules ,该注册:
-允许
. Make sure your ip blocking is not enabled.Also check access_rules that register: - allow
没有评论。
这篇关于尝试在ejabberd(17.07)的android设备上使用smack api(4.2)注册用户时出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!