[ejabberd] "killall -9 firefox" can not make JWCHAT's client offline on ejabberd-2.0.3 !

Xia Qingran qingran.xia at gmail.com
Fri Mar 27 20:06:02 MSK 2009


Yeah, you are right. When I directly kill firefox browser, the JWCHAT will
not send right presence to server. The only thing I want to know is that
whether "max_inactivity" of http_bind is the timeout to release the idle
no-existed connection sessions.

In the source code of ejabberd_http_bind.erl (
http://svn.process-one.net/ejabberd-modules/http_bind/trunk/src/web/ejabberd_http_bind.erl),
I found out the followings:
-define(MAX_INACTIVITY, 30000). % msecs to wait before terminating
                                % idle sessions

Therefore I think max_inactivity is the parameter which can terminate the
idle session. But in my case, it is not working.

Qingran

2009/3/28 Jorge Guntanis <jorge at guntanis.com>

> Probably your jabber client is not sending the presence change, so ejabberd
> does not know that your visitor left.
> This is by no means a problem with ejabberd, what you should make sure is
> that when the window closes, or the visitor leaves you are having your
> jabber client to let the server know.
> Or have jabber sessions time out faster?
>
> Jorge
>
>
> 2009/3/27 Xia Qingran <qingran.xia at gmail.com>
>
>> Additionally, I find out that after nearly 4 minutes, the offline users
>> always disappear in the list of "ejabberdctl connected-users" whatever the
>> value of "max_inactivity".
>>
>>
>>
>> 2009/3/27 Xia Qingran <qingran.xia at gmail.com>
>>
>> Hi, everyone,
>>>
>>> Is anyone tell me how to take the http_bind's inactive users offline?
>>>
>>> My website's XMPP service is taking use of JWCHAT and ejabberd-2.0.3's
>>> http_bind on Ubuntu Linux.
>>>
>>> I found out that lots of visitors are online by "ejabberdctl
>>> connected-users", but in fact most of them have gone offline by checking our
>>> website's session universal storage.
>>>
>>> By the way, when I use "killall -9 firefox on my desktop", on the server
>>> side I found my account is still online. Then I make "max_inactivity" to 10.
>>> However after 10 seconds the inactive users are still online. Therefore I
>>> think many visitor directly shut down the browser, and ejabberd's does not
>>> take the inactive or timeout user offline.
>>>
>>> The contents of ejabberd.cfg are listed as follows:
>>> =========================================={loglevel, 5}.
>>>
>>> {hosts, ["mydomain.org"]}.
>>>
>>> {listen,
>>>  [
>>>
>>>   {5222, ejabberd_c2s, [
>>>             {certfile, "/usr/local/ejabberd-2.0.4/conf/server.pem"},
>>> starttls,
>>>             {access, c2s},
>>>             {shaper, c2s_shaper},
>>>             {max_stanza_size, 65536}
>>>                ]},
>>>
>>>   {5280, ejabberd_http, [
>>>              http_bind,
>>>              web_admin
>>>             ]}
>>>  ]}.
>>>
>>>
>>> {auth_method, external}.
>>> {extauth_program, "/usr/local/ejabberd-2.0.4/bin/ejabberd_extauh.py<http://ejabberd_extauth_zeuux.com.py/>
>>> "}.
>>>
>>> {odbc_server, {pgsql, "localhost", "ejabberd", "ejabberd", "ejabberd"}}.
>>> {odbc_pool_size, 5}.
>>>
>>> {pgsql_users_number_estimate, true}.
>>>
>>> {shaper, normal, {maxrate, 5000000}}.
>>>
>>>
>>> {shaper, fast, {maxrate, 50000000}}.
>>>
>>>
>>> {acl, admin, {user, "qingran", "mydomain.org"}}.
>>>
>>> {acl, local, {user_regexp, ""}}.
>>>
>>> {access, max_user_sessions, [{5, all}]}.
>>>
>>> {access, local, [{allow, local}]}.
>>>
>>> {access, c2s, [{deny, blocked},
>>>            {allow, all}]}.
>>>
>>> {access, c2s_shaper, [{none, admin},
>>>               {normal, all}]}.
>>>
>>> {access, s2s_shaper, [{deny, all}]}.
>>>
>>>
>>> {access, announce, [{allow, admin}]}.
>>>
>>> {access, configure, [{allow, admin}]}.
>>>
>>>
>>> {access, muc_admin, [{allow, admin}]}.
>>>
>>>
>>> {access, muc, [{allow, all}]}.
>>>
>>> {access, register, [{deny, all}]}.
>>>
>>>
>>> {access, pubsub_createnode, [{allow, all}]}.
>>>
>>> {language, "en"}.
>>>
>>>
>>> %%%   =======
>>> %%%   MODULES
>>>
>>> %%
>>> %% Modules enabled in all ejabberd virtual hosts.
>>> %%
>>> {modules,
>>>  [
>>>   {mod_adhoc,    []},
>>>   {mod_announce, [{access, announce}]}, % requires mod_adhoc
>>>   {mod_caps,     []},
>>>   {mod_configure,[]}, % requires mod_adhoc
>>>   {mod_disco,    []},
>>>
>>>   {mod_http_bind,[ {max_inactivity, 10} ]},
>>>
>>>   {mod_offline,  []},
>>>   {mod_privacy_odbc,  []},
>>>   {mod_private_odbc,  []},
>>>
>>>   {mod_pubsub,   [ % requires mod_caps
>>>           {access_createnode, pubsub_createnode},
>>>           {plugins, ["default", "pep"]}
>>>          ]},
>>>   {mod_roster_odbc,   []},
>>>
>>>   {mod_shared_roster,[]},
>>>
>>>   {mod_time,     []},
>>>   {mod_vcard_odbc,    []},
>>>   {mod_version,  []}
>>>  ]}.
>>>
>>> ===============================================================
>>>
>>> Thanks very much.
>>>
>>> --
>>> 夏清然
>>> Xia Qingran
>>> qingran.xia at gmail.com
>>> Sent from: Beijing 11 China.
>>> Isaac Asimov  - "I do not fear computers. I fear the lack of them."
>>
>>
>>
>>
>> --
>> 夏清然
>> Xia Qingran
>> qingran.xia at gmail.com
>>
>> Yogi Berra  - "A nickel ain't worth a dime anymore."
>> _______________________________________________
>> ejabberd mailing list
>> ejabberd at jabber.ru
>> http://lists.jabber.ru/mailman/listinfo/ejabberd
>>
>>
>
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd
>
>


-- 
夏清然
Xia Qingran
qingran.xia at gmail.com

P. J. O'Rourke  - "If government were a product, selling it would be
illegal."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20090328/a6ea7b23/attachment.htm>


More information about the ejabberd mailing list