Project

General

Profile

what does online_status mean?

Raylin lin
Added over 4 years ago

hi,all:

   I find that online_status of some user is more that 1. what does this mean? like 217. my tigase version is 5.3, built by myself.

Replies (13)

Added by Wojciech Kapcia TigaseTeam over 4 years ago

This field should indicate number of user online sessions and if the user is offline should be 0. However, due to the nature of handling the users this information may not be correct, especially if the user is on unreliable connection which causes a lot of abrupt disconnections without proper logging off.

Added by Gowthaman M almost 4 years ago

i have also same doubt and

  1. how this online_status count will be incremented ?

  2. Is there any problem while increment the online_status count > 1 ?

Added by Wojciech Kapcia TigaseTeam almost 4 years ago

Gowthaman M wrote:

i have also same doubt and

  1. how this online_status count will be incremented ?

It's incremented during user loggin-in by stored procedure.

  1. Is there any problem while increment the online_status count > 1 ?

Incrementing should work ok most of the time. The issue is that this indicator can get out of sync.

Added by Gowthaman M almost 4 years ago

Hi I tried login with tigase server using "node-xmpp-client"

My script

var Client = require('node-xmpp-client');


var xmpp = new Client({
            jid: "xxxx@localhost",
            password: "xxx"
        });

xmpp.on('online', function (data) {
    console.log(".............data...", data);
    console.log('Connected with JID: ' + data.jid.user);
    console.log('Yes, I\'m connected!');
    xmpp.end();

});

xmpp.on('disconnect', function () {
    console.log('connection has been disconnected!');
});

xmpp.on('close', function () {
    console.log('connection has been closed!');
});

here i open connection then end connection(xmpp.end())

but i check online_staus in tigase db default value 0 when i execute above code value incremented as 1 how?

Added by Gowthaman M almost 4 years ago

please anyone give some idea

Added by Wojciech Kapcia TigaseTeam almost 4 years ago

It's managed by stored procedures, for example for MySQL mysql-schema-4-sp.sql - it's increased by TigUserLogin() and decreased by @TigUserLogout()@.

Added by Gowthaman M almost 4 years ago

ya i Wojciech Kapcia thanks for your reply

in my nodejs application

1. xmpp client as conversjs

2. xmpp server as (tigase)node-xmpp-client

i face issue

for example consider

   -> A and B user login and both are chat,

   -> B user logged out so B user online status decreased by 1 in tig_user table

   -> user A side  B user status still online because i didn't get any intimation from tigase-server to convers js

      (in this case User refresh page means user B status goes to offline)

Please help me to fix this.

Added by Wojciech Kapcia TigaseTeam almost 4 years ago

Gowthaman M wrote:

i face issue

for example consider

   -> A and B user login and both are chat,

   -> B user logged out so B user online status decreased by 1 in tig_user table

   -> user A side  B user status still online because i didn't get any intimation from tigase-server to convers js

      (in this case User refresh page means user B status goes to offline)

Please check both server and client logs whether User A received packet.

Added by Gowthaman M almost 4 years ago

i Checked both log user A receive

<body rid="586334958" xmlns="http://jabber.org/protocol/httpbind" sid="3abb27c9-8990-4b8c-97bf-24e3de7bee7b" type="terminate">
<presence xmlns="jabber:client" type="unavailable"></presence>
</body>

Added by Wojciech Kapcia TigaseTeam almost 4 years ago

Why the body type is terminate?! When does the user receive it?

Added by Gowthaman M almost 4 years ago

User Receive

   <presence xmlns="jabber:client" from="54e17bc0b18a84001d944b1b@192.168.1.141/tigase-30" to="54e17bc0b18a84001d944b1b@192.168.1.141" type="unavailable"/>
   <presence xmlns="jabber:client" to="54e17bc0b18a84001d944b1b@192.168.1.141" from="54e17ba2b18a84001d944b18@192.168.1.141/tigase-29" type="unavailable"/>

Added by Wojciech Kapcia TigaseTeam almost 4 years ago

Please be more specific - this excerpt is from which user? Again - Check that UserA receives presence form UserB when UserB disconnects, something like:

<presence from="UserA@192.168.1.141/tigase-30 to="UserB@192.168.1.141" type="unavailable"/>

Added by Gowthaman M over 3 years ago

i have send which you specified presence stanza it's seems no improvements

    (1-13/13)