Description
When providing wallet directory (and necessary credentials and settings) creating ODP.NET connection fails. On Windows same code runs ok.
I've created a repro here: https://github.com/ChaosEngine/dotnet-db-samples/tree/autonomous-linux-fail/samples/dotnet-core/autonomous-db/console with guidance applied from here: #59
In my autonomous-linux-fail branch for reproducing the issue I've created 21c Oracle ADB (always free) and downloaded wallet zip.
Then it was unzipped with content placed inside console/wallet directory. I've also enabled tracing and which is placed inside console/traces directory.
I've run the linux-x64
code both in ubuntu (with dotnet5) and from inside alpine container (mcr.microsoft.com/dotnet/sdk:5.0-alpine3.13
image.
The output of this trivial console example gives:
$ dotnet run
Connection request timed out
I've tried various combinations of tnsnames.ora, wallet locations inside code and other options for ODP.NET OracleConnection.
For what it's wort in tracing I can see this
2021-02-26 18:38:16.265582 TID:1 (CFG) (TNSNAMES) FilePath : wallet/tnsnames.ora
.....
2021-02-26 18:38:16.269375 TID:1 (PRI) (.NET) (sqlnet.ora) Searching for 'wallet/sqlnet.ora' : found!
2021-02-26 18:38:16.270354 TID:1 (CFG) (SQLNET) SSL_SERVER_DN_MATCH : yes
2021-02-26 18:38:16.270400 TID:1 (PRI) (.NET) (ldap.ora) Searching for 'wallet/ldap.ora' : not found
2021-02-26 18:38:16.274032 TID:1 (PRI) (ENT) (CP) OracleConnectionDispenser..cctor()
2021-02-26 18:38:16.275041 TID:1 (PRI) (EXT) (CP) OracleConnectionDispenser..cctor()
2021-02-26 18:38:16.275072 TID:1 (PRI) (ENT) (CP) OracleConnectionDispenser.Get()
2021-02-26 18:38:16.278756 TID:1 (PRI) (ENT) (CP) PoolManager.ctor()
2021-02-26 18:38:16.280405 TID:1 (PRI) (EXT) (CP) PoolManager.ctor()
2021-02-26 18:38:16.282257 TID:1 (PRI) (ENT) (CP) PoolManager.Initialize() (constr=User Id=ADMIN;Password=;Data Source=dataplayground_low;)
2021-02-26 18:38:16.282965 TID:1 (PRI) (EXT) (CP) PoolManager.Initialize() (pmid=43942917) (constr=User Id=ADMIN;Password=;Data Source=dataplayground_low;)
2021-02-26 18:38:16.286520 TID:1 (PRI) (BUF) (OBP.CTOR) (poolid:59941933) (OracleConnectionDispenser`3.GetPM)
2021-02-26 18:38:16.291651 TID:1 (PRI) (ENT) (CP) OraclePoolManager.Get()
2021-02-26 18:38:16.484823 TID:1 (PRI) (ENT) (CP) PoolManager.Get() (txnid=n/a) (bForceMatch=F)
2021-02-26 18:38:16.485832 TID:1 (PRI) (ENT) (CP) PoolManager.Get() MultiTenant : Searching for a idle connection, retryCountWithoutAffinity: 0
2021-02-26 18:38:16.486514 TID:1 (PRI) (ENT) PoolManager.ProcessCriteriaCtx_NonEnlistedConnection()
2021-02-26 18:38:16.486545 TID:1 (PRI) (EXT) PoolManager.ProcessCriteriaCtx_NonEnlistedConnection()
2021-02-26 18:38:16.572470 TID:1 (PRI) (ENT) (CP) PoolManager.CreateNewPR() (txnid=n/a)
2021-02-26 18:38:31.599928 TID:1 (PRI) (CP) PoolManager.CreateNewPR() (DUMP)
(CP) =================================
(CP) User Id=ADMIN;Password=;Data Source=dataplayground_low;
(CP) pmid=
43942917(CP) =================================
2021-02-26 18:38:31.600853 TID:1 (PRI) (ENT) OracleException.ctor()
2021-02-26 18:38:31.601383 TID:1 (PRI) (ENT) OracleError.ctor()
2021-02-26 18:38:31.601710 TID:1 (PRI) (EXT) OracleError.ctor()
2021-02-26 18:38:31.601729 TID:1 (PRI) (ENT) OracleError.ctor()
2021-02-26 18:38:31.601736 TID:1 (PRI) (EXT) OracleError.ctor()
Seems like it can find all necessary params, but this missing ldap.ora is specifically peculiar :/
The very same code runs ok from within windows without any wallet files changed and run from console and VS2019.
If needed I can provide full trace files.