Tigase XMPP Server Board

Tigase server administration: --max-queue-size question

Thu, 04/09/2015 - 07:52

Hi there,

can somebody help me with --max-queue-size parameter for init.properties

Is it per component? or per server and all components divide it?

Categories: Tigase Forums

Tigase server administration: RE: MySQL exception with emoji

Thu, 04/09/2015 - 05:15

Thanks a lot, Wojciech, updating jdbc connector indeed fixed the issue.

Categories: Tigase Forums

Tigase server administration: RE: Tigase HTTP

Thu, 04/09/2015 - 03:43

I solved my issue with new class of HTTP API version 1.1.0.

--comp-name-4=http
--comp-class-4=tigase.http.HttpMessageReceiver

In previous versions of HTTP API it is :

--comp-name-4=rest
--comp-class-4=tigase.http.rest.RestMessageReceiver

Categories: Tigase Forums

Tigase server administration: RE: MySQL exception with emoji

Thu, 04/09/2015 - 02:00

We are shipping:
<artifactId>mysql-connector-java</artifactId> <version>5.1.11</version>
Because newer versions had problems with deadlocks. However, as Changes in MySQL Connector/J 5.1.13 states:

Connector/J did not support utf8mb4 for servers 5.5.2 and newer.

You should update jdbc connector to resolve the issue.

Categories: Tigase Forums

Tigase server administration: RE: Tigase HTTP

Wed, 04/08/2015 - 23:15

@Serhii Administrator are you resolved your issue ??

If yes then can share settings that you are applied with your server for enable HTTP API.

I am getting :

2015-04-09 12:29:46.686 [main] MessageRouterConfig.hasClassForServerComponent() WARNING: Can't load component rest: tigase.http.rest.RestMessageReceiver

I am trying to build tigase from eclipse.
I configured my build path with :
- tigase-http-api-jetty-1.1.0-SNAPSHOT.jar
- tigase-http-api-1.2.0-SNAPSHOT.jar

My init.properties file look like this :

--cluster-mode = true
config-type = --gen-config-def
--debug = server
--user-db = mysql
--admins =
--user-db-uri = jdbc:mysql://localhost/tigasedb?user=root&password=
--virt-hosts = 192.168.1.23
--comp-name-4=rest
--comp-class-4=tigase.http.rest.RestMessageReceiver
rest/use-local-server[B]=true
--comp-name-3 = message-archive
--comp-class-3 = tigase.archive.MessageArchiveComponent
--comp-class-2 = tigase.socks5.Socks5ProxyComponent
--comp-name-2 = proxy
--comp-class-1 = tigase.muc.MUCComponent
--comp-name-1 = muc
--sm-plugins = +message-archive-xep-0136
--ssl-container-class=tigase.io.SSLContextContainer
--http/server-class=tigase.http.jetty.JettyStandaloneHttpServer
http/port=8080
--context=/rest
--rest-scripts-dir=/scripts/rest/

Tigase Version : 7.1.0
HTTP API Version : 1.1.0+

Categories: Tigase Forums

Tigase server administration: RE: MySQL exception with emoji

Wed, 04/08/2015 - 05:03

We've done every step of this tutorial except for this part:

In your application code, set the connection character set to utf8mb4. This can be done by simply replacing any variants of SET NAMES utf8 with SET NAMES utf8mb4. If your old SET NAMES statement specified the collation, make sure to change that as well, e.g. SET NAMES utf8 COLLATE utf8_unicode_ci becomes SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci.

However, when we connect to database from our MySQL client, only after performing 'SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci' we are able to manually insert message with emoji to msg_history with this client.
Could you please suggest how and where can we make Tigase Server to provide above mentioned parameters?

Categories: Tigase Forums

Tigase server administration: RE: MySQL exception with emoji

Wed, 04/08/2015 - 03:24

Well, there is still definitely something missing in terms of MySQL configuration. Have you also updated the connection settings both for client and mysqld in your MySQL configuration? There is a guide How to support full Unicode in MySQL databases outlining the steps.

Categories: Tigase Forums

Tigase server administration: I am using xmpp server and i am getting intermediate 502 error code...

Tue, 04/07/2015 - 23:08

Issue-1
Issue-2

Issue-1

I'm having difficulty getting nginx to proxy to an xmpp server using a BOSH connection. I get intermediate below error in the logs

error logs of nginx: ##2015/04/01 14:15:54 [error] 21788#0: *225307 upstream prematurely closed connection while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: exampledev.in, request: "POST /http-bind HTTP/1.1", upstream: "http://xxx.xxx.xxx.xxx:5280/http-bind", host: "example.in", referrer: "http://test1.example.in/exampleqa/chat/default/index" ##

access log of nginx: ##27.106.72.217 - - [01/Apr/2015:14:15:54 +0530] "POST /http-bind HTTP/1.1" 502 568 "http://test1.example.in/exampleqa/chat/default/index" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.104 Safari/537.36"

Importan
nginx file: nginx.conf and vhost_default.

tigase file: tigase.conf and init.properties.

Note:
1)I am using ubuntu OS system --> version Ubuntu 14.04.1 LTS" in both nginx server and xmpp server.
2)All user request come to nginx server then nginx forward (proxy pass) connection to xmpp server.
3)web server configuration:- Amazone Ec2 instance t2.small, Virual CPU:1, Ram:2GB
4)Xmpp server configuration: Amazone Ec2 instance t2.micro, Virual CPU:1, Ram:1GB

Few request failed in 502 error code and print above mentioned error log.

Kindly find attached my nginx and tigase configuration files.

Issue-2

I have facing a problem with My RDS. most of tigase user connection goes in to sleep mode. how to resolve this.

mysql> show full processlist;
-----------------+---------------------------------------------+----------+---------+------+-------------+-----------------------+ | Id | User | Host | db | Command | Time | State | Info |
-----------------+---------------------------------------------+----------+---------+------+-------------+-----------------------+ | 77179 | tigase | ip-xx-xx-xx-xx.ip.secureserver.net:45595 | tigasedb | Sleep | 581 | | NULL | | 79925 | rdsadmin | localhost:31957 | mysql | Sleep | 2 | | NULL | | 82115 | exp-tigase | xx.xx.xx.xx:52266 |tigasedb | Sleep | 32 | | NULL | | 82123 | exp-tigase | xx.xx.xx.xx:52274 | tigasedb | Sleep | 28 | | NULL | | 89876 | tigase | ip-xx-xx-xx-xx.ip.secureserver.net:48205 | tigasedb | Sleep | 4675 | | NULL

Categories: Tigase Forums

Tigase server development: RE: Get the user online and offline

Tue, 04/07/2015 - 15:05

if session == null then the user is offline.

Categories: Tigase Forums

Tigase server development: RE: Inconsistent behavior with HTTP Rest API

Tue, 04/07/2015 - 12:35

It can be any of the issues you listed, we would have to investigate it closely to make sure.
However, I think your approach to the subject is very inefficient. HTTP calls are quite slow and inefficient "by design". HTTP was simply designed for a different purpose and does not work well for tasks like this. My suggestion is to use a different method to collect user's online status. The best option which comes to my mind is to configure presence packets forwarding to some selected JID, connect a bot on this JID and this way collect all user's presences in real time. This would be much faster and much less resource consuming.

  1. http://docs.tigase.org/tigase-server/snapshot/Properties_Guide/webhelp/vhostPresenceForwardJid.html
Categories: Tigase Forums

Tigase server development: RE: Queue Overflow events: proposal to increase a log level

Tue, 04/07/2015 - 12:27

Increasing log level in here would be actually very harmful. Please note, queue overflow happens when the server is under a load higher than it can handle, which means thousands of packets per second. Once queue overflow starts to happen it usually happens for great number of packets. Putting heavy logging in this part of the code would mean you potentially get thousands of log records per second. This would lead to further performance degradation of the system and even higher number of packets lost due to queue overflow and a higher number of log records.

The best way to watch the system and detect any performance issues and bottlenecks is through the server statistics. You have over one thousand of different load and performance metrics on the server. Retrieving these metrics even once a second does not generate significant load and you get very accurate picture of what is going in the server. You also get a number of packets lost due to queue overflow.

Categories: Tigase Forums

Tigase server development: Queue Overflow events: proposal to increase a log level

Tue, 04/07/2015 - 09:53

Hi guys,

Was testing a lot Tigase under the high load and found that Queue Overflow events don't have so hight log level

Look at AbstractMessageReceiver class

try { out_queues.get(queueIdx).put(packet, packet.getPriority().ordinal()); ++statSentPacketsOk; } catch (InterruptedException e) { ++statSentPacketsEr; if (log.isLoggable(Level.FINEST)) { log.log(Level.FINEST, "Packet dropped for unknown reason: {0}", packet); } return false; } // end of try-catch

and

try { in_queues.get(queueIdx).put(packet, packet.getPriority().ordinal()); ++statReceivedPacketsOk; } catch (InterruptedException e) { ++statReceivedPacketsEr; if (log.isLoggable(Level.FINEST)) { log.log(Level.FINEST, "Packet dropped for unknown reason: {0}", packet); } return false; }

And let's say we enabled only logs with a level SEVER in init.properties:

--debug = server basic-conf/logging/tigase.server.level=SEVERE

In that case and in case of queue overflow we won't be able to catch this problem via logs

Is it possible to change those logs from FINEST to SEVERE level or it doesn't make any sense?

Categories: Tigase Forums

Tigase server development: Inconsistent behavior with HTTP Rest API

Tue, 04/07/2015 - 07:14

Hi,

We have written a groovy script to determine availability of users (online/offline) and we are using HTTP Api to get the user(s) status. Sometimes (1/20) we get response different then expected, possibly response of a completely different request. Note that we have ~200 requests per second. So,

1. Is there some issue with our script?
2. Is there concurrency issue in using script?
3. Can there be some packet ordering problem?

Kindly provide some insight on how does the http server communicates with xmpp server to access users_session/session manager and how can we fix this problem.

Thanks
Kulshreshth

P.S. We are using tigase 5.2.3 version

Categories: Tigase Forums

Tigase server development: Get the user online and offline

Tue, 04/07/2015 - 02:49

Hi,I by writing a plugin for users online, offline, and do some actions.
But I can get the user online state, but unable to get offline
public class App extends XMPPProcessor implements XMPPProcessorIfc { private static final String ID = "offlinemessage"; private static final Logger log = Logger.getLogger(App.class.getCanonicalName()); public String id() { return ID; } @Override public String[][] supElementNamePaths() { return ELEMENTS; } @Override public String[] supNamespaces() { return XMLNSS; } public void process(Packet packet, XMPPResourceConnection session, NonAuthUserRepository repo, Queue<Packet> results, Map<String, Object> settings) throws XMPPException { if (log.isLoggable(Level.FINEST)) { log.finest("Processing packet: " + packet.toString()); } if (session != null) { if ((packet.getElemName() == Presence.ELEM_NAME) && (packet.getStanzaTo() == null)) { String currentUser = session.getJID().getLocalpart(); if ((type == null) || (type == StanzaType.available)) { System.out.println(currentUser + "online"); } else if ((type == StanzaType.unavailable) || (type == StanzaType.error)) { System.out.println(currentUser + "offline"); } } } } }

Categories: Tigase Forums

Tigase server administration: RE: MySQL exception with emoji

Tue, 04/07/2015 - 02:49

No, we haven't recreated the schema. Here's what we've done:

1. Updated file /etc/mysql/my.cnf:
character-set-client-handshake = FALSE init-connect='SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci' character-set-server=utf8mb4 collation-server=utf8mb4_unicode_ci

2. Alter tables:
ALTER TABLE tig_pairs CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE muc_history CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE msg_history CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

2015-04-06 13:21:02.873 [in_9-sess-man] JDBCMsgRepository.storeMessage() WARNING: Problem adding new entry to DB:
java.sql.SQLException: Incorrect string value: '\xF0\x9F\x98\x83\xF0\x9F...' for column 'message' at row 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2019)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1937)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1922)
at tigase.server.amp.JDBCMsgRepository.storeMessage(JDBCMsgRepository.java:769)
at tigase.xmpp.impl.OfflineMessages.savePacketForOffLineUser(OfflineMessages.java:299)
at tigase.xmpp.impl.MessageAmp.postProcess(MessageAmp.java:175)
at tigase.server.xmppsession.SessionManager.processPacket(SessionManager.java:1823)
at tigase.cluster.SessionManagerClustered.processPacket(SessionManagerClustered.java:252)
at tigase.cluster.SessionManagerClustered.processPacket(SessionManagerClustered.java:238)
at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1424)

Categories: Tigase Forums

Tigase server administration: RE: MySQL exception with emoji

Tue, 04/07/2015 - 01:57
  • have you re-created the schema?
  • Can you share full exception stacktrace?
Categories: Tigase Forums

Tigase server administration: RE: How should I configure Tigase server?

Tue, 04/07/2015 - 01:49
  • have Tigase started correctly (please check logs/tigase-console.log for errors)?
  • have you installed HTTP component and enabled it?
  • there are a number of guides, for example Retrieving statistics from the server but the idea is the same for other components.
Categories: Tigase Forums

Tigase server administration: MySQL exception with emoji

Mon, 04/06/2015 - 04:09

Hello.
We are using Tigase Server 7.0.0 with database hosted on Amazon RDS. When sending a message with emoji to offline user tigase server tries to store it in database and fails with "java.sql.SQLException: Incorrect string value: '\xF0\x9F\x98\x83\xF0\x9F...' for column 'message' at row 1". Looking at https://projects.tigase.org/issues/2544 topic we changed 'character-set-server', 'collation-server' and table's character set to utf8mb4. However the issue still persists. Could you please suggest how to fix it? Thanks in advance.

Categories: Tigase Forums

Tigase server development: how to write plugin with intercepte user login and messsage receipt

Sat, 04/04/2015 - 04:16

ok,thanks very much
----- 原始邮件 -----

收件人:
主题:[Tigase XMPP Server - Tigase server development - msg4758] how to write plugin with intercepte user login and messsage receipt
日期:2015年04月04日 13点58分

Categories: Tigase Forums

Tigase server development: how to write plugin with intercepte user login and messsage receipt

Fri, 04/03/2015 - 22:58

I come from China, my English is very poor, very sorry for tigase I was a novice, but after I read the relevant documentation and information on tigase very confident that I am going to use as my tigase messaging framework, but I now encounter to two problems. The first is how to write a plug-in blocking the user's login successful operation and receipt messages sent by the client (the receipt is sent by the client based on the standard xmpp protocol). Please familiarize yourself with the people to help out some ideas (preferably with a simple demo), thank you very much.

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