Project

General

Profile

message archive

basak Ozturk
Added over 3 years ago

I tigase install and integrated mongodb , its work.mongodb created tigase_test.But its empty. my script is working and send message but not recorded


Replies (7)

Added by Wojciech Kapcia TigaseTeam over 3 years ago

Please restrain yourself from creating multiple messages/topic regarding same issue.

As for the problem - please note that you need to enable archiving - either for user session or globally - see message archive component wiki for details: https://projects.tigase.org/projects/message-archiving/wiki

Added by basak Ozturk over 3 years ago

--comp-class-1 = tigase.muc.cluster.MUCComponentClustered

--virt-hosts = ubuntu

--user-db-uri=mongodb://localhost/tigase_test

--sm-cluster-strategy-class = tigase.cluster.strategy.OnlineUsersCachingStrategy

--user-db=tigase.mongodb.MongoRepository

--auth-db=tigase.mongodb.MongoRepository

--admins = admin@ubuntu basak@ubuntu bitirme@ubuntu

--comp-name-6 = message-archive

--comp-name-5 = rest

--comp-name-4 = stun

--comp-name-3 = proxy

config-type = --gen-config-def

--comp-name-2 = pubsub

--comp-name-1 = muc

--cluster-mode = true

--sm-plugins = +message-archive-xep-0136,+jabber:iq:auth,+urn:ietf:params:xml:ns:xmpp-sasl,+urn:ietf:params:xml:ns:xmpp-bind,+urn:ietf:params:xml:ns:xmpp-session,+jabber:iq:register,+jabber:iq:roster,+presence,+jabber:iq:privacy,+jabber:iq:version,+http://jabber.org/protocol/stats,+starttls,+msgoffline,+vcard-temp,+http://jabber.org/protocol/commands,+jabber:iq:private,+urn:xmpp:ping,+basic-filter,+domain-filter,+pep,+zlib

--comp-class-6 = tigase.archive.MessageArchiveComponent

--debug = server,xmpp.impl

--comp-class-5 = tigase.http.rest.RestMessageReceiver

--comp-class-4 = tigase.stun.StunComponent

--comp-class-3 = tigase.socks5.Socks5ProxyComponent

--comp-class-2 = tigase.pubsub.cluster.PubSubComponentClustered

muc/history-db-uri=mongodb://localhost/tigase_test

muc/history-db=tigase.mongodb.muc.MongoHistoryProvider

pubsub/pubsub-repo-url=mongodb://localhost/tigase_test

pubsub/pubsub-repo-class=tigase.mongodb.pubsub.PubSubDAOMongo

message-archiving/tags-support[B]=true

message-archive/archive-repo-uri=mongodb://localhost/tigase_test

message-archive/archive-repo-class=tigase.mongodb.archive.MongoMessageArchiveRepository

--sm-plugins=message-archive-xep-0136

sess-man/plugins-conf/message-archive-xep-0136/component-jid=admin@ubuntu

sess-man/plugins-conf/message-archive-xep-0136/default-store-method=message

sess-man/plugins-conf/message-archive-xep-0136/store-muc-messages=true

this is my etc/init.properties , still dont reach any message in mongodb.

Best Regards,

Added by Wojciech Kapcia TigaseTeam over 3 years ago

sess-man/plugins-conf/message-archive-xep-0136/component-jid=admin@ubuntu

This configuration is wrong - if you shouldn't have need in majority of the cases to change the default which will work out of the box.

Added by basak Ozturk over 3 years ago

--comp-class-1 = tigase.muc.cluster.MUCComponentClustered

--virt-hosts = ubuntu

--user-db-uri=mongodb://localhost/tigase_dbdb

--sm-cluster-strategy-class = tigase.cluster.strategy.OnlineUsersCachingStrategy

--user-db=tigase.mongodb.MongoRepository

--auth-db=tigase.mongodb.MongoRepository

--admins = admin@ubuntu,basak@ubuntu

--comp-name-6 = message-archive

--comp-name-5 = rest

--comp-name-4 = stun

--comp-name-3 = proxy

config-type = --gen-config-def

--comp-name-2 = pubsub

--comp-name-1 = muc

--cluster-mode = true

--sm-plugins = +message-archive-xep-0136,+jabber:iq:auth,+urn:ietf:params:xml:ns:xmpp-sasl,+urn:ietf:params:xml:ns:xmpp-bind,+urn:ietf:params:xml:ns:xmpp-session,+jabber:iq:register,+jabber:iq:roster,+presence,+jabber:iq:privacy,+jabber:iq:version,+http://jabber.org/protocol/stats,+starttls,+msgoffline,+vcard-temp,+http://jabber.org/protocol/commands,+jabber:iq:private,+urn:xmpp:ping,+basic-filter,+domain-filter,+pep,+zlib

--comp-class-6 = tigase.archive.MessageArchiveComponent

--debug = server,xmpp.impl,db,cluster

--comp-class-5 = tigase.http.rest.RestMessageReceiver

--comp-class-4 = tigase.stun.StunComponent

--comp-class-3 = tigase.socks5.Socks5ProxyComponent

--comp-class-2 = tigase.pubsub.cluster.PubSubComponentClustered

muc/history-db-uri=mongodb://localhost/tigase_dbdb

pubsub/pubsub-repo-url=mongodb://localhost/tigase_dbdb

message-archive/archive-repo-uri=mongodb://localhost/tigase_dbdb

I deleted this line, its running but still dont save message on mongo db.

I am using this command "db.tigase_dbdb.find()" to see message. Is it wrong?

Added by Wojciech Kapcia TigaseTeam over 3 years ago

Now you've also deleted forced saving of messages:

sess-man/plugins-conf/message-archive-xep-0136/default-store-method=message

and if user doesn't enable it explicitly then no messages will be saved.

Added by basak Ozturk over 3 years ago

--comp-class-1 = tigase.muc.cluster.MUCComponentClustered

--virt-hosts = ubuntu

--user-db-uri=mongodb://localhost/tigase_test

--sm-cluster-strategy-class = tigase.cluster.strategy.OnlineUsersCachingStrategy

--user-db=tigase.mongodb.MongoRepository

--auth-db=tigase.mongodb.MongoRepository

--admins = admin@ubuntu,basak@ubuntu

--comp-name-6 = message-archive

--comp-name-5 = rest

--comp-name-4 = stun

--comp-name-3 = proxy

config-type = --gen-config-def

--comp-name-2 = pubsub

--comp-name-1 = muc

--cluster-mode = true

--sm-plugins = +message-archive-xep-0136,+jabber:iq:auth,+urn:ietf:params:xml:ns:xmpp-sasl,+urn:ietf:params:xml:ns:xmpp-bind,+urn:ietf:params:xml:ns:xmpp-session,+jabber:iq:register,+jabber:iq:roster,+presence,+jabber:iq:privacy,+jabber:iq:version,+http://jabber.org/protocol/stats,+starttls,+msgoffline,+vcard-temp,+http://jabber.org/protocol/commands,+jabber:iq:private,+urn:xmpp:ping,+basic-filter,+domain-filter,+pep,+zlib

--comp-class-6 = tigase.archive.MessageArchiveComponent

--debug = server,xmpp.impl,db,cluster

--comp-class-5 = tigase.http.rest.RestMessageReceiver

--comp-class-4 = tigase.stun.StunComponent

--comp-class-3 = tigase.socks5.Socks5ProxyComponent

--comp-class-2 = tigase.pubsub.cluster.PubSubComponentClustered

muc/history-db-uri=mongodb://localhost/tigase_test

pubsub/pubsub-repo-url=mongodb://localhost/tigase_test

message-archive/archive-repo-uri=mongodb://localhost/tigase_test

sess-man/plugins-conf/message-archive-xep-0136/default-store-method=message

DEBUG SEND: message

still dont save message,db.tigase_test.find() is empty.

Best Regards...

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 3 years ago

Why do you use db.tigase_test? Because db.tigase_test is name of MongoDB database?

If so, then this is wrong and I would suggest to check documentation on usage of MongoDB on MongoDB project site.

In MongoDB you first connect to MongoDB database, ie. from command line on same server as MongoDB is running:

mongo tigase_test

Later in request to Mongo you need to pass proper name of collection you wish to query.

+Note:+ Mongo will return empty results if you pass name of not existing collection - will not throw an exception

As for Tigase Message Archiving we store data in tig_ma_msgs table in JDBC (and same collection in MongoDB) you would need to check tig_ma_msgs collection:

db.tig_ma_msgs.find()

But please also note that you have not enabled in etc/init.properties forced save of messages to Message Archive as line

sess-man/plugins-conf/message-archive-xep-0136/default-store-method=message

only sets default level of archiving for user if user will enable archiving manually, so you need to send proper stanza from XMPP client to enable it or add following line to etc/init.properties file:

sess-man/plugins-conf/message-archive-xep-0136/required-store-method=message

This setting is described at https://projects.tigase.org/projects/message-archiving/wiki/Configuration, in section Setting required value of archiving level for messages on a server

    (1-7/7)