-
Notifications
You must be signed in to change notification settings - Fork 85
Connect() hangs with SSH tunnels and 11g database #502
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
If I correctly read the extensive list in point 3 of what you have tried, you can get cx_Oracle to connect to your 11g database over the tunnel:
If so, make sure the cx_Oracle script calls In Thick mode, connectivity is handled by the Oracle Client library which is not part of the python-oracledb project, so if it works in cx_Oracle it should (TM) work in python-oracledb Thick mode. |
I just did the test on my 3.9 venv. Then I tried with I do have a workaround, using This bugs me because I spent too much time trying to make it works, but I also understand that it may be a weird edge case on an EoL version which may not be worth your time. I'm still up for trying thing, but won't blame you if you don't |
Did you also include the call to |
Yes, it was already a requirement when using cx_oracle, so it was part of the script. This is exactly what I used :
I previously incorrectly stated that it worked using threading. It does not. edit: I configured a WSL Ubuntu, then used the same script with python 3.12 and instantclient 12_2, and got the same result |
What versions are you using?
Python 3.13.3 (also tried with 3.11)
Oracledb 3.1.1 (also tried 3.0.0 and 2.5.1)
Oracle database 11g
Oracle instant client 18.5 (also tried with 12.2)
platform.platform: Windows-11-10.0.26100-SP0
sys.maxsize > 2**32: True
platform.python_version: 3.13.3
oracledb.version: 3.1.1
Is it an error or a hang or a crash? Hang
What error(s) or behavior you are seeing?
While trying to connect to 11g databases through SSHtunnels, oracledb.connect() hangs and doesn't return anything.
I tried it on multiple tunnels/databases combinaisons, while mixing oracledb / instantclient / python versions.
If I open the tunnel through putty, oracledb.connect works.
If I open the tunnel through another script, oracledb.connect works. (!)
If I try to open a tunnel and connect to a 19c database, it works
If I do the same thing using python 3.9 and cx_oracle, it works.
If I provide a wrong username or password, I get an (expected) error.
If I provide a wrong SID, I get an (expected) error.
I do see an inactive connection in my v$session linked to my script.
I tried everything I could think of and do not understand what I'm missing.
Does your application call init_oracle_client()? Yes, I tried with instant client versions 11.2, 12.1, 18.5
I had success accessing a 19c db using instant client 21.18 through the same tunnel (and same script)
Include a runnable Python script that shows the problem.
The text was updated successfully, but these errors were encountered: