Search code examples
oracle-databaseoracle-cloud-infrastructure

Compute cannot connect to ATP


EDIT - SOLUTION -

Looks like it was an issue with the Oracle Virtual Cloud Network Egress rules.

For some reason, my Egress rules only allowed 80/443 so either open it to all ports or add 1522/PORT as needed.

Currently that is located at Networking -> Virtual Cloud Networks -> VirtualCloudNetwork-YOURID -> Security List Details -> Egress Rules

END OF EDIT

Thanks for reading.

I've tried about everything under the sun, and cannot for the life of me get my Oracle Cloud Free Tier Compute Instance to connect to my Oracle Cloud Free Tier ATP Database.

I've followed the Oracle instructions on how to connect (https://docs.oracle.com/en/cloud/paas/atp-cloud/atpug/connect-sqlcl.html#GUID-AC24404D-8D0B-4716-83F6-F0F501318011) and get what feels like a timeout, but SQLcl never did indicate it just hung. I've also installed the Oracle Instant Client and the required environment variables for it to work. I install the Instant Client at work on my servers, and have reinstalled three times so I'm quite sure the issues is not there.

Finally, I installed SQLPlus and it, within a reasonable amount of time, shows this error:

$ sqlplus admin/<password>@devdb_high

SQL*Plus: Release 18.0.0.0.0 - Production on Sun Feb 16 20:51:15 2020
Version 18.5.0.0.0

Copyright (c) 1982, 2018, Oracle.  All rights reserved.

ERROR:
ORA-12170: TNS:Connect timeout occurred


Enter user-name:

This lead me down the road of "can I even connect through the 1522 port" that Oracle Cloud is using.

Unziping the wallet file downloaded through the Oracle Cloud Portal, I grabbed the domain of my database adb.us-ashburn-1.oraclecloud.com. Using netcat, the following command gives me these results:

$ nc -zv adb.us-ashburn-1.oraclecloud.com 1522
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connection to 130.35.147.64 failed: Connection timed out.
Ncat: Trying next address...
Ncat: Connection to 130.35.144.65 failed: Connection timed out.
Ncat: Trying next address...
Ncat: Connection timed out.

From what I can see, I can't even connect. Both firewalld has been stopped and SELinux set in permissive modes, and the issue still persists. I can issue that netcat command from my MacBook Pro and Fedora Workstation and connect with the same exact wallet on both of these machines as well.

Any troubleshooting is welcome!

EDIT:

Some versioning:

  • OS: Oracle Linux 7.7
  • Instant Client: 18.5 (installed through RPM)
  • SQLPlus: 18.5
  • SQLcl: 18.5

Solution

  • Can you check in Networking > Virtual Cloud Networks > VirtualCloudNetwork-20190915-1634 > Security List Details that you allow access with port 22 (ssh)?