Replies: 3 comments 13 replies
-
Has something changed on your computer? Did you do some kind of pip upgrade? |
Beta Was this translation helpful? Give feedback.
-
You could try some basics like checking you're on the latest version of OracleDB, connecting to a local DB for diagnostics, etc. Try using a process of elimination. What happens if you don't use encryption for example? |
Beta Was this translation helpful? Give feedback.
-
long time since I last attempted to use this - Today I updated to the latest version and voila suddenly my problem is gone (version 1.3.2) No idea why - just glad it is working. |
Beta Was this translation helpful? Give feedback.
-
I have a simple python file that just connects to my oracle database and suddenly it has stopped working. Been working fine for months and nothing changed as far as i can see. NOTE:: Using the same connection details works fine in SQL DEV from same machine
I get this error
`C:\Users\pteke\Documents\discobot>py db.py
START
(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=adb.uk-london-1.oraclecloud.com))(connect_data=(service_name=ljrfvzeijkoaazn_dbdiscobot_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))
Before pool
after pool
Before Connect
Traceback (most recent call last):
File "src\oracledb\impl/thin/connection.pyx", line 232, in oracledb.thin_impl.ThinConnImpl._connect_with_address
File "src\oracledb\impl/thin/protocol.pyx", line 150, in oracledb.thin_impl.Protocol._connect_phase_one
File "src\oracledb\impl/thin/protocol.pyx", line 263, in oracledb.thin_impl.Protocol._process_message
File "src\oracledb\impl/thin/protocol.pyx", line 241, in oracledb.thin_impl.Protocol._process_message
File "src\oracledb\impl/thin/protocol.pyx", line 309, in oracledb.thin_impl.Protocol._receive_packet
File "src\oracledb\impl/thin/buffer.pyx", line 1089, in oracledb.thin_impl.ReadBuffer.receive_packet
File "src\oracledb\impl/thin/buffer.pyx", line 426, in oracledb.thin_impl.ReadBuffer._receive_packet_helper
File "src\oracledb\impl/thin/buffer.pyx", line 291, in oracledb.thin_impl.ReadBuffer._get_data_from_socket
File "C:\Users\pteke\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "C:\Users\pteke\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
ssl.SSLError: [SSL] internal error (_ssl.c:2633)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\pteke\Documents\discobot\db.py", line 26, in
connection = pool.acquire()
File "C:\Users\pteke\AppData\Local\Programs\Python\Python39\lib\site-packages\oracledb\pool.py", line 148, in acquire
return self._connection_type(user=user, password=password,
File "C:\Users\pteke\AppData\Local\Programs\Python\Python39\lib\site-packages\oracledb\connection.py", line 125, in init
impl = pool_impl.acquire(params_impl)
File "src\oracledb\impl/thin/pool.pyx", line 342, in oracledb.thin_impl.ThinPoolImpl.acquire
File "src\oracledb\impl/thin/pool.pyx", line 253, in oracledb.thin_impl.ThinPoolImpl._acquire_helper
File "src\oracledb\impl/thin/pool.pyx", line 269, in oracledb.thin_impl.ThinPoolImpl._acquire_helper
File "src\oracledb\impl/thin/pool.pyx", line 175, in oracledb.thin_impl.ThinPoolImpl._create_conn_impls_helper
File "src\oracledb\impl/thin/pool.pyx", line 90, in oracledb.thin_impl.ThinPoolImpl._create_conn_impl
File "src\oracledb\impl/thin/connection.pyx", line 345, in oracledb.thin_impl.ThinConnImpl.connect
File "src\oracledb\impl/thin/connection.pyx", line 163, in oracledb.thin_impl.ThinConnImpl._connect_with_params
File "src\oracledb\impl/thin/connection.pyx", line 129, in oracledb.thin_impl.ThinConnImpl._connect_with_description
File "src\oracledb\impl/thin/connection.pyx", line 247, in oracledb.thin_impl.ThinConnImpl._connect_with_address
File "C:\Users\pteke\AppData\Local\Programs\Python\Python39\lib\site-packages\oracledb\errors.py", line 103, in _raise_err
raise exc_type(_Error(message)) from cause
oracledb.exceptions.OperationalError: DPY-6005: cannot connect to database. Connection failed with "[SSL] internal error (_ssl.c:2633)"`
the part were it fails is in the pool.aquire
`import oracledb
import os
from dotenv import load_dotenv
load_dotenv()
user = os.getenv('DB_USER')
pwd = os.getenv('DB_PW')
dsn = os.getenv('DB_DSN')
print("START")
print(dsn)
print(user)
print(pwd)
print("Before pool")
pool = oracledb.create_pool(user=user, password=pwd, dsn=dsn,min=1, max=10, increment=1)
print("after pool")
print("Before Connect")
#connection = oracledb.connect(user="hhuser", password=userpwd, dsn=dsnx)
connection = pool.acquire()
print("After connect")
if connection.is_healthy():
print("Healthy connection!")
else:
print("Unusable connection. Please check the database and network settings.")
`
Beta Was this translation helpful? Give feedback.
All reactions