XMPP “stream:error (conflict)” on login with (a)Sm

2019-02-09 05:53发布

问题:

Currently i am working with xmpp/jabber chat for android.i just tried with Openfire and try to connect my jabber account.connection was successful.but i am not able to send any message.it shows some conflict error.please check the error log.give me a solution for this.

Initializing connection to server eworks port 5222
Connected: true
Creating entry for buddy 'testuser2' with name testuser2
Sending mesage 'Hello mate' to user testuser2@eworks
Buddy:testuser2 - Status:null
stream:error (conflict)
at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:306)
at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:44)
at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:76)

回答1:

A XMPP stream:error because of a conflict means that there is already a connection with the same full JID (that is bare JID and resource part).

Most XMPP servers are able to handle conflicts by re-assigning a different resource once a conflict is detected. This behavior can be configured.