Project

General

Profile

Some warnings when enable Clustering on Tigase 7.2.0-SNAPSHOT servers?

Wei Sun
Added 2 months ago

My exactly version of tigase-server is 9908af23d8ab8f7b186a5b52fed11d922944e24e.
my init.properties file contain the following:

--cluster-mode = true

When I restart the tigase-server, lots of warnings will appear in tigase-console.log:
warning1:

2017-09-12 20:02:40.447 [main]             Kernel.injectDependencies()        WARNING:  Could not initialize bean presenceCollectorModule, skipping injection of this bean
tigase.kernel.KernelException: Can't inject <null> to field tigase.pubsub.modules.PresenceCollectorModule.capsModule
        at tigase.kernel.core.Kernel.inject(Kernel.java:477)
        at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:571)
        at tigase.kernel.core.Kernel.initBean(Kernel.java:144)
        at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:537)
        at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:703)
        at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1305)
        at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:984)
        at tigase.kernel.core.Kernel.initBean(Kernel.java:140)
        at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:537)
        at tigase.kernel.core.Kernel.initBean(Kernel.java:144)
        at tigase.kernel.core.Kernel.getInstance(Kernel.java:357)
        at tigase.server.Bootstrap.start(Bootstrap.java:107)
        at tigase.server.XMPPServer.start(XMPPServer.java:130)
        at tigase.server.XMPPServer.main(XMPPServer.java:111)

warning2:

2017-09-12 20:02:40.450 [main]             Kernel.injectDependencies()        WARNING:  Could not initialize bean manageAffiliationsModule, skipping injection of this bean
tigase.kernel.KernelException: Can't inject <null> to field tigase.pubsub.AbstractPubSubModule.repository
        at tigase.kernel.core.Kernel.inject(Kernel.java:477)
        at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:571)
        at tigase.kernel.core.Kernel.initBean(Kernel.java:144)
        at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:537)
        at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:703)
        at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1305)
        at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:984)
        at tigase.kernel.core.Kernel.initBean(Kernel.java:140)
        at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:537)
        at tigase.kernel.core.Kernel.initBean(Kernel.java:144)
        at tigase.kernel.core.Kernel.getInstance(Kernel.java:357)
        at tigase.server.Bootstrap.start(Bootstrap.java:107)
        at tigase.server.XMPPServer.start(XMPPServer.java:130)
        at tigase.server.XMPPServer.main(XMPPServer.java:111)

warning3:

2017-09-12 19:56:41.993 [stats-cache]      StatisticsProvider$StatisticsCache$1.run()  WARNING: Problem retrieving statistics: 
tigase.kernel.KernelException: Can't find bean implementing interface tigase.pubsub.repository.IPubSubRepository
        at tigase.kernel.core.Kernel.getInstance(Kernel.java:317)
        at tigase.kernel.core.Kernel.getInstance(Kernel.java:313)
        at tigase.kernel.core.Kernel.getInstance(Kernel.java:302)
        at tigase.pubsub.PubSubComponent.getStatistics(PubSubComponent.java:143)
        at tigase.stats.StatisticsCollector.getComponentStats(StatisticsCollector.java:375)
        at tigase.stats.StatisticsCollector.getAllStats(StatisticsCollector.java:351)
        at tigase.stats.StatisticsProvider$StatisticsCache.update(StatisticsProvider.java:711)
        at tigase.stats.StatisticsProvider$StatisticsCache.access$3500(StatisticsProvider.java:571)
        at tigase.stats.StatisticsProvider$StatisticsCache$1.run(StatisticsProvider.java:670)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)

and so on.

Does it matter? How to solve the problems? thanks


Replies (3)

Added by Wojciech Kapcia 2 months ago

Wei Sun wrote:

My exactly version of tigase-server is 9908af23d8ab8f7b186a5b52fed11d922944e24e.
my init.properties file contain the following:

Providing complete configuration would be very helpful.

Does it matter? How to solve the problems? thanks

It looks like you are using some sort of custom build (vide commit details) - please:
  • verify that your config works with binaries provided by us;
  • verify that your custom build has all required dependencies.

Added by Wei Sun about 2 months ago

Hi Wojciech, I have checked out the current version of Tigase XMPP Server source code, the version number is 756fd24bc6de95e70348f165742fd4b0ce22f685. I can start the Tigase XMPP Server on centos-7(linux) successfully.
but when I enable Clustering on tigase servers on two Hosts(host1 and host2).
Some warnings appear on host2 once I use XMPP client login to the Tigase XMPP Server of host1(XMPP clients can login to the Server successfully):

2017-09-29 11:48:11.378 [pool-1-thread-7]  EventBusImplementation.lambda$doFireThreadPerHandler$0()  WARNING: Exception during execution of event: tigase.xmpp.impl.MessageCarbons.MessageCarbonsStateChangedEvent
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at tigase.eventbus.impl.ReflectEventListenerHandler.dispatch(ReflectEventListenerHandler.java:52)
        at tigase.eventbus.impl.EventBusImplementation.lambda$doFireThreadPerHandler$0(EventBusImplementation.java:116)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at tigase.eventbus.impl.ReflectEventListenerHandler.dispatch(ReflectEventListenerHandler.java:50)
        at tigase.eventbus.impl.EventBusImplementation.lambda$doFireThreadPerHandler$0(EventBusImplementation.java:116)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
        at tigase.xmpp.impl.MessageCarbons.stateChanged(MessageCarbons.java:309)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at tigase.eventbus.impl.ReflectEventListenerHandler.dispatch(ReflectEventListenerHandler.java:50)
        at tigase.eventbus.impl.EventBusImplementation.lambda$doFireThreadPerHandler$0(EventBusImplementation.java:116)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

Also, when user1 login to host1, user2 login to host2, user1 cannot chat with user2.
Checking Cluster Connections with Psi XMPP Client, the other cluster node is presented(refer to "Checking Cluster Connections with psi.png").

the config.tdsl file on host1:

admins = [ 'admin@www.touchair.cn','http@www.touchair.cn', 'http@host1' ]
'cluster-mode' = true
'config-type' = '--gen-config-def'
'virtual-hosts' = [ 'www.touchair.cn', 'touchat.touchair.cn' ]
dataSource {
    default () {
        uri = 'jdbc:mysql://127.0.0.1:3306/tigasedb?user=user&password=password&autoCreateUser=true&useUnicode=true&characterEncoding=utf8&useSSL=false&autoReconnect=true'
    }
}
httpServer {
    connections {
        8082 () {
            domain = 'www.touchair.cn'
            socket = 'plain'
        }
    }
}
'message-archive' (class: tigase.archive.MessageArchiveComponent) {}
pubsub (class: tigase.pubsub.PubSubComponent) {}
'sess-man' (class: tigase.server.xmppsession.SessionManager) {
    'message-archive-xep-0136' (class: tigase.archive.processors.Xep0136MessageArchivingProcessor) {
        'required-store-method' = 'body'
    }
}

the config.tdsl file on host2:

admins = [ 'admin@www.touchair.cn', 'http@www.touchair.cn', 'http@host2' ]
'cluster-mode' = true
'config-type' = '--gen-config-def'
'virtual-hosts' = [ 'www.touchair.cn', 'touchat.touchair.cn' ]
dataSource {
    default () {
        uri = 'jdbc:mysql://host1IP:3306/tigasedb?user=user&password=password&autoCreateUser=true&useUnicode=true&characterEncoding=utf8&useSSL=false&autoReconnect=true'
    }
}
httpServer {
    connections {
        8082 () {
            domain = 'www.touchair.cn'
            socket = 'plain'
        }
    }
}
'message-archive' (class: tigase.archive.MessageArchiveComponent) {}
pubsub (class: tigase.pubsub.PubSubComponent) {}
'sess-man' (class: tigase.server.xmppsession.SessionManager) {
    'message-archive-xep-0136' (class: tigase.archive.processors.Xep0136MessageArchivingProcessor) {
        'required-store-method' = 'body'
    }
}

What should I do to enable user1(connected to host1) can chat with user2(connected to host2)? thanks.

Added by Andrzej Wójcik about 2 months ago

You config is not good for a clustered deployment of Tigase XMPP Server. In your config, you are passing class names of components which are designed to run only in single-host mode, ie.
  • tigase.pubsub.PubSubComponent
  • tigase.server.xmppsession.SessionManager

Please remove from your config references to those classes by changing:

pubsub (class: tigase.pubsub.PubSubComponent) {}
'sess-man' (class: tigase.server.xmppsession.SessionManager) {

to

pubsub () {}
'sess-man' () {

This will allow Tigase XMPP Server to automatically select proper components implementations and load components designed to work in a cluster mode.

    (1-3/3)