Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've seen this questions asked other places, but now I've run through every fix proposed in other questions so I'm re asking it here, in hopes that someone will have a different solution.

Problem: I have a EC2 instance, and I can ssh into it and work on it, and I have a Elastic ip set to it. I am unable to ping this machine, or log in to it using my browser.

Solutions mentioned and tried:

  1. service httpd start

    i. response I get is "unrecognized service"

    ii. when I run apache2ctl -k start, it shows "httpd already running", so I'm assuming httpd is not the problem, it's just possibly named something else because of apache2, or for whatever reason.

  2. I went into EC2->Security Group-> Default (which is the one I used.)->inbound, and everything there is set up correctly (I'm assuming). There it shows 80(HTTP) 0.0.0.0/0. 443(HTTPS) 0.0.0.0/0, and various other servies with their ports and 0.0.0.0/0 next to them. I also enabled a rule for enabling ICMP Request All on 0.0.0.0/0 temporarily for testing purposes

  3. I've tried disabling the iptables with "service ufw stop"

  4. Just in case I'm doing something really stupid, because I'm not all that used to connecting to web servers that I've spun up, I'm typing in the address to the machine into the url like this (assuming my ip address was ip.address).

    i. http:/(slash)ip.address/

    ii. ip.address

    iii. https:/(slash)ip.address/

    iv. ip.address/webFolderName/

    v. http:/(slash)ip.address/webFolderName/

None of the attempts worked, and the only thing I haven't tried that i've seen is to start wireshark on the machine, and see if the requests are reaching it, and it's just ignoring them. I'm not sure I want to do that yet, since A). I'm not 100% positive how to use wireshark without the gui, since it's the only way I've ever used it (I really should get used to it in terminal, but I didn't even know you could). B). It really seems like I'm missing something simple in getting this to work. Thanks in advance for any help.

share|improve this question
    
Which AMI are you using for your EC2 instance? –  nachbar Nov 2 '13 at 2:32
    
It's a custom AMI, but it's Ubuntu. –  Slimmons Nov 2 '13 at 2:39

1 Answer 1

I'm not sure I have the answer, but I know how to start troubleshooting.

I would start with getting the pinging working. If you enable a security group that allows all ICMP (at least temporarily), you should be able to ping your machine and get a response.

ping my.instance.ip.address

So, if your instance's external IP is something like 23.34.45.56, you would use

ping 23.34.45.56

Make sure you are NOT using the internal IP address, which starts with 10. -- that won't be routed to your EC2 instance from the outside.

If you do not get ping responses back, the problem could be at either end. For example, your own ISP may be blocking the ICMP messages needed to send and receive the pings. So, if you don't get the ping responses, the next thing I would try is spinning up a second instance, ssh'ing into that, and try pinging the first instance to see if you get a response. If not, I would try using vanilla Ubuntu AMI's, pinging from the outside and/or from a second EC2 instance.

Once you are able to ping your machine and get a response, the solution may become clearer.

Note that, using http, your url would be http://my.instance.ip.address, etc., with two forward slashes, not one. And again, be certain that your IP address does not start with 10 and that you are using the external IP address. Also, be certain you are not using a Virtual Private Cloud (VPC). VPC's are great, but they require additional configuration to communicate with their instances.

share|improve this answer
    
I set up another instance. I can ping the original instance using the 10.x.x.x internal ip address, and also the other way, but not with the Elastic IP. So it's definitely accepting ICMP requests. Do you know of a reason why the elastic ip would accept ssh, but not ICMP, if the machine is set up to accept them? –  Slimmons Nov 3 '13 at 18:29
    
If you can ping using the internal address, I think its got to be either a security group issue or an internal firewall issue within your custom EC2 instance. Double-check that you are using the security group you think you are, and that that group has a rule that includes "All ICMP" from all addresses inbound. Consider making a custom security group and using that rather than the default group. I am able to change the rules of a security group while the instance is running and see the effect immediately. Also, try with a vanilla Ubuntu instance, to make sure your instance is not the issue. –  nachbar Nov 6 '13 at 2:20
    
I've set up a fresh Ubuntu install, and used the same security group, and it's pingable, and reacts exactly how I would expect the other one to. I disabled the iptables on the original instance that isn't receiving pings, but nothing has helped. Is there a way to find out what's stopping the ping if not the iptables, or security groups? –  Slimmons Nov 7 '13 at 3:11
    
There are some options on logging ICMP packets at stackoverflow.com/questions/4112706/… . However, since the problem does not occur in a vanilla Ubuntu, but only in your custom Ubuntu, it has to be something about the software installed in your custom instance. If you got the instance from someone else, I would ask them. If you made it yourself, I would try repeating your steps, and see at which point you lose the ability to respond to a ping. –  nachbar Nov 8 '13 at 5:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.