Tigase XMPP Server Board

Installation and maintenance: BOSH connection

Sat, 09/24/2016 - 15:38

I am trying to use the smack bosh library to connect to my Tigase server. But I cant seem to get it to work.

My java code is the following:

BOSHConfiguration conf = BOSHConfiguration.builder().setUsernameAndPassword("admin", "tigase")
.setFile("/http-bind/").setHost(host).setPort(5280).setServiceName(service).setDebuggerEnabled(true)
.setSecurityMode(SecurityMode.disabled)
.build();
XMPPBOSHConnection connection;
connection = new XMPPBOSHConnection(conf);

After seconding the second message my connection gets timed out. Is there a setting I need to set to enable BOSH or something else i am missing?

06:21:13 PM SENT (0): <body ver='1.8' wait='60' xmpp:version='1.0' rid='542580491274855' xmlns:xmpp='urn:xmpp:xbosh' hold='1' xml:lang='en' ack='1' to='ip-172-31-45-106' xmlns='http://jabber.org/protocol/httpbind'></body>
06:21:13 PM RECV (0): <body xmlns:xmpp="urn:xmpp:xbosh" secure="true" maxpause="10" wait="30" inactivity="10" ver="1.6" ack="542580491274855" from="ip-172-31-45-106" xmlns="http://jabber.org/protocol/httpbind" sid="aa7df3c7-0a9a-4fc6-80ab-77c323c94a1f" xmpp:version="1.0" authid="dd3bbc8c-b887-4479-84ba-16a7f05340db" xmlns:stream="http://etherx.jabber.org/streams" hold="1" polling="10" requests="2"/>
06:21:23 PM SENT (0): <body rid='542580491274856' sid='aa7df3c7-0a9a-4fc6-80ab-77c323c94a1f' xmlns='http://jabber.org/protocol/httpbind'></body>

Categories: Tigase Forums

API and development: RE: Database separation problems

Thu, 09/22/2016 - 05:13

bin bin wrote:

Think you very much.

I have a question.

Please create separate threads for separate topics!

I want to monitor tigase server, my tigase config parameter as follow:
--monitoring=jmx:9050,http:9080

My jar folder have jdmkrt.jar and tigase-extras.jar but I see 9050 port doesn't listening in linux Server.
I use jconsole tool can't remote connections 9050 in the windows system.
Excuse me what happened

Please use full Tigase distribution package, which contains all required dependencies.

Categories: Tigase Forums

API and development: RE: Database separation problems

Thu, 09/22/2016 - 03:18

Think you very much.

I have a question.
I want to monitor tigase server, my tigase config parameter as follow:
--monitoring=jmx:9050,http:9080

My jar folder have jdmkrt.jar and tigase-extras.jar but I see 9050 port doesn't listening in linux Server.
I use jconsole tool can't remote connections 9050 in the windows system.
Excuse me what happened

Bill

Categories: Tigase Forums

API and development: RE: online message store

Wed, 09/21/2016 - 06:55

fan xiao wrote:

For example, I have two users,user A and user B .Eiterh of them was online ,sent a message ,I found it in table msg_history .But both of them were online ,I didn't find any messages .

It's quite unlikely.

  • was the message delivered to the other contact? Can you share full log from XML console of the client?
  • can you enable debug --debug=server,xmpp.impl,db and check the logs of the processing of the message and verify why it was stored in the repository?
Categories: Tigase Forums

API and development: RE: online message store

Wed, 09/21/2016 - 06:26

Thanks for the help.
jeff shaw
I will try it.
Wojciech Kapcia
For example, I have two users,user A and user B .Eiterh of them was online ,sent a message ,I found it in table msg_history .But both of them were online ,I didn't find any messages .

Categories: Tigase Forums

API and development: RE: online message store

Wed, 09/21/2016 - 03:17

fan xiao wrote:

Hi,
When I run tigase server ,i didn't find the online message . I searched it in table msg_history .Did i searched wrong table ?

Offline storage is enabled by default and you've looked in correct table. Have you send a message to user, which was offline?

jeff shaw wrote:

You should add blow configure items in your init.properties file:

--sm-plugins = +message-archive-xep-0136,-message-carbons,+msgoffline
--comp-name-1=message-archive
--comp-class-1=tigase.archive.MessageArchiveComponent
message-archive/archive-repo-uri=jdbc:mysql://localhost:3306/tigasedb?user=root&password=mysql&useUnicode=true&characterEncoding=UTF-8
sess-man/plugins-conf/message-archive-xep-0136/component-jid=message-archive@yourhost
sess-man/plugins-conf/message-archive-xep-0136/default-store-method=message
sess-man/plugins-conf/message-archive-xep-0136/required-store-method=body
sess-man/plugins-conf/message-archive-xep-0136/auto=true

Message Archiving component is not responsible for storing offline messages!

Categories: Tigase Forums

API and development: RE: Database separation problems

Wed, 09/21/2016 - 02:57

bin bin wrote:

Hello,
I have several questions
1, my msg_history table is very big, has nearly 10G, do you have any good idea?

What do you mean by good idea? You store a lot of information. It looks like that you have a lot of single-time users and problems with addressing (i.e. lot's of single time messages to users that are offline and then not-reconnecting [which would remove messages from repository]).

You should probably be able to purge old offline message (older than a couple of months).

You can configure limit of stored messages with following configuration (default is 100):
sess-man/plugins-conf/amp/store-limit[L]=5 amp/store-limit[L]=5 sess-man/plugins-conf/amp/user-store-limit-enable[B]=true

2, my current idea is to use amp plug-in, to separate msg_history and user_jid tables to a different database, is that ok

Yes, almost all components/plugins that use repository can be configured to utilize separate database (and in case of higher load this is recommended).

3, I want to user_jid this table can be individually assigned to a database

I'm sorry I don't understand.

4, I use - auth - db this parameter to certification form alone points out, but after repeated tigase service, can't normal registration, below is my configuration, please have a look at what's the problem

Again - I'm sorry but I don't understand.
Please keep in mind, that if you use separate --auth-db you have to use &autoCreateUser=true in your --user-db configuration.

Categories: Tigase Forums

API and development: RE: Tigase ACS

Wed, 09/21/2016 - 02:31

Yes, you are correct (and the logs usually contains most up-to-date information). I've updated the documentation.

Categories: Tigase Forums

API and development: RE: Tigase Database Connections

Wed, 09/21/2016 - 02:17

Mohammed Azhar wrote:

1. Once the server is up and running i see about 21 connections established to the PostgreSQL. Is this normal? How many max connections will be established? Is there a way to limit those connections?

Tigase XMPP Server uses connection pool when accessing the database. In version 7.0.3 the default value was 10 (and in latest versions this depends on the hardware specification of the machine on which Tigase is running). You can configure it with following properties:
--auth-repo-pool-size
--data-repo-pool-size
--user-repo-pool-size

Number of connections looks ok (and I guess it includes this 1 connection that you open).

2. Once the server is stopped, sometimes i could see some of the connections are not released and the process is still running. I have force kill the process then.

  • How do you stop the server?
  • Can you check what's bocking the shutdown? Which thread or accessed resource?
  • Does it happen with your custom component disabled?

3. I have a custom component (extending AbstractMessageReceiver) where i opens and keeps the connection open to the PostgreSQL. is there a callback on the component once it stops where i could close and release that connection.or else what is the best way to close it.

First of all - you should use tigase.db.RepositoryFactory when accessing the database - it makes it easier to handle connections.

As described in Component Startup Sequence there is start() and stop() methods available (i.e.: tigase.server.AbstractMessageReceiver#stop)

Categories: Tigase Forums

Installation and maintenance: RE: How to use the acs ?

Wed, 09/21/2016 - 01:54

Moffitt tig wrote:

hello . Wojciech Kapcia

java.net.UnknownHostException: stats.tigase.org - ACS component requires communication with our servers and it looks like either your DNS resolver is not working or you are blocking this hostname - please allow communication with that domain.

I still don't understand, how to avoid the abnormal ,Can say in detail ?

thank you in advance!

You must make sure that you are able to access http://stats.tigase.org:8080/ from the machine that runs Tigase XMPP Server. This depends on the operating system you are using.

Categories: Tigase Forums

API and development: RE: online message store

Wed, 09/21/2016 - 01:38

You should add blow configure items in your init.properties file:

--sm-plugins = +message-archive-xep-0136,-message-carbons,+msgoffline
--comp-name-1=message-archive
--comp-class-1=tigase.archive.MessageArchiveComponent
message-archive/archive-repo-uri=jdbc:mysql://localhost:3306/tigasedb?user=root&password=mysql&useUnicode=true&characterEncoding=UTF-8
sess-man/plugins-conf/message-archive-xep-0136/component-jid=message-archive@yourhost
sess-man/plugins-conf/message-archive-xep-0136/default-store-method=message
sess-man/plugins-conf/message-archive-xep-0136/required-store-method=body
sess-man/plugins-conf/message-archive-xep-0136/auto=true

Categories: Tigase Forums

Tigase server ad-hoc scripts: RE: tigase cluster question

Tue, 09/20/2016 - 02:36

Thank you very much

Categories: Tigase Forums

API and development: Database separation problems

Tue, 09/20/2016 - 02:32

Hello,
I have several questions
1, my msg_history table is very big, has nearly 10G, do you have any good idea?
2, my current idea is to use amp plug-in, to separate msg_history and user_jid tables to a different database, is that ok
3, I want to user_jid this table can be individually assigned to a database
4, I use - auth - db this parameter to certification form alone points out, but after repeated tigase service, can't normal registration, below is my configuration, please have a look at what's the problem

Think you
Bill

config-type=--gen-config-def
--cluster-mode = true
--admins=
--virt-hosts=tigase.test.local
--debug=server,xmpp.impl,db,cluster
--monitoring=jmx:9050,http:9080
--user-db=mysql
--user-db-uri=jdbc:mysql://mysql/tigasedb?user=tigase&password=123&useUnicode=true&characterEncoding=UTF-8&autoCreateUser=true

--sm-plugins=amp,-message,-msgoffline
--amp-repo-uri=jdbc:mysql://mysql/messagedb?user=message&password=123&useUnicode=true&characterEncoding=UTF-8&autoCreateUser=true
--amp-security-level=STRICT
sess-man/plugins-conf/amp/amp-jid=

--auth-db=tigase-custom
--auth-db-uri=jdbc:mysql://mysql/authdb?user=auth&password=123

Categories: Tigase Forums

API and development: RE: Tigase ACS

Tue, 09/20/2016 - 00:03

hi,

Thank you for the quick reply.

I was going through the guide, and it says to use

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

but when i use the above line it gives me a warning to use this

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

I am assuming the latter is the proper way. correct me if i am wrong.

Thank you

Categories: Tigase Forums

API and development: Tigase Database Connections

Tue, 09/20/2016 - 00:03

Hi all,

I am running the tigase v7.0.3 on the EC2 instance with a PostgreSQL DB in the Amazon RDS. I have a few concerns about the DB connections

  1. Once the server is up and running i see about 21 connections established to the PostgreSQL. Is this normal? How many max connections will be established? Is there a way to limit those connections?
  2. Once the server is stopped, sometimes i could see some of the connections are not released and the process is still running. I have force kill the process then.
  3. I have a custom component (extending AbstractMessageReceiver) where i opens and keeps the connection open to the PostgreSQL. is there a callback on the component once it stops where i could close and release that connection.or else what is the best way to close it.

I appreciate any help from you guys.

Thank you.

Categories: Tigase Forums

Installation and maintenance: RE: How to use the acs ?

Mon, 09/19/2016 - 23:43

hello . Wojciech Kapcia
java.net.UnknownHostException: stats.tigase.org - ACS component requires communication with our servers and it looks like either your DNS resolver is not working or you are blocking this hostname - please allow communication with that domain.

I still don't understand, how to avoid the abnormal ,Can say in detail ?

thank you in advance!

Categories: Tigase Forums

API and development: online message store

Mon, 09/19/2016 - 20:33

Hi,
When I run tigase server ,i didn't find the online message . I searched it in table msg_history .Did i searched wrong table ?

Categories: Tigase Forums

Installation and maintenance: RE: How to use the acs ?

Mon, 09/19/2016 - 04:17

Moffitt tig wrote:

Hi.using the tigase7.1.0 in init.properties below add:
[...]

Wait a few minutes appear below:

[...]

This is why ? How to solve ?

  • NPE - there was a bug in statistics code but it was fixed in the latest nightlies; however - it did not influenced functioning of the strategy.
  • java.net.UnknownHostException: stats.tigase.org - ACS component requires communication with our servers and it looks like either your DNS resolver is not working or you are blocking this hostname - please allow communication with that domain.
Categories: Tigase Forums

API and development: RE: Tigase ACS

Mon, 09/19/2016 - 04:03

Mohammed Azhar wrote:

I was just wondering is this the only change i need to do. If not could you direct me to a documentation that explains ACS in detail.

This is basically it. A little bit about clustering:

The basic difference in comparison with default strategy is that ACS is using caching to optimize traffic within cluster.

I would also like to know about the ACS Licensing.

Please use contact form http://tigase.net/contact to received detailed information.

Categories: Tigase Forums

Installation and maintenance: How to use the acs ?

Mon, 09/19/2016 - 02:05

Hi.using the tigase7.1.0 in init.properties below add:
--cluster-mode = true --sm-cluster-strategy-class= tigase.server.cluster.strategy.OnlineUsersCachingStrategy --customer-id=xxxxxxxxx --comp-name-1 = muc --comp-class-1 = tigase.muc.cluster.MUCComponentClustered muc/muc-strategy-class[S]=tigase.muc.cluster.ClusteredRoomStrategy --comp-name-2 = pubsub --comp-class-2 = tigase.pubsub.cluster.PubSubComponentClustered

Wait a few minutes appear below:

2016-09-19 16:58:38.086 [pool-14-thread-1] LicenceChecker.d() WARNING: Licence invalid java.lang.NullPointerException at tigase.licence.d.check(SourceFile:93) at tigase.licence.b.check(SourceFile:72) at tigase.licence.LicenceChecker.d(SourceFile:260) at tigase.licence.LicenceChecker.a(SourceFile:56) at tigase.licence.LicenceChecker$a.run(SourceFile:380) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) 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) 2016-09-19 16:58:38.091 [pool-14-thread-1] LicenceChecker$a.run() WARNING: This installation contains Tigase ACS package, not an open source software. The Tigase ACS is only available under a commercial license. The full text of the commercial license agreement is available upon request. More information about ACS component and licensing can be found here: http://www.tigase.com/content/tigase-acs-advanced-clustering-strategy The Tigase ACS component is provided free of charge for testing and development purposes only. Any use of the component on production systems, either commercial or not-for-profit, requires the purchase of a license. If the Tigase ACS component is activated without a valid license, it will continue to work, including its full set of features, but it will send certain statistical information to Tigase's servers on a regular basis. If the Tigase ACS component cannot access our servers to send information, it will stop working. Once a valid license is installed, the Tigase ACS component will stop sending statistical information to Tigase's servers. By activating the Tigase ACS component without a valid license you agree and accept that the component will send certain statistical information (such as DNS domain names, vhost names, number of online users, number of cluster nodes, etc.) which may be considered confidential and proprietary by the user. You accept and confirm that such information, which may be considered confidential or proprietary, will be transferred to Tigase's servers and that you will not pursue any remedy at law as a result of the information transfer. If the Tigase ACS component is installed but not activated, no statistical information will be sent to Tigase's servers. 2016-09-19 16:58:38.320 [pool-14-thread-1] LicenceChecker$a.run() WARNING: Uploading data 2016-09-19 16:58:41.607 [Timer-1] StatisticsUploader$1.run() SEVERE: exception uploading statistics java.net.UnknownHostException: stats.tigase.org at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at tigase.stats.collector.provider.StatisticsUploader.a(SourceFile:47) at tigase.stats.collector.provider.StatisticsUploader$1.run(SourceFile:99) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) 2016-09-19 17:00:44.946 [Timer-1] StatisticsUploader$1.run() SEVERE: exception uploading statistics java.net.UnknownHostException: stats.tigase.org at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at tigase.stats.collector.provider.StatisticsUploader.a(SourceFile:47) at tigase.stats.collector.provider.StatisticsUploader$1.run(SourceFile:99) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505)

This is why ? How to solve ?
Have the document said how to test using the acs ?
thank you in advance!

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: (415) 315 9771

Follow us on:

Twitter

Back to Top