0

I installed an application jetty on ubuntu 12.04 instance t1.micro

PUBLIC_DNS = ec2-54-225-24-215.compute-1.amazonaws.com

I can do:

ssh ec2-54-225-24-215.compute-1.amazonaws.com

From within the instance, I can do:

curl localhost:8080 -- Success
curl 127.0.0.1:8080 -- Success

From DEVELOPMENT DESKTOP, I did:

ec2-authorize "quicklaunch-0" -P tcp -p 8080
GROUP quicklaunch-0
PERMISSION quicklaunch-0 ALLOWS tcp 8080 8080 FROM CIDR 0.0.0.0/0 ingress

And when I try to connect from browser:

http://$PUBLIC_DNS:8080 or curl $PUBLIC_DNS:8080, it does not connect

curl: (7) couldn't connect to host

I can connect to port 22 of the instance from my desktop.

My instance belongs to quicklaunch-0

What is it I am missing? Please help.

Based on: EC2 hosted Node.js application - can't remotely connect to port

I did try various other ports and launching new instances. Nothing seems to work.

EDIT:

When I run netstat -l, my output is:

Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp6       0      0 127.0.0.1:8080          :::*                    LISTEN    

Is FOREIGN address a problem here?

Community
  • 1
  • 1
GJain
  • 5,025
  • 6
  • 48
  • 82
  • Your application may not be listening to the correct IP. Ec2 uses NAT and the ip assigned directly to your instance is a private one. Software firewalls can also interfere. – datasage Jun 30 '13 at 00:25
  • I think my jetty server is an issue. I dont think its an ec2 issue. I will edit once investigation complete – GJain Jun 30 '13 at 02:39
  • It appears to be only listening on localhost. – datasage Jun 30 '13 at 04:14
  • thx...yes...that was an issue. I will do man netstat to learn – GJain Jun 30 '13 at 04:24

1 Answers1

0

As mentioned in my post, netstat -ln revealed that my app server was listening only to localhost. I fixed that.

GJain
  • 5,025
  • 6
  • 48
  • 82