Project

General

Profile

Invalid presence found: for presence probe.

fahad tasleem
Added about 2 years ago

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


Replies (1)

Added by Wojciech Kapcia TigaseTeam about 2 years ago

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?

    (1-1/1)