motiver
motiver

Reputation: 2202

Cannot access web app on 8080 on EC2

I created an instance on EC2 and installed JBoss. I edited the standalone.xml like so:

<interface name="management">
    <inet-address value="0.0.0.0"/>
</interface>
<interface name="public">
    <inet-address value="0.0.0.0"/>
</interface>

Also, I enabled port 8080 for incoming tcp traffic in iptables and also added a rule to the EC2 security group config via the EC2 management console.

I verified the deployment is working fine by logging in to the server via ssh and I did:

lynx http://localhost:8080

I can see my web app running. But when I access the same from a browser using the public DNS given to me via amazon <my public DNS>:8080 I don't see anything. The browser cannot find anything.

Do I absolutely need to have an EIP on EC2 mapped to my instance so that my web app is accessible via the Internet?

Any pointers in the right direction would be very helpful.

Thanks.

Upvotes: 2

Views: 3385

Answers (1)

motiver
motiver

Reputation: 2202

I figured out what the problem was. It was iptables. I stopped the service using:

service iptables stop

It worked!

I realized I don't need iptables running on my EC2 host as amazon has security groups in place which act like a "firewall" anyway.

PS: I am not sure if this qualifies as an answer but wanted to put my answer here anyway as it might help others with similar issues.

Upvotes: 4

Related Questions