Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot access tomcat instance installed in EC2

I have install tomcat 7 in an Ubuntu EC2 instance. It's up and running but I cannot access it using the public ip (54.213.225.148:8080). I have also setup the security groups as specified in the previous posts. But, still no luck.

security groups setup

Any help on this would be really appreciated.

like image 429
Dilantha Avatar asked Feb 23 '14 08:02

Dilantha


People also ask

Why my EC2 instance are not accessible?

Firewall restrictions Yet another reason that make EC2 instance not reachable can be firewall restrictions. A windows instance need port 3389 open in the security group of the EC2 instance. Or, if the Linux instance has a custom SSH port, that also should be open in the firewall.

How do I connect to an existing EC2 instance?

To connect from the Amazon EC2 console Open the Amazon EC2 console. In the left navigation pane, choose Instances and select the instance to which to connect. Choose Connect. On the Connect To Your Instance page, choose EC2 Instance Connect (browser-based SSH connection), Connect.

Why am I unable to connect to a port on an EC2 Windows?

The following issues can prevent a connection to an EC2 Windows instance on a specific port: The service that uses the port isn't running on the instance. Windows Firewall is blocking traffic to the port. A security group is blocking traffic.


2 Answers

Make sure your Ubuntu Uncomplicated Firewall is controlling the traffic instead of iptables.

sudo ufw enable

Then to configure it to allow 8080.

sudo ufw allow 8080
like image 65
jeremyjjbrown Avatar answered Oct 01 '22 20:10

jeremyjjbrown


You should Add the port number to the firewall setting in the system also.

sudo iptables -I INPUT -p tcp --dport 8080 -j ACCEPT

where 8080 is the tomcat port number.

like image 23
shivaghaneesh Avatar answered Oct 01 '22 21:10

shivaghaneesh