I tried to find the reason of the error but cannot found it. If anyone can suggest a way it will be highly appreciated.
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.
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
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: all access: register
. Make sure your ip blocking is not enabled.Also check access_rules that register: - allow
is not commented.