[ejabberd] With SMACK, ejabberd closed connection error on client side

Holger Weiß holger at zedat.fu-berlin.de
Mon Sep 21 10:20:20 MSK 2015


* Gaurav Jain <monkeyfdude at gmail.com> [2015-09-18 18:55]:
> I am trying to use `smack-4.1` with `ejabberd-15.x`. But after few (1-2)
> minutes of idle client, when I try to send message, I get SMACK error
> "server closed the connection" on the client side

I'd set "loglevel: 5"¹ in your ejabberd.yml and then have a close look
at the entries that are logged before/during a client disconnect.  If in
doubt, I'd watch the connection with tcpdump to see what side closes the
connection.

> * I run ejabberd **WITH OUT** `mod_ping`

mod_ping is used to detect dead TCP connections (and/or to help keeping
them alive), not to close idle connections.

> What is the ejabberd config to prevent idle client disconnects?

ejabberd won't close idle client connections during normal operation.

Holger

¹ Note that sensitive information (such as passwords) might be logged
  with that log level.


More information about the ejabberd mailing list