-
Notifications
You must be signed in to change notification settings - Fork 365
init_oracle_client(config_dir=f"{lib_dir}/network/admin") is the only path that seems to work for wallet based auth #527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Do you have a sqlnet.ora file? Is there a directory path that needs to be updated? If it's an Oracle DB cloud wallet the default path would indeed map to If it's some other kind of wallet, please share all details, including the sqlnet.ora contents. |
there is an sqlnet.ora file and I did not modify it. Using the TNS_ADMIN variable typically overrides this, and it seems from the doc that that's exactly the purpose of the |
I don't understand your problem: please share details to expedite problem solving! If your sqlnet.ora contains |
When I use the same wallet files with a java app server like WebLogic or Tomcat, I can use the syntax for the connection as TNS_ADMIN variable replaces the DIRECTORY location as far as I know and the wallet is found This is not what is happening here. |
Noted. The main question now is whether editing sqlnet.ora solved your issue? |
I don't want to edit the sqlnet.ora. I shouldn't have to. My point is this is not the same behavior as other Oracle DB clients and it is confusing. |
You can use the technique I posted about here. That performs all of the steps necesary to get a connection without having to manually edit any files. Note that if you have the files extracted, you can also use this connect string to get a connection: username/password@tcps://host:port/service_name?WALLET_LOCATION=/my/path/to/the/wallet Hopefully one of those is useful to you! |
This issue has been automatically marked as inactive because it has not been updated recently. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not been updated for a month. |
Error: File not found
If I save my wallet into a folder (for example
/atp_creds
) and set theconfig_dir
to that path as per the docs incx_Oracle.init_oracle_client(config_dir="/atp_creds")
It runs,
but when i try to connect with
cx_Oracle.connect(...
it hangs for about 1 minute and then returns the error:
ORA-28759: failure to open file
Using strace, I was able to find out that the init is looking for the cwallet.sso in the
LD_LIBRARY_PATH/network/admin
folderWhen I place the wallet content there, it works.
I have set
TNS_ADMIN
environment variable to the credentials pathI have set
LD_LIBRARY_PATH
to the instantclient library locationI need to set
TNS_ADMIN
toLD_LIBRARY_PATH/network/admin
for the wallet to be discovered and the connection to work.The text was updated successfully, but these errors were encountered: