Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-12170: TNS:Connect timeout occurred - Oracle Cloud Free Tier

trangelierFeb 16 2020 — edited Feb 16 2020

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!

Some versioning:

- OS: Oracle Linux 7.7

- Instant Client: 18.5 (installed through RPM)

- SQLPlus: 18.5

- SQLcl: 18.5

This post has been answered by trangelier on Feb 16 2020
Jump to Answer
Comments
Post Details
Added on Feb 16 2020
3 comments
2,561 views