Hello folks
Today I've updated my ejabberd from 1.1.4 to 2.0.3 (running on freebsd amd64 box)
Everything works great, but there is one serious problem - jabber clients periodically, every 10-15 minutes disconnects from ejabberd, but i can immediately reconnect and it works again.
I check logs, there are errors like this:
ERROR REPORT==== 2009-02-08 16:56:54 ===
** Generic server <0.711.0> terminating
** Last message in was {tcp,#Port<0.1097>,
<<23,3,1,0,32,0,155,65,177,188,224,224,201,238,100,78,99,30,128,66,176,83,98,247,70,31,179,236,2,45,194,4,96,225,173,208,7,23,3,
1,0,32,110,189,219,91,206,42,175,73,195,154,82,47,175,73,96,234,233,56,254,153,59,79,24,157,208,250,115,231,25,45,84,118>>}
** When Server state == {state,{tlssock,#Port<0.1097>,#Port<0.1098>},
tls,
none,
<0.712.0>,
65536,
{xml_stream_state,
<0.712.0>,
#Port<0.1102>,
[{xmlelement,
"stream:stream",
[{"xmlns:stream",
"http://etherx.jabber.org/streams"},
{"version","1.0"},
{"xmlns","jabber:client"},
{"to","swamp.ru"},
{"xml:lang","en"},
{"xmlns:xml",
"http://www.w3.org/XML/1998/namespace"}],
[]}],
0,
65536},
infinity}
** Reason for termination ==
** {badarg,[{erlang,port_control,
[#Port<0.1098>,
3,
<<23,3,1,0,32,0,155,65,177,188,224,224,201,238,100,78,99,30,128,66,176,83,98,247,70,31,179,236,2,45,194,4,96,225,173,208,7,23,3,1,0,32,
110,189,219,91,206,42,175,73,195,154,82,47,175,73,96,234,233,56,254,153,59,79,24,157,208,250,115,231,25,45,84,118>>]},
{tls,recv_data,2},
{ejabberd_receiver,handle_info,2},
{gen_server,handle_msg,6},
{proc_lib,init_p,5}]}
And i have no idea, why it happens, maybe you can help me?
Re: ejabberd clients periodically disconnects
As I've already suggested you in the ejabberd's chat room, this problem has most probably nothing to do with "periodical disconnection of clients" and is instead rooted on some SSL library interoperation problem.
This is suggested by the fact the problem is very rare: searching this site yields just two reports (this and this) which you failed to mention for some reason, and searching google for "{tls,recv_data,2}" brings about four links leading either here or to other places with these reports repeated.
There seems to be just one case in which the cause of the problem was kind of tracked down — s2s connection to gtalk servers. But this doesn't look like your case.
So one way to deal with it could be trying to make it work with privately installed another version of OpenSSL, or trying to make it work with FreeBSD 7.0, etc.
P.S.
Next time you post something like this, please take care to describe your setup in detail — I mean version of the system, versions of libs, the fact clients with TLS turned off don't get disconnected etc, etc, etc.