2017-07-25 43 views
2

Android设备上使用smack API(4.2)注册用户时发生错误我试图找到错误的原因,但找不到它。如果任何人都可以建议一种方式,将不胜感激。我试图注册用户在ejabberd(17.07)

早些时候我使用ejabberd版本2.1与默认mnesia,它工作正常。我能够从Android应用程序注册用户。

但现在,当我安装了新的ejabberd 17.07与MySQL,它给了我错误如下:

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 

回答

1

它,因为用户或IP没有特权注册新user.You需要做的很少有这样的事情。 启用mod_register

mod_register: access_from:所有 访问:注册

。确保您的IP封锁是不是enabled.Also检查access_rules寄存器: - 允许

没有评论。