Projects tigase _server server-core Issues #914
EventBus registration fails on connection between cluster nodes (#914)
Andrzej Wójcik (Tigase) opened 7 years ago

When cluster nodes connect, the one initiation connection (just started) will reject to subscribe to events, nodes which are connecting to it.

Andrzej Wójcik (Tigase) commented 7 years ago

2018-01-16 19:02:26.122 [in_0-eventbus] SubscribeModule.processNonClusterSubscription() FINEST: Processing noncluster subscription request from eventbus@node1.xmpp-test.net

2018-01-16 19:02:26.123 [in_0-eventbus] SubscribeModule.processNonClusterSubscription() FINE: Subscription rejected. Subscriber eventbus@node1.xmpp-test.net has bad affiliation: none

2018-01-16 19:02:26.134 [pool-27-thread-1] BasicComponent.refreshTrustedJids() FINEST: component cl-comp got trusted jids set as []

2018-01-16 19:02:26.134 [pool-27-thread-1] BasicComponent.nodeConnected() FINE: Node connected: node1.xmpp-test.net

2018-01-16 19:02:26.134 [pool-27-thread-1] EventBusComponent.onNodeConnected() FINE: Cluster node eventbus@node1.xmpp-test.net added to Affiliation Store

As visible in this log, onNodeConnected() method of EventBusComponent is called after packet from remote cluster node is delivered. This is caused by a race condition as onNodeConnected() method execution is too slow and packets may be delivered using different cluster connections resulting in an error.

As EventBusComponent is critical for Tigase XMPP Server and need to properly work in the cluster I've decided to move it in front of the list of components for which onNodeConnected() is executed.

This fixes this issue and is a solution for #6574 as well.

Log entries with the fix applied:

2018-01-17 14:07:24.027 [pool-27-thread-2] SubscribeModule.clusterNodeConnected() FINER: Node eventbus@node1.xmpp-test.net is connected. Preparing subscribe request.

2018-01-17 14:07:24.028 [pool-27-thread-2] SubscribeModule.sendSubscribeRequest() FINER: Sending subscribe request (id=node2.xmpp-test.net-1) to node eventbus@node1.xmpp-test.net

2018-01-17 14:07:24.084 [in_0-eventbus] SubscribeModule.processClusterSubscription() FINEST: Processing cluster subscription request from eventbus@node1.xmpp-test.net

2018-01-17 14:07:24.084 [in_0-eventbus] SubscribeModule.processClusterSubscription() FINE: Node eventbus@node1.xmpp-test.net subscribed for events tigase.eventbus.impl.ListenerRemovedEvent

2018-01-17 14:07:24.084 [in_0-eventbus] SubscribeModule.processClusterSubscription() FINE: Node eventbus@node1.xmpp-test.net subscribed for events tigase.pubsub.modules.ext.presence.LogoffFromNodeEvent

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
6598
Version
tigase-server-8.0.0
Spent time
25h
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#914
Please wait...
Page is in error, reload to recover