Browser returns "No data received" for my Amazon EC2 instance over and over again - amazon-web-services

I've experienced two times now of the "No data received" issue ever since I've moved my WordPress site to use RDS.
Though I could still connect to my RDS via MySQLWorkbench, but not able to connect to my instance via SSH (It shows "Operation timed out") after this issue has happened each time.
Doing "ping" in Terminal would show that my instance is "100.0% packet loss", and rebooting the instance would not fix this issue neither. I've set the correct IP for the SSH in the security groups inbound rules, and also checked that my instance is appear to be running on the EC2 console. The browser would still returns "No data received.".
Interestingly, I've found that stopping the instance, and then restart the instance and the httpd service would fix the issue. However, this issue will always come back again after couple of hours.
Could anybody help me or guide me to troubleshoot it, please?

Related

HTTP server on EC2 instance unreachable after a few minutes

I have a running instance on the Linux 2 AMI.
I have a default VPC and network interface.
Security groups taken care of, even opened all traffic and still got nothing.
There is an Internet Gateway
Routes are open on the VPC
The server is running
nginx is running
Once the instance is initiated and installed, all of this is ready
I can reach the http website the first 2-3 minutes, then it is unreacheable.
No idea why, everything else still running, can still ssh into the server, but http port 80 not running.
I opened everything from iptables, still nothing.
If I reboot the server, I get a minute where I can reach the server via http, but then a minute later its the same again.
I can reach http if I use $ wget http://localhost
So I think it is probably something from the EC2 control panel, not the instance itself.
I tried on new instances too.
Anyone has an idea?
The reason behind this weird behavior was that AWS abuse team had blocked some of my ports, had to upgrade to the developer plan to be able to know this, contacting them at the moment

New EC2 not connecting to RDS

I lost my PEM and had to create a new EC2. I duplicated it with "make same". I then tried to connect to the RDS database and it gives me cannot connect with user#. now, the IP address of the server has changed, but it is in the same security group, so shouldn't matter.
I changed the user to be from anywhere % and flushed privileges. I even rebooted the DB. I've tried messing with the security stuff, but everything is as it should be, the same as it was before hand when it was working on the previous server.
either something was not "duplicated" when the EC2 was duplicated or there is something somewhere I have to change because the IP of the EC2 changed.
if they are in the same security group, this shouldn't be an issue however.
any help is appreciated. as I can no longer connect to the DB with the app.
the EC2 is linux running a docker container for node.
I can still connect to the RDS via local machine.
So i still don't know what the issue was, but I was able to get around it by creating a new user. I'm thinking that the host wasn't actually changing when I was changing it in RDS - even with a reboot.
If somebody comes across this same issue, try creating a new MySQL user.

EC2 instance connection

I have an EC2 instance which until last week I could connect through ssh using a key fine. Since then, I can not connect on it anymore. Also, ping do not respond. But, I can still access my website that runs on that instance. To the best of my knowledge, I havent applied any change on security settings that could be blocking it. Is there any suggestions on what could going on?

I can ping my EC2 instance, but I cannot connect through ssh

A while back I had created an RHEL EC2 instance. Set it up correctly and was able to connect to it through putty and WINSCP. Over time it hasn't been used but until recently it needed to be accessed again. I went to check to login but wasn't able to. So i reboot the instance and try to reconnect but I cannot anymore. I get the error "Network error: Connection refused."
I tried recreating the ppk from pem, and also enable all ports to all IP's. What could have caused this un-reachability and are there any troubleshooting tips for me to connect to it again?
There are a few things to check here:
Did you have anything running on the box that might have caused it to become unresponsive over time? This is somewhat unlikely since you said you rebooted the machine.
Check your security group settings to ensure that the firewall is not blocking your SSH port. The instance has no way of knowing whether connections will actually be accepted by the Amazon network on the SSH listening port.
Amazon hardware can fail and cause your instance to become unresponsive. Go to the Instances page on your EC2 console and see if 2/2 of the status checks are passing. If less than 2 are passing, this is probably a failed instance situation.
As a last resort, try right-clicking the instance and checking the system log for anything that might have caused the instance to not listen for SSH connections.
Hopefully you have your data on an EBS volume such that you can simply stop and start the instance and have it come up on different hardware. While it would be nice if Amazon provided console level access to the box, unfortunately they do not presently (as far as I know).

Server in Amazon Cloud not coming up after reboot

We have a server hosted in Amazon cloud which I'm accessing it remotely over ssh. I'm not aware of much details about the server setup. I had been given the IP and credentials to access it remotely.
Now, I have tried to reboot(sudo reboot) the server from the remote console. But after the reboot command, server is not coming up. I'm not able to access the server using the same IP & credentials. Could you please help me find what has gone wrong here? Does the server change its IP when we reboot ?
Thanks in advance.
-Dilip
If the server is not assigned an Elastic IP, the hostname changes upon every reboot.
Log into AWS console, find your instance and determine if the instance is assigned a hostname, or if it is assigned an elastic IP. Make sure you are using the correct information to log in.
Also, depending upon the shutdown behavior, the instance may be terminated on stop. If you log in and find your instance terminated I would suggest enabling termination protection to prevent this from occurring again.
If you are unable to log into the AWS console, I suggest contacting the server admin for further assistance.