We have been working on Ejabberd for our Mobile application for over 6 months and have installed and managed our servers (most of which run on the Amazon EC2 setup) for a while now, but my last installation left me stumped. The thing was my installation would go through perfectly and I would be able to access my ejabberd admin console on 5280 and also chat was working with website over http_bind perfectly but was unable to connect to it through the Android and iOS ejabberd library.
I would create my client and the connect call would wait forever before timing out.
I tried reinstalling ejabberd and looked everywhere I could have possibly goofed up.
The solution to the problem was on EC2 and not the installation. Its actually an EC2 security groups issue. You need to ensure for the instance your working with, if the security group has port 5222 and if your working with server-2-server 5269 open.
The way to get this done using elastic fox is
Repeat the process and add it for 5269 if your working with server-2-server and your done.
Hope this is useful to someone.