Project

General

Profile

Bug #8305

tigase 8.0 cluster by using mongodb

Added by w xy 6 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Database:
MongoDB
Applicable version:
8.0.0
Source Code Disclaimer:

Description

there is a bug with starting.

MongoDualIPRepository.queryAllDB() WARNING: Problem getting elements from DB:
java.lang.NullPointerException
at tigase.xmpp.jid.BareJID.parseJID(BareJID.java:181)
at tigase.xmpp.jid.BareJID.bareJIDInstance(BareJID.java:75)
at tigase.mongodb.MongoDualIPRepository.queryAllDB(MongoDualIPRepository.java:63)
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.stats.StatisticsInvocationHandler.invoke(StatisticsInvocationHandler.java:77)
at com.sun.proxy.$Proxy47.queryAllDB(Unknown Source)
at tigase.server.xmppclient.SeeOtherHostDualIP$DualIPRepositoryWrapper.queryAllDB(SeeOtherHostDualIP.java:221)
at tigase.server.xmppclient.SeeOtherHostDualIP.reloadRedirection(SeeOtherHostDualIP.java:187)
at tigase.server.xmppclient.SeeOtherHostDualIP.initialize(SeeOtherHostDualIP.java:173)
at tigase.kernel.core.Kernel.initBean(Kernel.java:139)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:1270)
at tigase.kernel.core.Kernel.injectDependency(Kernel.java:878)
at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1550)
at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:576)
at tigase.kernel.core.Kernel.initBean(Kernel.java:131)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:1270)
at tigase.kernel.core.Kernel.injectIfRequired(Kernel.java:1045)
at tigase.kernel.core.Kernel.getInstance(Kernel.java:311)
at tigase.server.Bootstrap.start(Bootstrap.java:170)
at tigase.server.XMPPServer.start(XMPPServer.java:185)
at tigase.server.XMPPServer.main(XMPPServer.java:139)

the class:MongoDualIPRepository -> method:queryAllDB -> boy :

Document dto = (Document)var2.next();
** String user_jid = (String)dto.get("hostname");**
String node_jid = (String)dto.get("secondary");

the class:ClConMongoRepository ->method:reload -> body:

Document dto = (Document)var2.next();
ClConMongoRepository.ClusterRepoItem item = this.getItemInstance();
item.setHostname((String)dto.get("_id"));
item.setSecondaryHostname((String)dto.get("secondary"));
item.setPassword((String)dto.get("password"));
item.setLastUpdate(((Date)dto.get("updated")).getTime());
item.setPort((Integer)dto.get("port"));
item.setCpuUsage((Double)dto.get("cpu_usage"));
item.setMemUsage((Double)dto.get("mem_usage"));

and the table tig_cluster_nodes , these column:

_id,secondary,password,updated,port,cpu_usage,mem_usage。

the hostname could not be found in the table, so throwing NPE.

QQ20181101-143837@2x.png (46.4 KB) QQ20181101-143837@2x.png w xy, 2018-10-31 11:53 PM
QQ20181101-182935@2x.png (225 KB) QQ20181101-182935@2x.png w xy, 2018-11-01 03:31 AM
6581
6585

Associated revisions

Revision a56f6e6d (diff)
Added by Andrzej Wójcik IoT 1 CloudTigaseTeam 6 months ago

#8305: fixed MongoDB support for see-other-host dual-ip repository

Revision 51727e99 (diff)
Added by W Administrator 6 months ago

#8305 information in release notes about fixing issue with SeeOtherHostDualIP when using MongoDB

History

#3 Updated by Andrzej Wójcik IoT 1 CloudTigaseTeam 6 months ago

  • Status changed from New to In QA
  • Assignee set to w xy
  • % Done changed from 0 to 100

I've fixed cause of this issue and now it should work for you without any issues. Please check next snapshot build to confirm that fix works for you.

#4 Updated by Wojciech Kapcia TigaseTeam about 2 months ago

  • Status changed from In QA to Closed

Closed due to inactivity (fixed and tested by Tigase Team)

Also available in: Atom PDF