Search code examples
amazon-ec2iptablestigaseconnection-refused

Can't connect to Tigase server running on EC2 Instance: Connection Refused


After installing Tigase on an AWS EC2 instance I keep getting the error message 'connection refused' when I try to connect to it using an xmpp client.

The instance is attached to a security group with rules to allow traffic to the necessary ports (tigase needs 5223 primarily and some others for more exotic features). I've also tried it with rules allowing all traffic to all ports from all sources but I still get the same message.

I've also checked iptables because I noticed some people needed to configure those as well in specific cases, I made sure it allows all connections but still I can't connect to Tigase.

  • Yes Tigase is running, there are no relevant errors in the Tigase logs
  • SSH (port 22) and HTTP (port 80) work fine
  • Enabling ICMP (ping) on all ports works fine
  • I've tried several xmpp clients, same problem
  • I've deleted and recreated instances several times
  • Re-installed Tigase on fresh instances several times with various configuration options
  • Tried using domain name associated with Elastic IP, normal IP and tried public DNS directly.
  • Configured the DNS in the way necessary for Tigase as described here

I've looked everywhere and have not been able to find anything to fix this. Networking isn't my main area of expertise and I'd really appreciate any advice.


Solution

  • Wow, in case anyone runs into the same problem in the future, turns out that this was related to the AMI. I was using an Amazon Linux AMI and switched to Ubuntu Server 14.04 LTS. I wish I tried this sooner but I didn't really consider this a possible solution earlier. Apparently Amazon Linux doesn't play well with Tigase.