12
votes

I'm new in AWS world. I have an issue to access to my instance of Microsoft SQL Server 2012 Express (11.00.5058) on RDS (US-East-1a).

When I have created DB instance, I was able to access to it, create some tables, transfer data, etc.. everything worked fine !

I didn't change anything and few hours after some inactivity, I try to access to the SQL Server instance by using Microsoft SQL Server Enterprise Manager but I was not able to connect to it anymore. I got following message:

Cannot connect to m3instance.cqbvdcpcgye3.us-east-1.rds.amazonaws.com,1433.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - The wait operation timed out.) (Microsoft SQL Server, Error: 258)

Currently, instance appears as available, the security group is 'rds-launch-wizard (sg-be4afcc6)'.

I have try to connect to 1433 port on via Telnet and no success.

Instance name is m3instance.cqbvdcpcgye3.us-east-1.rds.amazonaws.com.

Do you have any idea what append ?

Thank a lot for your help.

UPDATED

Telnet command return this :

telnet m3instance.cqbvdcpcgye3.us-east-1.rds.amazonaws.com 1433

Connecting To m3instance.cqbvdcpcgye3.us-east-1.rds.amazonaws.com...
Could not open connection to the host, on port 1433: Connect failed

DB settings :

enter image description here

Security Group :

enter image description here enter image description here

VPC :

enter image description here

I have tried to connect by using my home connection, or coffee shop wifi without success. I didn't check what was my IP address at this moment but the strange thing is that I was able to connect to SQL server when I have created DB instance (create SQL table, transfer data, etc...) but after few hours (and without any change), I was not able to access to it.

May be if I add a new rule in security group / inbound rule like this,it will fix my issue : (i didn't try yet because I'm at work right now and we have firewall that block SQL access)

enter image description here

At this point, data are not sensitive and security is not a big issue.

Thank again for your help guys !!!

2
With regards to telnet having 'no success' do you mean you get a failure message? telnet failure indicates that yes the port is closed so you definitely need to double check your security group. What does your security group rule look like exactly? For example if it is for a specific originating IP address, your client IP address may have actually changed. If you use whatismyip.com to check your IP, does it match the one in the security group rule?Nick.McDermaid
Can you describe the security group rules? Also where are you accessing it from, an EC2 server or your computer?Max
I update my post with some extra informations ;)Philippe sillon
Go to http://whatsmyip.net/ and check your IP address. Your top rule only allows incoming connections from a single IP address. Your home connection IP address and your coffee shop WiFi will definitely have different IP's and it's possible both of these change all the time. The second rule will allow incoming connections from anywhere and will likely solve your problem.Nick.McDermaid
You right. It's work. TxPhilippe sillon

2 Answers

7
votes

This because maybe you choose the default group , so Edit Your Security Group And In (INBOUND) ADD RULE and allow connection from (ANYWHERE)

2
votes
  1. Actions
  2. Edit inbounds rules
  3. MS SQL TCP 1433 My Ip (Automatically appears the public ip of your router)
  4. Save
  5. Try connect