[Freeswitch-dev] mod_dingaling timing out

Federico Beffa beffa at ieee.org
Mon Oct 31 22:46:38 MSK 2011


Dear Developers,

I'm using a fairly recent version of FS (pulled 20 Oct.) and I'm
experiencing a timeout problem with mod_dingaling:

With FS running on a fairly fast server (Intel Xeon CPU E31220) with
Ubuntu 10.04 server, at an interval of approximately 3h (varying
between 2h and 5h) I see mod_dingaling disconnecting (for some
minutes) and reconnecting to google talk (client mode). To find out
the root cause I've added some debugging lines in the code and have
found that the reported reason is that the function "SSL_read" in the
function "iks_recv" of the FS customized iksemel library returns
SSL_ERROR_SYSCALL. Looking at errno and related message I get: errno =
110 (Connection timed out).

I'm behind NAT, but due to the recently introduced "keep alive"
feature of mod_dingaling that should not be the cause of the problem.

The problem should also not be due to network problems as:

* during a disconnect, from the same machine I could ping
  talk.google.com and "openssl s_client -connect talk.google.com:5222
  -starttls xmpp -debug" replies correctly.

* simultaneously running FS on a different machine as a different user
  shows the same problem, but at different points in time and
  sometimes (?) longer intervals.

Reading the man page for SSL_read I learned that this function can
also write to the socket (as SSL_write can read). I'm wondering if the
use of poll() (in iks_recv) with only read flags in conjunction with
SSL_read could somehow be responsible for this.

I would appreciate any suggestion on how to investigate deeper the
problem.

Thanks,
Fede



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev mailing list