Tigase XMPP Server Board

Installation and maintenance: RE: Pending SM messages lost during shutdown

Mon, 06/27/2016 - 08:03

Messages which are in processing queue and in session management queues may be lost during server shutdown. This is caused by the fact that currently shutdown is initiated termination signal being sent to server. This all is done by design to allow fast shutdown and later fast startup which is needed during server restart.

Yes, message loss can be caused by that, however message processing and delivery should be fast so it is rather hard to loss message due to that.

StreamManagement is responsible for queuing packets sent to client until they are confirmed as delivered. Right now this messages are kept in memory until connection is dropped, stream is resumed or packets are confirmed as delivered. So server shutdown may cause drop of this messages as well.

We will work on improvements to message delivery and graceful server shutdown in version 7.2.0. We already started by sending stream termination to clients when server will be stopped which will trigger message redelivery from stream resumption queue.

Categories: Tigase Forums

API and development: RE: Invalid presence found: for presence probe.

Mon, 06/27/2016 - 05:27

fahad tasleem wrote:

Hi,

A user (A) is logged in form multiple devices. As he logs out from one device, a connection user (B) gets a presence packet with type "unavailable".

This is correct and done according to specification.

But the user (A) is online from another device.

Yes, because it send unavailable only for the resource B (i.e. user@server/B).

To get the latest status of the user, we are sending a probe packet from client.

In general specification Presence Probes says:

Presence probes SHOULD NOT be sent by a client, because in general a client will not need to send them since the task of gathering presence from a user's contacts is managed by the user's server. However, if a user's client generates an outbound presence probe then the user's server SHOULD route the probe (if the contact is at another server) or process the probe (if the contact is at the same server) and MUST NOT use its receipt of the presence probe from a connected client as the sole cause for returning a stanza or stream error to the client.

In principle - your client application should track all presence received from server for particular contact to track current status of the given contact and all it's resources.

However, following should not happen!

[...]

On tigase server we are seeing this error in logs.

[...]

Can you please let me know, why am I getting this error? How can I get latest status of user.

  • Which Tigase version do you use?
  • In which user session is the error thrown in the session of the from user (b@domain) or in the destination user (a@domain)?
  • Are you sure you are addressing correctly the packet to/from (i.e.: not swapping those fields making the request comming on the wrong connection)? Can you share bigger excerpt from the logs?
Categories: Tigase Forums

Installation and maintenance: RE: How to change JID's domain in Tigase database

Mon, 06/27/2016 - 04:01

Currently there is no easy way to achieve that - it requires changing each item in user_id column in the database and in addition to that re-calculating sha1 value for each row.
In addition - if you are using PubSub or Message Archiving component same process should be applied to it's tables.

Categories: Tigase Forums

API and development: Invalid presence found: for presence probe.

Wed, 06/22/2016 - 23:54

Hi,

A user (A) is logged in form multiple devices. As he logs out from one device, a connection user (B) gets a presence packet with type "unavailable". But the user (A) is online from another device. To get the latest status of the user, we are sending a probe packet from client.

<presence to="a@domain" from="b@domain/resource" id='ze5lV-36' type='probe'></presence>

On tigase server we are seeing this error in logs.

2016-06-23 06:14:37.256 [presence Queue Worker 1] Presence.process() INFO: Invalid presence found: from=c2s@domain, to=sess-man@domain, DATA=<presence from="b@domain/resource" to="a@domain" xmlns="jabber:client" id='ze5lV-36' type="probe"/>, SIZE=126, XMLNS=jabber:client, PRIORITY=PRESENCE, PERMISSION=NONE, TYPE=probe

Can you please let me know, why am I getting this error? How can I get latest status of user.

Thanks,
Fahad

Categories: Tigase Forums

Installation and maintenance: How to change JID's domain in Tigase database

Tue, 06/21/2016 - 06:11

Hi,
We would like to change our xmpp domain from let say test.com to test.net. Supposing that, thousands of users have been registered in Tigase database with test.com. Is there any way, for instance an Ad-hoc command, to convert Tigase database full JID domains from test.com to test.net?

Categories: Tigase Forums

API and development: RE: Reducing packet payload

Mon, 06/20/2016 - 08:13

hi Mauro Carrio, Could you share the new authentication method to me? My email account is , Thanks in advance!

Categories: Tigase Forums

API and development: RE: Offline message count

Mon, 06/20/2016 - 07:08

Tigase implements XEP-0013: Flexible Offline Message Retrieval which allows both retrieval of unread messages count as well as selective retrieval of such.

Categories: Tigase Forums

API and development: RE: Reducing packet payload

Mon, 06/20/2016 - 06:56

Mauro Carrio wrote:

So, I started thinking about the possibility of reducing the the in/out packets payload by replacing the most common words like: "message, presence, from, type, xmlns, body, chat, stream, auth... etc" into codes of 1 or 2 bytes.
Tigase should format the original stanza into this conversion before sending the message to the socket, and the client apps must traduce the codes once the packet arrives.

This somewhat feels like FunXMPP modification that (supposedly) whatsapp is using.

In your opinion:
Do you think this is more efficient than compressing with zlib?

We haven't made any tests so it's hard to answer this question. However, XEP-0286: Mobile Considerations states:

While this may mitigate some of the benefits of compression by raising compression ratios, in a large, real world deployment at HipChat, network traffic was still observed to decrease by a factor of 0.58 when enabling Stream Compression (XEP-0138) [4] with ZLIB compression!

Considering XEP-0229: Stream Compression with LZW could prove even better results as LZW usually offers better compression.

How big would be the impact for the Tigase Server Core?
Which would be the steps to achieve this?

This could be approached from the ConnectionManager perspective which could translates such packets before writing to socket. This would obviously incur additional performance decrease on the server.

Categories: Tigase Forums

API and development: RE: Offline message count

Sun, 06/19/2016 - 20:24

Thanks for the reply

Categories: Tigase Forums

API and development: RE: Offline message count

Fri, 06/17/2016 - 08:24

Hi,

I tell you what I did to achieve the offline message count. We needed to send in the push message to mobile devices the offline messages count, only for iOS in order to show it in the app icon.
I have a plugin responsible for listening all the incoming messages, and if the recipient is offline it starts my push message service and before that with an adhoc query it counts in the database the offline messages.
In my analysis that was the best option, maybe someone has a better idea.

Regards.

Categories: Tigase Forums

API and development: Offline message count

Fri, 06/17/2016 - 02:54

Hi all,

In tigase is it possible to get the offline message count for a user. Also get the unread message count.

Is there any way i can implement this from the server end.

Thanks

Categories: Tigase Forums

API and development: Reducing packet payload

Thu, 06/16/2016 - 21:21

Hi there,
Thanks to all the community that develops Tigase products.

We needed to improve the negotiation process of the users at the authentication. We developed a new authentication method to reduce the C2S round trip messages to 2 without SSL with SM and Resume enabled. So, now we are in a average of 1.5 seconds in the auth process (talking about new connections, not resumed connections that is really fast) on a stable wifi or a good 4G network.
The thing is that in a mobile network environment with 3G or even poorer networks, the app takes too much time to connect and the user experience is not working really because the message appears on the conversation screen sometimes with a delay of more than 10 seconds.

So, I started thinking about the possibility of reducing the the in/out packets payload by replacing the most common words like: "message, presence, from, type, xmlns, body, chat, stream, auth... etc" into codes of 1 or 2 bytes.
Tigase should format the original stanza into this conversion before sending the message to the socket, and the client apps must traduce the codes once the packet arrives.

In your opinion:
Do you think this is more efficient than compressing with zlib?
How big would be the impact for the Tigase Server Core?
Which would be the steps to achieve this?

Thanks in advance!

Categories: Tigase Forums

API and development: RE: XEP-0071 problem

Wed, 06/08/2016 - 07:48

Which Tigase version do you use? There was a known problem in older Tigase version causing such problem. Please try latest 7.1.0 nightly which should contain the fix.

Categories: Tigase Forums

Installation and maintenance: RE: Connection Issue with Websocket

Wed, 06/08/2016 - 07:46

Can you try reproducing this in the latest 7.1.0 version of the Tigase?

Categories: Tigase Forums

API and development: RE: From where can we detect when a user goes offline/closes the connection.

Wed, 06/08/2016 - 07:42

There is a connection Watchdog functionality which periodically checks user connections whether they are still open and valid.

Categories: Tigase Forums

API and development: RE: Tigase Clustering on Amazon Elastic Beanstalk (EBS)

Wed, 06/08/2016 - 07:39

Well, we have no experience with this particular Amazon service. We can confirm that Tigase works well with typical EC2 instances.

Categories: Tigase Forums

Installation and maintenance: RE: jingle protocol support

Wed, 06/08/2016 - 07:34

First of all - please avoid bumping the threads - there is absolutely no need for it!

As for the issue at hand - can you append following JVM property -Djava.net.preferIPv4Stack=true to the JAVA startup parameter list and check if that worked for you?

Categories: Tigase Forums

API and development: XEP-0071 problem

Tue, 06/07/2016 - 23:33

Hi,guys!
I am sending a message with XHTML,but tigase parse the message cause content loss.
For example(which from XEP-0071 chapter9,example 2):

<message> <body>Wow, I&apos;m green with envy!</body> <html xmlns='http://jabber.org/protocol/xhtml-im'> <body xmlns='http://www.w3.org/1999/xhtml'> <p style='font-size:large'> <em>Wow</em>, I&apos;m <span style='color:green'>green</span> with <strong>envy</strong>! </p> </body> </html> </message>
when parse finished,the "P" element has 3 children elements,but the content ", I'm" and "with" is missing,only left the last character '!'.
could you help me to solve this problem,thanks very much.
Categories: Tigase Forums

Installation and maintenance: Connection Issue with Websocket

Tue, 06/07/2016 - 04:58

We are implementing webchat utilising Strophe.js + Tigase 7.0.0 over WebSocket. Things working perfectly in most of the cases, but when we logout and login immediately, sometimes after successful login stream_close is triggered from below piece of code in ClientConnectionManager.java and kicked out of web socket session. Can you advise on this?

....
Packet command = Command.STREAM_CLOSED_UPDATE.getPacket(packet.getStanzaTo(),
packet.getPacketFrom(), StanzaType.set, UUID.randomUUID().toString());
.....
.....
if (log.isLoggable(Level.FINE)) {
log.log(Level.FINE,
"Sending a command to close the remote session for non-existen {0} connection: {1}",
new Object[] { getName(),
command.toStringSecure() });
}
Categories: Tigase Forums

API and development: RE: Custom plugin for nats push

Tue, 06/07/2016 - 01:54

In this case I think you should used similar workflow as MessageArchiving component is using. MessageArchivingPlugin forwards packets to store to MessageArchivingComponent which stores them to database - in your case you would send them over nats connections.

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

  • New blog post going into some MUC basics https://t.co/o1HoDzrAHM 5 days 12 hours ago
  • A new version of Tigase JaXMPP Client LIbrary has been released, now v3.1.2. Check out the release notes: https://t.co/JiMF85BG8G 2 weeks 5 days ago
Back to Top