Tigase Forums

API and development: Client is disconnected event/stanza

Tigase XMPP Server Board - Fri, 09/07/2018 - 04:13

Hello,

I try to find a solution to identify when a client was disconnected.

In debug mode I see commands STREAM_FINISHED and STREAM_CLOSED:

2018-09-07 11:01:14.804 [in_8-message-router] TRACE tigase.server.MessageRouter - Processing packet: from=c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742, to=sess-man@dd6ac6c44c2a, DATA=<iq to="sess-man@dd6ac6c44c2a" type="set" from="c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742" id="8c4a1ac5-55e9-4c09-8fe2-24d6ab0ee3b1"><command xmlns="http://jabber.org/protocol/commands" node="STREAM_FINISHED"/></iq>, SIZE=223, XMLNS=null, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=set 2018-09-07 11:01:14.804 [in_8-message-router] TRACE tigase.server.MessageRouter - Called for : sess-man@dd6ac6c44c2a 2018-09-07 11:01:14.804 [in_8-message-router] TRACE tigase.server.MessageRouter - Called for : sess-man@dd6ac6c44c2a 2018-09-07 11:01:14.804 [in_40-sess-man] TRACE tigase.server.xmppsession.SessionManager - Received packet: from=c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742, to=sess-man@dd6ac6c44c2a, DATA=<iq to="sess-man@dd6ac6c44c2a" from="c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742" type="set" delay="120" retryCount="15" id="4cd49349-687f-4648-b4f2-e8d03c13710b"><command xmlns="http://jabber.org/protocol/commands" node="STREAM_CLOSED"><x xmlns="jabber:x:data" type="submit"><field var="user-jid"><value>CData size: 41</value></field></x></command></iq>, SIZE=387, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=set 2018-09-07 11:01:14.804 [in_40-sess-man] DEBUG tigase.server.xmppsession.SessionManager - STREAM_CLOSED command from: c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742 2018-09-07 11:01:14.804 [in_8-message-router] TRACE tigase.server.MessageRouter - 1. Packet will be processed by: sess-man@dd6ac6c44c2a, from=c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742, to=sess-man@dd6ac6c44c2a, DATA=<iq to="sess-man@dd6ac6c44c2a" type="set" from="c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742" id="8c4a1ac5-55e9-4c09-8fe2-24d6ab0ee3b1"><command xmlns="http://jabber.org/protocol/commands" node="STREAM_FINISHED"/></iq>, SIZE=223, XMLNS=null, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=set 2018-09-07 11:01:14.804 [in_8-message-router] TRACE tigase.server.MessageRouter - Processing packet: from=sess-man@dd6ac6c44c2a, to=c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742, DATA=<iq to="c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742" type="result" from="sess-man@dd6ac6c44c2a" id="4cd49349-687f-4648-b4f2-e8d03c13710b"/>, SIZE=145, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=result 2018-09-07 11:01:14.804 [in_8-message-router] TRACE tigase.server.MessageRouter - Called for : c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742 2018-09-07 11:01:14.804 [in_8-message-router] TRACE tigase.server.MessageRouter - No componentID matches (fast lookup against exact address): c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742, for map: [c2s@dd6ac6c44c2a, department@dd6ac6c44c2a, amp@dd6ac6c44c2a, monitor@dd6ac6c44c2a, bosh@dd6ac6c44c2a, s2s@dd6ac6c44c2a, vhost-man@dd6ac6c44c2a, basic-conf@dd6ac6c44c2a, cluster-response-manager@dd6ac6c44c2a, stats@dd6ac6c44c2a, eventbus@dd6ac6c44c2a, ws2s@dd6ac6c44c2a, sess-man@dd6ac6c44c2a, muc@dd6ac6c44c2a, usermanager@dd6ac6c44c2a]; trying VHost lookup 2018-09-07 11:01:14.804 [in_8-message-router] TRACE tigase.server.MessageRouter - Called for : c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742 2018-09-07 11:01:14.804 [in_8-message-router] TRACE tigase.server.MessageRouter - No componentID matches (fast lookup against exact address): c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742, for map: [c2s@dd6ac6c44c2a, department@dd6ac6c44c2a, amp@dd6ac6c44c2a, monitor@dd6ac6c44c2a, bosh@dd6ac6c44c2a, s2s@dd6ac6c44c2a, vhost-man@dd6ac6c44c2a, basic-conf@dd6ac6c44c2a, cluster-response-manager@dd6ac6c44c2a, stats@dd6ac6c44c2a, eventbus@dd6ac6c44c2a, ws2s@dd6ac6c44c2a, sess-man@dd6ac6c44c2a, muc@dd6ac6c44c2a, usermanager@dd6ac6c44c2a]; trying VHost lookup 2018-09-07 11:01:14.804 [in_8-message-router] TRACE tigase.server.MessageRouter - 1. Packet will be processed by: c2s@dd6ac6c44c2a, from=sess-man@dd6ac6c44c2a, to=c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742, DATA=<iq to="c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742" type="result" from="sess-man@dd6ac6c44c2a" id="4cd49349-687f-4648-b4f2-e8d03c13710b"/>, SIZE=145, XMLNS=null, PRIORITY=SYSTEM, PERMISSION=NONE, TYPE=result 2018-09-07 11:01:14.805 [in_40-sess-man] TRACE tigase.server.xmppsession.SessionManager - Received packet: from=c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742, to=sess-man@dd6ac6c44c2a, DATA=<iq to="sess-man@dd6ac6c44c2a" type="set" from="c2s@dd6ac6c44c2a/172.17.0.2_5222_172.17.0.1_37742" id="8c4a1ac5-55e9-4c09-8fe2-24d6ab0ee3b1"><command xmlns="http://jabber.org/protocol/commands" node="STREAM_FINISHED"/></iq>, SIZE=223, XMLNS=null, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=set

But I don't understand how I can to receive this command or there is another way to identify a closing of connection with the client.

Categories: Tigase Forums

API and development: RE: 7.1.3 or 7.2 or 8.0 ????

Tigase XMPP Server Board - Mon, 08/27/2018 - 09:17

Still polishing it. We want to make sure it is ready before release.

Categories: Tigase Forums

Installation and maintenance: RE: schema version is not loaded in the database or it is old!

Tigase XMPP Server Board - Mon, 08/27/2018 - 03:26

Bill Lei wrote:

你好,可以交流tigase project技术开发吗。

To allow the most people participate in conversation please do use English language.

Categories: Tigase Forums

Installation and maintenance: RE: schema version is not loaded in the database or it is old!

Tigase XMPP Server Board - Sun, 08/26/2018 - 22:23

你好,可以交流tigase project技术开发吗。
我的QQ:9311914
谢谢。

Categories: Tigase Forums

API and development: RE: 7.1.3 or 7.2 or 8.0 ????

Tigase XMPP Server Board - Fri, 08/24/2018 - 01:34

It's been 6 months now. What makes 8.0 from being published?

Categories: Tigase Forums

Installation and maintenance: RE: schema version is not loaded in the database or it is old!

Tigase XMPP Server Board - Tue, 08/21/2018 - 05:38

Couple of general guidelines:

  • in version 8.0.0 you should use config.tdsl instead of init.properties
  • it's recommended to use our distribution builds
    • if you want to build your own binaries, please make user you clone/checkout the latest sources from matching branches!
  • for MongoDB there is no need to run upgrade-schema per se.
Categories: Tigase Forums

Installation and maintenance: RE: schema version is not loaded in the database or it is old!

Tigase XMPP Server Board - Thu, 08/16/2018 - 08:23

I solved this problem by adding the filed of 'schema-management' in the config.tdsl. like this :

dataSource {
default () {
uri = 'mongodb://192.168.97.132:27017/tigase'
'schema-management' = false
}
}

the Solution link is [[[https://docs.tigase.org/tigase-server/snapshot/Administration_Guide/html/#_using_modified_database_schema]]]

Categories: Tigase Forums

Installation and maintenance: RE: schema version is not loaded in the database or it is old!

Tigase XMPP Server Board - Thu, 08/16/2018 - 08:03

I did that: git clone sources, removed src exclude java , for using mongodb database, i make a file named 'init.properties', the content like this:

config-type=--gen-config-def
--admins=10005@192.168.0.31
--virt-hosts =192.168.0.31
#,114.119.6.150,www.youjob.co
--debug= net

jars D:\Workspace\git\net_tigase-server\jars

##客户端连接时的端口号
##--c2s-ports=5222,5223
##服务器连接时的端口号(集群时)
##--s2s-ports=5224,5225

##mongodb://[username:password@]host1[:port1][,host2[:port2],
##...[,hostN[:portN]]][/[database][?options]]
--user-db=tigase.mongodb.MongoRepository
--auth-db=tigase.mongodb.MongoRepository
#--user-db-uri=mongodb://192.168.0.199:27017/tigase
--user-db-uri=mongodb://192.168.97.132:27017/tigase

#imapi数据库配置
##刷新用户在线状态 1:true else :false
--refresh-user-status=1
##关键词过滤功能 1:打开 0:关闭
--confirm-open-keyword=0
##imapi 的数据库链接 修改用户在线状态是用到
##mongodb://sysop:moon@localhost
#--api-db-uri=mongodb://192.168.0.199:27017/imapi
--api-db-uri=mongodb://192.168.97.132:27017/imapi
#--api-db-port=27017
#--api-db-port=imapi

--sm-plugins=-starttls,shiku-auto-reply,shiku-offline-msg,shiku-message-archive-plugin,jabber:iq:register

amp组件配置

#amp/amp-repo-uri=mongodb://192.168.0.199:27017/tigase
amp/amp-repo-uri=mongodb://192.168.97.132:27017/tigase
amp/amp-repo-class=tigase.mongodb.MongoMsgRepository

amp插件配置

#sess-man/plugins-conf/amp/amp-repo-uri=mongodb://192.168.0.199:27017/tigase
sess-man/plugins-conf/amp/amp-repo-uri=mongodb://192.168.97.132:27017/tigase
sess-man/plugins-conf/amp/amp-repo-class=tigase.mongodb.MongoMsgRepository

#--monitoring=jmx:9050

群聊组件

--comp-name-2=muc
--comp-class-2=tigase.muc.MUCComponent
muc/history-db=tigase.mongodb.muc.MongoHistoryProvider
#muc/history-db-uri=mongodb://192.168.0.199:27017/tigase
muc/history-db-uri=mongodb://192.168.97.132:27017/tigase
muc/shiku-room-db=tigase.shiku.db.MongoShikuMucRoomRepository
#muc/shiku-room-db-uri=mongodb://192.168.0.199:27017/imRoom
muc/shiku-room-db-uri=mongodb://192.168.97.132:27017/imRoom

--comp-name-3=shiku-message-archive
--comp-class-3=tigase.shiku.ShikuMessageArchiveComponent

客户端每隔一段时间(大概几十秒,每种客户端不一样)就会向服务器发tcp层保活包(带一个字节的数据)

##是否 开启根据 客户端发送的心跳包 检测 自动离线 0 关闭 1 开启
--xmpp-ping-open=0
##系统账号最大值 属于系统账号的 不需要 根据 心跳包关闭链接
--max-system-user=100200

遍历所有的连接,检查它们是否都真正的活着 间隔时间 毫秒 30000 即 30秒

--watchdog_delay=30000
--watchdog_ping_type=xmpp

毫秒 如果 客户端 超出该时间 未与服务端链接 50 秒 没有接收到心疼包 即 离线

--watchdog_timeout=50000
#shiku-message-archive/archive-repo-uri=mongodb://192.168.0.199:27017/tigase
shiku-message-archive/archive-repo-uri=mongodb://192.168.97.132:27017/tigase
shiku-message-archive/archive-repo-class=tigase.shiku.db.MongoShikuMessageArchiveRepository
shiku-message-archive/muc-msgs-split-method=year/month/day
shiku-message-archive/msgs-split-method=year/month/day

#插件参数配置
#消息存储
sess-man/plugins-conf/shiku-message-archive-plugin/component-jid=shiku-message-archive@192.168.0.31
#离线通知

sess-man/plugins-conf/shiku-offline-msg/shiku_PushUrl=http://192.168.0.31:8092/tigase/notify

and then I start with a method of main in the class of tigase.server.XMPPServer, the error has occured:

Connected to the target VM, address: '127.0.0.1:62948', transport: 'socket'
componentInfo{Title=Tigase XML Tools, Version=4.0.0-SNAPSHOT-b263/94f8b8cd(2018-08-15/02:47:07), Class=tigase.xml.XMLUtils}
componentInfo{Title=Tigase Utils, Version=4.0.0-SNAPSHOT-b374/1c509527(2018-08-07/08:44:49), Class=tigase.util.ClassUtil}
componentInfo{Class=tigase.server.XMPPServer}
Aug 16, 2018 10:24:42 PM tigase.conf.OldConfigHolder detectPathAndFormat
FINEST: No property file not specified! Using default one etc/init.properties
Aug 16, 2018 10:24:42 PM tigase.conf.OldConfigHolder detectPathAndFormat
FINEST: Provided property file /Users/wenxuyang/java-space/2018/tigase-server/server/etc/init.properties does NOT EXISTS! Trying to use default one etc/init.properties
Aug 16, 2018 10:24:42 PM tigase.conf.ConfigHolder loadFromDSLFiles
CONFIG: Loading configuration from file: etc/config.tdsl
Aug 16, 2018 10:24:42 PM tigase.conf.ConfigHolder loadConfiguration
CONFIG: Loaded configuration:
--api-db-uri = 'mongodb://192.168.97.132:27017/imapi'
--confirm-open-keyword = 0
--max-system-user = 100200
--refresh-user-status = 1
--xmpp-ping-open = 0
admins = [ '10005@192.168.0.31' ]
'config-type' = 'default'
debug = [ 'tigase' ]
'default-virtual-host' = '192.168.0.31'
'watchdog-ping-type' = 'xmpp'
'watchdog-timeout' = 30000
dataSource {
default () {
uri = 'mongodb://192.168.97.132:27017/tigase'
}
}
userRepository {
default () {
cls = 'tigase.mongodb.MongoRepository'
}
}
authRepository {
default () {
cls = 'tigase.mongodb.MongoRepository'
}
}
amp {
'amp-repo-class' = 'tigase.mongodb.MongoMsgRepository'
'amp-repo-uri' = 'mongodb://192.168.97.132:27017/tigase'
}
muc (class: tigase.muc.MUCComponent) {
'history-db' = 'tigase.mongodb.muc.MongoHistoryProvider'
'history-db-uri' = 'mongodb://192.168.97.132:27017/tigase'
'shiku-room-db' = 'tigase.shiku.db.MongoShikuMucRoomRepository'
'shiku-room-db-uri' = 'mongodb://192.168.97.132:27017/imRoom'
}
'sess-man' () {
amp {
'amp-repo-class' = 'tigase.mongodb.MongoMsgRepository'
'amp-repo-uri' = 'mongodb://192.168.97.132:27017/tigase'
}
'jabber:iq:register' () {}
'shiku-auto-reply' () {}
'shiku-message-archive-plugin' () {
'component-jid' = 'shiku-message-archive@192.168.0.31'
}
'shiku-offline-msg' () {
shiku_PushUrl = 'http://192.168.0.31:8092/tigase/notify'
}
starttls (active: false) {}
}
'shiku-message-archive' (class: tigase.shiku.ShikuMessageArchiveComponent) {
'archive-repo-class' = 'tigase.shiku.db.MongoShikuMessageArchiveRepository'
'archive-repo-uri' = 'mongodb://192.168.97.132:27017/tigase'
'msgs-split-method' = 'year/month/day'
'muc-msgs-split-method' = 'year/month/day'
}

Class name: org.groovy.debug.hotswap.ResetAgent$TimestampFieldRemover
java.lang.LinkageError: loader (instance of sun/misc/Launcher$AppClassLoader): attempted duplicate class definition for name: "org/groovy/debug/hotswap/ResetAgent$TimestampFieldRemover"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at tigase.util.ClassUtil.getClassesFromNames(ClassUtil.java:176)
at tigase.util.ClassUtil.getClassesFromClassPath(ClassUtil.java:133)
at tigase.util.reflection.ClassUtilBean.initialize(ClassUtilBean.java:92)
at tigase.server.Bootstrap.start(Bootstrap.java:129)
at tigase.server.XMPPServer.start(XMPPServer.java:185)
at tigase.server.XMPPServer.main(XMPPServer.java:139)
2018-08-16 22:24:47.324 [main] DNSResolverDefault.() WARNING: Resolving default host name: wenxuyangs-macbook-pro.local took: 3

=============================================================================
ERROR! Component server-user (MongoRepository) schema version is not loaded in the database or it is old!
Required version: 0.0.0
Please upgrade the installation by running:
$ ./scripts/tigase.sh upgrade-schema etc/tigase.conf
=============================================================================

However, i exec the command of './scripts/tigase.sh upgrade-schema etc/tigase.conf', another error has occured:

TIGASE_HOME is not set or main binary (jars/tigase-server*.jar) was missing in ..... location

Please set it to correct value before starting the sever.

and then, i put the jar of tigase-server*.jar into the folder of jars, other error has occured:

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: tigase/util/ui/console/CommandlineParameter
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException: tigase.util.ui.console.CommandlineParameter
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more

at the last, i change the type of config-type in the config.tdsl into 'setup', so these is no error, like this:

Class name: org.groovy.debug.hotswap.ResetAgent$TimestampFieldRemover
2018-08-16 22:59:34.541 [main] AbstractBeanConfigurator.registerBeans() WARNING: unknown class null for bean sess-man, skipping registration of a bean
2018-08-16 22:59:34.587 [main] DNSResolverDefault.() WARNING: Resolving default host name: wenxuyangs-macbook-pro.local took: 8
Loading component: message-router :: componentInfo{Class=tigase.server.MessageRouter}
2018-08-16 22:59:34.708 [main] DSLBeanConfigurator.dumpConfiguration() WARNING: Dumping full server configuration to: etc/config-dump.properties

== 2018-08-16 22:59:34.937 Please setup server at http://localhost:8080/

but , the url of 'http://localhost:8080/' cannot be accessed . the error that these is a string of 'dial tcp 127.0.0.1:8080: connect: connection refused' has occured on the page.

Categories: Tigase Forums

Installation and maintenance: RE: S2S - Incorrect source address - none of any local virtual host...

Tigase XMPP Server Board - Wed, 08/01/2018 - 17:41
S2C: <route to="dev01" from="node1" pr="NORMAL" perm="NONE"><iq to="dev01" type="error" id="tigase-ping" from="node1"><ping xmlns="urn:xmpp:ping"/><error code="406" type="modify"><not-acceptable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" xml:lang="en">S2S - Incorrect source address - none of any local virtual hosts or components.</text></error></iq></route>

config update

config-type = --gen-config-def --admins = admin@app.im --virt-hosts = app.im --cluster-mode = true --cluster-nodes = node1,dev01 --cluster-connect-all = true vhost-man/dns-def-ip[S]=app.im --debug=server,cluster
Categories: Tigase Forums

Installation and maintenance: RE: S2S - Incorrect source address - none of any local virtual host...

Tigase XMPP Server Board - Wed, 08/01/2018 - 17:41
on node1 log: S2C: <route to="dev01" from="node1" pr="NORMAL" perm="NONE"><iq to="dev01" type="error" id="tigase-ping" from="node1"><ping xmlns="urn:xmpp:ping"/><error code="406" type="modify"><not-acceptable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" xml:lang="en">S2S - Incorrect source address - none of any local virtual hosts or components.</text></error></iq></route> C2S: <route perm="NONE" from="node1" to="dev01" pr="NORMAL"><iq type="error" id="tigase-ping" from="node1" to="dev01"><ping xmlns="urn:xmpp:ping"/><error type="modify" code="406"><not-acceptable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xml:lang="en" xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">S2S - Incorrect source address - none of any local virtual hosts or components.</text></error></iq></route>
Categories: Tigase Forums

Installation and maintenance: S2S - Incorrect source address - none of any local virtual hosts or...

Tigase XMPP Server Board - Wed, 08/01/2018 - 07:48

2018-08-01 22:41:45.105 [in_22-s2s] S2SConnectionManager.processPacket() WARNING: Packet processing exception: {0}
tigase.xmpp.PacketErrorTypeException: The packet has already 'error' type: from=node1, to=dev01, DATA=S2S - Incorrect source address - none of any local virtual hosts or components., SIZE=343, XMLNS=null, PRIORITY=NORMAL, PERMISSION=NONE, TYPE=error
at tigase.xmpp.Authorization.getResponseMessage(Authorization.java:539)
at tigase.server.xmppserver.S2SConnectionManager.processPacket(S2SConnectionManager.java:324)
at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1426)

init.propeties

config-type = --gen-config-def
--admins = admin@app.im
--virt-hosts = app.im

--cluster-mode = true
--cluster-nodes = node1,dev01
--cluster-connect-all = true
vhost-man/dns-def-ip[S]=app.im

--debug=server,cluster

Categories: Tigase Forums

API and development: Tigase offline message storage number configuration

Tigase XMPP Server Board - Sat, 07/28/2018 - 02:38

The default number of offline messages stored by tigase is 50. Where can I modify it?

Categories: Tigase Forums

API and development: Last activity by presence away status

Tigase XMPP Server Board - Tue, 07/24/2018 - 07:34

Hello,
I'd like to implement a last activity plugin that takes into account the time passed since last presence with show=away OR last disconnection (i.e. WhatsApp-like). I can imagine I could do this in a few ways:

  • IQ-based last activity (XEP-0012) - needs modification to client's presence for adding time information
  • Last activity in presence (XEP-0256) - doesn't work with offline users since offline presence is not stored or kept in memory (for obvious performance reasons)

The first solution can be implemented using an ExtendedPresenceProcessor for adding maybe a delay tag to incoming presence, and then reading it from the last activity plugin (my own version of course). Possible performance impact because of the ExtendedPresenceProcessor. However, no client modifications required.

The second solution would require patching Tigase itself because ExtendedPresenceProcessors are called when receiving presence from clients, rather than when they are about to be broadcasted. And this solution is a pain for clients because they have to wait for presence data to come in and eventually ask for a last presence via IQ if a presence hasn't been received.

Any performance-wise (and possibly respecting standards) suggestions? Pointers, anything would be help.

Thanks!

Categories: Tigase Forums

Installation and maintenance: RE: Tigase 8.0.0 server start error

Tigase XMPP Server Board - Fri, 07/20/2018 - 06:45

I think I found the reason

I have spring boot project and

AbstractBeanConfigurator.registerBeansForBeanOfClass Set<Class<?>> classes = ClassUtilBean.getInstance().getAllClasses();

is pulling also classes from org.springframework.boot.autoconfigure and the startup is crashing when it start to process some of them here:

tigase.kernel.beans.config.AbstractBeanConfigurator.registerBeansForBeanOfClassShouldRegister(AbstractBeanConfigurator.java:185)

I manage to run it when I added in ClassUtilBean DEFAULT_PACKAGES_TO_SKIP list the "org.springframework.boot.autoconfigure" package, and run my project with that custom build jar.

Categories: Tigase Forums

Installation and maintenance: RE: Tigase 8.0.0 server start error

Tigase XMPP Server Board - Thu, 07/19/2018 - 06:35

Thank you for your quick replay

I added, where the versions are 4.0.0-SNAPSHOT

<dependency> <groupId>tigase</groupId> <artifactId>tigase-utils</artifactId> <version>${tigase.utils.version}</version> </dependency> <dependency> <groupId>tigase</groupId> <artifactId>tigase-xmltools</artifactId> <version>${tigase.xmltools.version}</version> </dependency>

but getting still the same error

Categories: Tigase Forums

Installation and maintenance: RE: Tigase 8.0.0 server start error

Tigase XMPP Server Board - Thu, 07/19/2018 - 02:12

It looks like the issue with dependencies - missing class/interface for the annotation which is used by Tigase XMPP Server. In version 7.1.x Tigase had tigase-utils and tigase-xmltools embedded but we decided to separate them and now they need to be added to dependencies.

Categories: Tigase Forums

Installation and maintenance: Tigase 8.0.0 server start error

Tigase XMPP Server Board - Thu, 07/19/2018 - 02:08

Hi,

I'm working in some project where I will manipulate user data and users will communicate through Tigase. Project currently works with 7.1.4-SNAPSHOT Tigase jar. I decided to move to 8.0.0 because mam support.

I puling Tigase jar like maven dependency i starting it like this from my main class

XMPPServer.main(new String[]{ "--property-file", configuration.getTmpPropertyFilePath().toAbsolutePath().toString() });

After I switched to 8.0.0 and changed my pom to pull 8.0.0-SNAPSHOT but now server will not start I get:

2018-07-19 09:55:32.651 [main] Kernel.getInstance() SEVERE: Exception getting instance java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724) at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531) at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355) at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286) at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120) at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72) at java.lang.Class.createAnnotationData(Class.java:3521) at java.lang.Class.annotationData(Class.java:3510) at java.lang.Class.getDeclaredAnnotation(Class.java:3458) at tigase.kernel.beans.config.AbstractBeanConfigurator.registerBeansForBeanOfClassShouldRegister(AbstractBeanConfigurator.java:185) at tigase.kernel.beans.config.AbstractBeanConfigurator.registerBeansForBeanOfClassGetBeansToRegister(AbstractBeanConfigurator.java:152) at tigase.kernel.beans.config.AbstractBeanConfigurator.registerBeansForBeanOfClass(AbstractBeanConfigurator.java:137) at tigase.kernel.beans.config.AbstractBeanConfigurator.registerBeansForBeanOfClass(AbstractBeanConfigurator.java:133) at tigase.kernel.core.Kernel.initBean(Kernel.java:128) at tigase.kernel.core.Kernel.getInstance(Kernel.java:938) at tigase.kernel.core.Kernel.getInstance(Kernel.java:274) at tigase.server.Bootstrap.start(Bootstrap.java:143) at tigase.server.XMPPServer.start(XMPPServer.java:185) at tigase.server.XMPPServer.main(XMPPServer.java:139)

properties file

config-type=--gen-config-def --admins=admin@osc01.com #! Database Connection --user-db=mysql --user-db-uri=jdbc:mysql://127.0.0.1:3306/tigase?user=tigase&password=tigase1234 #! Host --virt-hosts=test.net #! Debug --debug=server #! Logback basic-conf/logging/handlers=org.slf4j.bridge.SLF4JBridgeHandler

generated config.tdsl

admins = [ 'admin@test.net' ] 'config-type' = 'default' debug = [ 'server' ] dataSource { default () { uri = 'jdbc:mysql://127.0.0.1:3306/tigase?user=tigase&password=tigase1234' } } userRepository { default () {} } authRepository { default () {} } logging { rootHandlers = [ 'org.slf4j.bridge.SLF4JBridgeHandler' ] } 'sess-man' () {} 'virtual-hosts' { 'test.net' { anonymous = true 'domain-filter' = ALL enabled = true 'max-users' = 0L register = true 's2s-secret' = '74fe6334-5311-4c5d-ba9d-49c41328fd3a' } }

Kind regards,
Laslo

Categories: Tigase Forums

Pages

Get in touch

We provide software products, consulting and custom development services

Tigase, Inc.
100 Pine Street, Suite 1250
San Francisco, CA 94111, USA
Phone:
+1 (844) 273-0551 (Toll-free USA and Canada)
+1 (415) 900-4774 (International)

Follow us on:

Twitter

Back to Top