I've been running an instance EC2 through Laravel forge for about 2000 hours and this morning got this error while trying to reach it:
SQLSTATE[08006] [7] could not connect to server: Connection refused Is
the server running on host "172...***" and accepting TCP/IP
connections on port 5432?
After SSHing into the server I've getting a similar error when trying to run a command. I've dug through AWS but don't see any errors being throw. I double checked the ip address for the instance to make sure the IP hadn't changed for any reason. Of course I'm a little behind on my backups for the application so I'm hoping someone might have some ideas why else I can do to try and access this data. I haven't made any changes to the app in about 10 days, but found the error while I was pushing an update. I have six other instances of the same app that weren't affected (thankfully) but makes me even more confused with the cause of the issue.
In case anyone comes across a similar issue, here's what had happened. I had an error running in the background which had filled up the EC2 harddrive's log. Since the default Larvel/Forge image has a DB running within in the EC2 instance, once it ran out of room everything stopped working. I was able to SSH in and delete the log though, and everything started working again.
To prevent the issue from happening again I then created an amazon RDS and used that rather than the EC2 instance. It's about three or four times the price of just an EC2 instance, but still not that much and the confidence I now have in the system is well worth it.
Related
I am new to AWS and learning through hands on labs. As per the instructions in the lab, I launched an EC2 instance, installed apache and displayed a simple index.html file when the instance IP was accessed. This worked great and when I was done for the day I stopped the instance. Now when I select the instance, go to Actions > Instance State > Start it shows me that the instance is running but when I enter the IP address in the browser I get an error message that says:
This page isn’t working
[IP ADDRESS] didn’t send any data.
ERR_EMPTY_RESPONSE
Why is this happening when I have not changed anything else in the instance? How can I get it to work and show the index.html file again? I see no errors in the AWS console. I tried creating a new instance, which worked, stopped it and started again and faced the same problem.
Based on the comments.
The issue was that apache was not starting automatically after instance re-start.
The solution was to enable the automate start of the web server.
I was trying to process GWAS data using plink1.9 with a rental AWS ubuntu server. I executed the plink commands from the terminal window in the Rstudio server.
It turned out that if I execute a plink command that overloads the server, my Rstudio server will become inaccessible and this problem does not revolve.
for example my Rstudio-server from port 8787 has become unavailable.
http://ec2-54-64-41-xxx.ap-northeast-1.compute.amazonaws.com:8787/
I accidentally did it twice. First time I did something like cat xxx.vcf (how stupid of me) and the server simply went frozen and the Rstudio server crashed.
Since I could still access the server with putty and winscp and so on I managed to get my files to a new instance. Then I tried to use plink to do some QC, something like
./plink --bfile xxx--mind 1 --geno 0.01 --maf 0.05 --make-bed --out yyy
It had again overloaded the server and the same Rstudio server trouble occurred again.
Now both instances are still accessible from putty, I logged on to check the running processes and it seemed to be fine. There were no active heavy jobs and no zombie processes either.
The CPU monitoring looks fine too.
With the only problem that the Rstudio-server link is not working.
Does anyone have similar experiences? Your advice is very much appreciated.
mindy
I'm not sure what's going on. I can SSH into my EC2 instance and start the node server. It starts with a console log of "started on port: 3000". Great. But when I try to connect to it from my website I keep receiving an error:
GET http://ec2-xx-xxx-xxx-xx.compute-1.amazonaws.com:3000/socket.io/?EIO=3&transport=polling&t=MVhTWi5 net::ERR_ADDRESS_UNREACHABLE
Is this a problem with socket io file not being found?
Note that I was not having any problems for a month. Now all of the sudden I check my website out and boom this error. Any suggestions?
Error is being logged from the browser.
EDIT:
For some reason on one computer at my job I'm having the problem. When I go home to test it out on my other computer. No problems, the website works as intended
I've been running tomcat on my Amazon EC2 instance for a few weeks just fine but all of a sudden, I became unable to connect to it. When I use putty I can connect to it fine but when I try to connect with my browser by using ip:8080 , I can't connect anymore. I've tried restarting the instance (and of course, adjusting my input ip accordingly), restarting the tomcat server within the instance, and checking the security groups. Nothing seems to work. I have no idea why it stopped working out of the blue. How should I proceed?
There are many reasons to why you cannot connect. The best way to solve this is to follow Amazons troubleshooting tips, found here.
I had the same issue. The amazon troubleshooting did not help. Then I remembered that I ad a line in my system32/driver/etc host file when I did some site migration.
Deleted that line and I was back in business again.
Hope that helped
I have an aws ec2 micro (free tier, so no tech support) and as is expected, when I got back in the morning my PuTTY had timed out from being connected for a few hours, this has happened multiple times before. When I went to restart the connection, I got a connection refusal. Tried more times, nothing. WinSCP, what I use for file transfer, also can't connect to a new login, but praise the lord allowed me to download all the files I had on the server. I tried on another device and through telnet on all the open incoming ports, connections refused. The MindTerm or whatever it's called when you click connect (on firefox) also couldn't connect.
The instance is all green, volume is all green, passing all status checks as well.
I have looked at other threads, but they are for after a restart or changing of the ssh config. I haven't touched anything. I doubt the permissions or anything have been compromised.
Apparently just hitting reboot on the server did it. Can't believe I didn't think of something so easy.