Sorry for the late reply.
Please correct me if I am wrong:
- there are 3 nodes, node 1 is the senior member.
- on each node there is a client online (A node 1, B node 2, C node 3)
- node 1 is restarted
- node 2 becomes the senior member
- node 1 joins the cluster
- node 1 makes a
SeniorMemberServicesRequest
to node 2 - node 2 creates the response and gets the
ServiceInfo
for each service - in the
ServiceInfo
constructor, allMUCRoom
s are fetched and aRoomInfo
is created for each.
In theRoomInfo
constructor, anOccupantAddedEvent
is created for each occupant. - the NodeID of node 2 is taken before this fix.
=> for client C it is the wrong NodeID, because it should be the one of node 3.
- node 3 is stopped
- the
leftCluster
event in theMultiUserChatManager
is called with the NodeID of node 3. - all
MUCRole
s with the NodeID of node 3 are fetched from theMUCRoom
and thusmucRoom.leaveRoom
is called.
=> in our case this is none, because the RemoteMUCRole
for client C of node 3 was provided with the NodeID of node 2. Therefore the role is not removed from the MUC.
=> if client C is now joined on node 1 in the MUC alreadyJoinedWithThisNick
(approximately line: 619) is true and joinRole = occupantsByFullJID.get(user.getAddress());
(approximately line: 646) is null. Why this is null, I can’t tell “yet”. If the fix is applied, then the MUCRole
is removed and the user can join without problems because alreadyJoinedWithThisNick
returns false. But unfortunately, we found out yesterday that this error can still happen, it’s just apparently not as likely anymore.
In our case, each device has a unique resource (in the jid). If a new user logs in, they get a new resource. Each user can have multiple devices. Each user has a fixed nickname in the MUCs that is the same on all devices. I.e. it can happen that in the MUC a user is online several times with the same bare jid and the same nickname but different full jid. All devices automatically connect to the server in case of disconnections and automatically join the MUCs in which they have an affiliation>member.
Best Regards
chp