Monthly Archives: November 2012

Jabber/XMPP via Trillian on ejabberd with multiple Android devices

If you have an ejabberd deployment, and you use Trillian and try to sign in on multiple devices you may notice that you are disconnected on one of the Android devices (usually the oldest) when the other device signs in. As one of the benefits of Trillian is to be able to use chat on multiple devices and have messages sync, this is annoying and defeats the purpose of Trillian.

The reason that Trillian has this behaviour with Jabber/XMPP is because the Resource name on all devices is the same ("Android" by default, or configurable statically.) ejabberd will disconnect the old connection with the same resource name.

In 2.1.9 release of ejabberd, a new configuration/behaviour was added to handle duplicate resources names called resource_conflict. The new behaviour will permit a second connection with the same name to be assigned a random resource name allowing both devices to stay connected.

To enable this functionality, add the following stanza to your /etc/ejabberd/ejabberd.cfg (or equivalent location):

{resource_conflict, setresource}.

Then restart ejabbered, or reload the configuration via ejabberdctl. This should resolve the issue with resource name conflicts, and allow you to use ejabberd with Trillian to provide a seamless mobile experience!