Skip to Main Content

ODP.NET

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!

Cant connect to database with ODP.NET Core on Linux

Anthony FAug 6 2018 — edited Aug 15 2018

I am trying to write my first .Net Core web app and I cant seem to get it to talk to our Oracle database on my Linux VM. The same code works from my Windows desktop. The VM can see the corporate network and internet (I can browse the internet and intranet just fine). I can ping the Oracle server from the VM. I'm pretty sure the firewall isn't blocking the outgoing connections (I can SSH to various web servers in the company).

I am getting the error "ORA-12545 Network Transport: Unable to resolve correct hostname" and the underlying error is "ExtendedSocketException: No such device or address" when I try to make the connection to our database. I have put the TNS descriptor in the OracleConfiguration.OracleDataSources.Add() function on the application startup to ensure it has all the info it needs to connect to the database. The server name in the TNS description is fully qualified (xxx.yyyy.com), and I've also tried with IP addresses. Again the same exact code works on Windows so I'm a little lost on why it isn't working on Linux.

The rest of the application works fine - I can serve dynamic web pages, static content, etc.

I am not as experienced with Linux as I am Windows, so if I missed something in the underlying Linux config that might be it.

Server: CentOS 7

.NET Core 2.1

Oracle Managed Driver beta 3 (via nuget)

Oracle 12c

Apache httpd reverse proxy to Kestrel running the dotnet core application

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 12 2018
Added on Aug 6 2018
6 comments
3,370 views