Unable to connect to AWS RDS server: could not connect to server: Connection timed out (0x0000274C/10060) - amazon-web-services

I am trying to connect to AWS RDS database using pgAdmin4, I encounter and error:
Unable to connect to server:
could not connect to server: Connection timed out (0x0000274C/10060)
Is the server running on host "database-1.xxxx.eu-west-2.rds.amazonaws.com" (xx.xxx.xxx.xx) and accepting TCP/IP connections on port 5432?
I have tried to Allow Public Accessibility and InBound Rules from my IP. But I am still getting the error? What seems to be the issue?

I was facing the same error but for the MySQL database in rds. What I did was, I
went to http://checkip.amazonaws.com/ and checked the IP shown. I copied that IP and created a new security group by adding two rules, one is your standard all traffic rule, and the second is the one with custom IP which you just copied. Then went to rds and changed VPC security grp to both default and the one I just created. Do this and try to connect again. It worked for me

For a quick test, try opening your inbound rule like this. If it works, then you know the issue is your IP address in your inbound rule:
Once you set this- can you connect?

Related

Connection error of AWS Redshift to local computer

I tried to connect Amazon Redshift to my local computer using pycopg2. However, I got an error message:
psycopg2.OperationalError: could not connect to server: Operation timed out. Is the server running on host xxx and accepting TCP/IP connecitons on posrt 5439
I have done two guides with searching google:
Changed the Publicly Accessible setting as enable, and
Add 0.0.0.0/0 and ::/0 to VPC route as gateway.
It still doesn't work. Please let me know if you know what the problem is.
Things to check:
Check the Security Group associated with the Redshift cluster and confirm that it permits access on port 5439 from your IP address
Check that the Redshift cluster was launched in a Public Subnet (with the Route Table for that subnet pointing to 0.0.0.0/0 to the Internet Gateway)
Make sure you are connecting by using the DNS Name (If you ping the DNS Name, does it resolve to an IP address?)
Try going via a different network (eg home vs office vs tethered via your phone)?

Connection timed out on ec2 instance

I am trying to setup my first ec-2 instance in AWS and keep geting "ssh: connect to host ec2-xx-xx-xx-xxx.compute-1.amazonaws.com port 22: Connection timed out"
I followed all the solutions but nothing seems to be working for me.
Here is my inboud rules defined in security group:
I added ICMP rule to atleast ping my ec2-instance but noting seems to be working.
Steps I have tried so far:
Instead of "Anywhere" I added my ip to allow inbound connection,
opened port 22 through firewall.
Enabled ICMP from firewall.
Disabled Firewall.
So far nothing worked. Please help as this is my first exp with AWS and already have spend hours trying to figure it out.
Update: Added ACL rule
I deleted and recreated a new instance and not it works intermittently.

Can't resolve AWS RDS sql express server, Error, cant connect to ip,port

http://imgur.com/a/kzeVm
I have followed the guide, disabled my firewall, verified my security group allows access to everything (initially set to public). Still, 2 installs of mysql won't let ssms connect. No idea why this doesn't work
ACL
100
ALL Traffic
ALL
ALL
0.0.0.0/0
ALLOW
*
ALL Traffic
ALL
ALL
0.0.0.0/0
DENY
Security Group that my db is using
All traffic
All
All
sg-23ae465c (default)
postgres gives me
could not connect to server: Connection timed out (0x0000274C/10060) Is the server running on host "posttest.cnmcgcqc8rkx.us-east-1.rds.amazonaws.com" (52.2.0.231) and accepting TCP/IP connections on port 5432?
mysql can connect, might have to go with that
ecurity groups are not under RDS, they are under EC2's console. ACL's options are under VPC's console. This is not even mentioned in the guide. Seen someone connect on youtube with my exact settings...
This could be one of many things with the given information. The first thing I would check if you know your security groups are set up correctly is to open the port on the Network ACL Inbound Rules.

Amazon EC2 HTTP connection refused, but HTTP port is open

I created a new Ubuntu T2 Micro instance on EC2.
Created a new Elastic IP and selected "EIP used in: VPC"
Associated the address to my new EC2 Ubuntu instance.
I now have a Private IP and a Public/Elastic IP. No Public DNS.
My security group has SSH port 22 and HTTP port 80 open.
I can connect to the instance just fine through SSH using the Public IP, but when I try to browse to the Public IP through the browser it says connection refused. I can't ping it either.
I'm out of ideas.
Amazon EC2 HTTP connection refused, but HTTP port is open
That's already proven by the fact that you got 'connection refused'. If the port wasn't open it would have been 'connect timeout'.
'Connection refused' means that the service you tried to connect to wasn't listening at that port. Possibly it isn't started at all, or even installed.
You need to install a web server on your machine, such as Apache or Nginx. This is not provided by default in EC2.
go to security groups --> edit inbound rules --> add rule (add a custom TCP port 8888 with 0.0.0.0/0 ).
There are two major things that can happen to your web server.
Connection refused :- Which means there is no service running (http/JBOSS/nginx) on your server which is available to accept connections on port specified (which is 80 in this case)
Connection timed out :- Would mean server is not able to process any incoming connection hitting it at port 80. Once you fix the security group and your NACL (if you don't have a default one), then you need to re-check to see if it's service which is giving out the error, not to forget that the error response will change.

Connection getting refused to socket.io server on Amazon EC2

I have set up a a micro EC2 instance on AWS. Currently, I am using the free tier in Oregon. There are two problems which I am facing.
When I try to SSH the instance using the public DNS, it says host does not exist but when I try conencting it using the public IP, it connects to it. What setting is needed to use the public DNS ?
I have opened the SSH client using the IP address. I want to set up my application which needs Node.js and MongoDB. I installed Node.js using this
Next I installed MongoDB using this
Then I connected to my instance using Filezilla and uploaded my code to it. I then start my node application which uses socket.io.
When I try to connect to socket.io server using web browser, I get a message which says connection refused "error 111". I have opened TCP port 80 in instance's security groups. In iptables, I have forwarded port 80 to 8080, but still it does not work. I have also checked that the firewall is disabled in ec2. Kindly help me to resolve this issue.
Did you check if all of the necessary ports are open on Amazon Security Policy?
What you can do is to allow all traffic on Amazon Security Policy for test and see if the connection goes well or not.
You might also check if you need access DB from outside. In that case, you also have to open the mongodb port and setup mongodb correctly as well.
Other tools that might useful to test firewall and connection issue will be tcpdump and syslog file
For the dns issue, did you try to nslookup on that name and see if the IP shown matches your server IP?
As Amazon gives a long DNS hostname for the server, I always use my own domain name. It's much easier.
example : ec2.domainname.com, which points to the Amazon IP address
Hope that help.
My problem is resolved now..
For the DNS issue, earlier I needed proxy to access internet, so I guess the DNS name was not getting resolved. When I tried using proxy free internet, I was able to ssh using public DNS.
And regarding connection to socket.io, I used port 8080 instead of 80 and used "sudo node main.js" to run my node file. Now I am able to connect to the socket.io server and MongoDB.
Another thing which I want to ask is that would running the node file with sudo rights create some security issue ?
Thanks for the answer! That also worked for me. I had the same problem trying to connect through sockets (http://myipaddress:3000) to a node.js server, i tried opening ports on the actual ec2 instance and disabling the firewall through SSH but nothing worked. Had to go to Security Groups on the ec2 console and open a new inbound tcp rule enabling that port