Hi there,
I have ejabberd 2.1.5 running on Ubuntu;
I also have a few Python 2.7.1 bots running on Wokkel 6.3.1 and Twisted 11.
I want those bots to have a permanent connection to the server w/o any TCP/IP dead/stalled connection problems.
I added mod_ping to my ejabberd instance.
This setup works fine, unless midnight. At midnight, every day, the server closes the connections (and I have no idea why).
There is no code on the client, which should cause this behaviour. The clients support both pings and presence.
The server? Standard Ubuntu setup, with mod_ping enabled and some admin users added to the configuration file.
Could you please help me solve this disconnection issue?
This is a part of my logs when the issue happens. You can see the close happening at 00:43:54 .
=INFO REPORT==== 2011-06-05 00:42:22 === D(<0.339.0>:ejabberd_router:313) : route from {jid,[],"test.my.secret.domain",[],[],"test.my.secret.domain",[]} to {jid,"terminal2","test.my.secret.domain","client","terminal2", "test.my.secret.domain","client"} packet {xmlelement,"iq", [{"id","3092682598"},{"type","get"}], [{xmlelement,"ping",[{"xmlns","urn:xmpp:ping"}],[]}]} =INFO REPORT==== 2011-06-05 00:42:22 === D(<0.339.0>:ejabberd_local:286) : local route from {jid,[],"test.my.secret.domain",[],[],"test.my.secret.domain",[]} to {jid,"terminal2","test.my.secret.domain","client","terminal2", "test.my.secret.domain","client"} packet {xmlelement,"iq", [{"id","3092682598"},{"type",[...]}], [{xmlelement,[...],...}]} =INFO REPORT==== 2011-06-05 00:42:22 === D(<0.339.0>:ejabberd_sm:410) : session manager from {jid,[],"test.my.secret.domain",[],[],"test.my.secret.domain",[]} to {jid,"terminal2","test.my.secret.domain","client","terminal2", "test.my.secret.domain","client"} packet {xmlelement,"iq", [{"id","3092682598"},{"type",[...]}], [{xmlelement,[...],...}]} =INFO REPORT==== 2011-06-05 00:42:22 === D(<0.339.0>:ejabberd_sm:509) : sending to process <0.736.0> =INFO REPORT==== 2011-06-05 00:42:22 === D(<0.736.0>:ejabberd_c2s:1456) : Send XML on stream = <<"">> =INFO REPORT==== 2011-06-05 00:42:22 === D(<0.735.0>:ejabberd_receiver:320) : Received XML on stream = "" =INFO REPORT==== 2011-06-05 00:42:22 === D(<0.735.0>:shaper:61) : State: {maxrate,1000,1.631939447550197, 1307227282698797}, Size=98 M=49.04001516763026, I=60081.35 =INFO REPORT==== 2011-06-05 00:42:22 === D(<0.736.0>:ejabberd_router:313) : route from {jid,"terminal2","test.my.secret.domain","client","terminal2", "test.my.secret.domain","client"} to {jid,[],"test.my.secret.domain",[],[],"test.my.secret.domain",[]} packet {xmlelement,"iq", [{"to","test.my.secret.domain"}, {"from","terminal2@test.my.secret.domain/client"}, {"id","3092682598"}, {"type","result"}], []} =INFO REPORT==== 2011-06-05 00:42:22 === D(<0.736.0>:ejabberd_local:286) : local route from {jid,"terminal2","test.my.secret.domain","client","terminal2", "test.my.secret.domain","client"} to {jid,[],"test.my.secret.domain",[],[],"test.my.secret.domain",[]} packet {xmlelement,"iq", [{"to","test.my.secret.domain"}, {"from",[...]}, {[...],...}, {...}], []} =INFO REPORT==== 2011-06-05 00:43:22 === D(<0.339.0>:ejabberd_router:313) : route from {jid,[],"test.my.secret.domain",[],[],"test.my.secret.domain",[]} to {jid,"terminal2","test.my.secret.domain","client","terminal2", "test.my.secret.domain","client"} packet {xmlelement,"iq", [{"id","4023588685"},{"type","get"}], [{xmlelement,"ping",[{"xmlns","urn:xmpp:ping"}],[]}]} =INFO REPORT==== 2011-06-05 00:43:22 === D(<0.339.0>:ejabberd_local:286) : local route from {jid,[],"test.my.secret.domain",[],[],"test.my.secret.domain",[]} to {jid,"terminal2","test.my.secret.domain","client","terminal2", "test.my.secret.domain","client"} packet {xmlelement,"iq", [{"id","4023588685"},{"type",[...]}], [{xmlelement,[...],...}]} =INFO REPORT==== 2011-06-05 00:43:22 === D(<0.339.0>:ejabberd_sm:410) : session manager from {jid,[],"test.my.secret.domain",[],[],"test.my.secret.domain",[]} to {jid,"terminal2","test.my.secret.domain","client","terminal2", "test.my.secret.domain","client"} packet {xmlelement,"iq", [{"id","4023588685"},{"type",[...]}], [{xmlelement,[...],...}]} =INFO REPORT==== 2011-06-05 00:43:22 === D(<0.339.0>:ejabberd_sm:509) : sending to process <0.736.0> =INFO REPORT==== 2011-06-05 00:43:22 === D(<0.736.0>:ejabberd_c2s:1456) : Send XML on stream = <<"">> =INFO REPORT==== 2011-06-05 00:43:54 === I(<0.736.0>:ejabberd_c2s:1409) : ({socket_state,tls,{tlssock,#Port<0.2861>,#Port<0.2893>},<0.735.0>}) Close session for terminal2@test.my.secret.domain/client =INFO REPORT==== 2011-06-05 00:43:54 === D(<0.736.0>:mod_pubsub:3741) : node_action "pubsub.test.my.secret.domain" "flat" get_entity_affiliations ["pubsub.test.my.secret.domain", {"terminal2", "test.my.secret.domain", "client"}] =INFO REPORT==== 2011-06-05 00:43:54 === D(<0.736.0>:mod_pubsub:3726) : node_call "flat" get_entity_affiliations ["pubsub.test.my.secret.domain", {"terminal2", "test.my.secret.domain", "client"}] =INFO REPORT==== 2011-06-05 00:43:54 === D(<0.736.0>:mod_pubsub:3741) : node_action "pubsub.test.my.secret.domain" "hometree" get_entity_affiliations ["pubsub.test.my.secret.domain", {"terminal2", "test.my.secret.domain", "client"}] =INFO REPORT==== 2011-06-05 00:43:54 === D(<0.736.0>:mod_pubsub:3726) : node_call "hometree" get_entity_affiliations ["pubsub.test.my.secret.domain", {"terminal2", "test.my.secret.domain", "client"}] =INFO REPORT==== 2011-06-05 00:43:54 === D(<0.736.0>:mod_pubsub:3741) : node_action "pubsub.test.my.secret.domain" "pep" get_entity_affiliations ["pubsub.test.my.secret.domain", {"terminal2", "test.my.secret.domain", "client"}] =INFO REPORT==== 2011-06-05 00:43:54 === D(<0.736.0>:mod_pubsub:3726) : node_call "pep" get_entity_affiliations ["pubsub.test.my.secret.domain", {"terminal2", "test.my.secret.domain", "client"}] =INFO REPORT==== 2011-06-05 00:43:54 === D(<0.736.0>:ejabberd_router:313) : route from {jid,"terminal2","test.my.secret.domain","client","terminal2", "test.my.secret.domain","client"} to {jid,"root","test.my.secret.domain",[],"root","test.my.secret.domain",[]} packet {xmlelement,"presence",[{"type","unavailable"}],[]} =INFO REPORT==== 2011-06-05 00:43:54 === D(<0.736.0>:ejabberd_local:286) : local route from {jid,"terminal2","test.my.secret.domain","client","terminal2", "test.my.secret.domain","client"} to {jid,"root","test.my.secret.domain",[],"root","test.my.secret.domain",[]} packet {xmlelement,"presence",[{"type","unavailable"}],[]} =INFO REPORT==== 2011-06-05 00:43:54 === D(<0.736.0>:ejabberd_sm:410) : session manager from {jid,"terminal2","test.my.secret.domain","client","terminal2", "test.my.secret.domain","client"} to {jid,"root","test.my.secret.domain",[],"root","test.my.secret.domain",[]} packet {xmlelement,"presence",[{"type","unavailable"}],[]} =INFO REPORT==== 2011-06-05 00:43:54 === D(<0.736.0>:ejabberd_router:313) : route from {jid,"terminal2","test.my.secret.domain","client","terminal2", "test.my.secret.domain","client"} to {jid,"terminal2","test.my.secret.domain",[],"terminal2", "test.my.secret.domain",[]} packet {xmlelement,"presence",[{"type","unavailable"}],[]} =INFO REPORT==== 2011-06-05 00:43:54 === D(<0.736.0>:ejabberd_local:286) : local route from {jid,"terminal2","test.my.secret.domain","client","terminal2", "test.my.secret.domain","client"} to {jid,"terminal2","test.my.secret.domain",[],"terminal2", "test.my.secret.domain",[]} packet {xmlelement,"presence",[{"type","unavailable"}],[]} =INFO REPORT==== 2011-06-05 00:43:54 === D(<0.736.0>:ejabberd_sm:410) : session manager from {jid,"terminal2","test.my.secret.domain","client","terminal2", "test.my.secret.domain","client"} to {jid,"terminal2","test.my.secret.domain",[],"terminal2", "test.my.secret.domain",[]} packet {xmlelement,"presence",[{"type","unavailable"}],[]} =INFO REPORT==== 2011-06-05 01:23:19 === ...
--
m
... and, at the client side,
... and, at the client side, I get "host unreachable". Any ideas, why?
You want to know who and how
You want to know who and how provokes the sessions to close.
Maybe ejabberd closes the XMPP session of a user because
the TCP connection of that XMPP session was closed.
Are the bots running in a remote machine, where a network program
in the middle may close the TCP connections?
If that happens exactly at 00.43 everyday, try adding 5 minutes to the clock of the machine.
Is now the session closing delayed 5 minutes too? Now advance the clock 10 minutes,
is now the session clossing advanced 10 minutes?
Clients get disconnected, but ejabberd itself doesn't stop?
One way I know to close XMPP sessions is to call "ejabberdctl stop",
and then ejabberd logs: