Reputation: 91
I created an Oracle database in the AWS RDS console. I'm unable to connect to it from the Oracle SQL Developer program despite following all the instructions in the Amazon Developer Guides (see item #3 in this webpage in particular).
I get this error: IO Error: the network adapter could not establish the connection (vendor code 17002).
I have opened Port 1521 in my firewall settings.
Screenshots of my SQL Developer connection properties pane and the database properties from the AWS RDS console:
Edit:
AWS Security Group Rules Update: I took people's suggestions and ensured that Port 1521 was added to the Security Group inbound and outbound rules.
Inbound Rules screenshot For the inbound, I tried multiple things such as allowing the port for all IP addresses or just my IP address, but allowing it on the security group is the ONLY option that doesn't give me a SQL Developer connection error of "Listener refused the connection with the following error: TNS:listener does not currently know of SID given in connector descriptor. Vendor code 12505".
I don't believe I should have to have any rule for opening Port 1521 on the Inbound Rules because the default setting accepts all traffic, which I would think would include Port 1521.
Outbound Rules screenshot For the outbound, I added Port 1521 for my IP address.
I still get the same error despite all of these changes.
Any guidance would be appreciated! Thanks!
Upvotes: 2
Views: 8507
Reputation: 3865
In addition to providing ORCL as SID / Database Name (see Mbuotidem Isaac's answer, this is not the database identifier) I had to configure the security group on Amazon RDS, by adding this for public access:
Upvotes: 0
Reputation: 914
One or more of the steps outlined below may solve your problem.
Verify that your database is Publicly Accessible.
Verify that your VPC has an internet gateway attached to it and that the inbound rules for the security group allow connections. (See link 2 below for help on this)
Open the Amazon RDS console.
Choose Databases from the navigation pane, and then select the DB instance.
Choose Modify.
Under Network & Security, choose Yes for Public accessibility.
Choose Continue.
Choose Modify DB Instance.
Here is a screenshot of that window:
For more info, or if the above doesn't work, visit the links for more current info:
https://aws.amazon.com/premiumsupport/knowledge-center/rds-connectivity-instance-subnet-vpc/
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.html
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Scenarios.html
Upvotes: 9
Reputation: 68715
There can be multiple reasons for it. Here are a couple of them that I can think of
Upvotes: 1